Skip to content

Latest commit

 

History

History
83 lines (51 loc) · 2.8 KB

CONTRIBUTING.md

File metadata and controls

83 lines (51 loc) · 2.8 KB

next-admin

What's inside?

An auto generated admin from Prisma models for your Next.js app.

Apps and Packages

  • docs: a Next.js app
  • web: another Next.js app
  • next-admin: the admin library used by both web and docs applications
  • eslint-config-custom: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • tsconfig: tsconfig.jsons used throughout the monorepo

Utilities

This turborepo has some additional tools already setup for you:

Workflow

The project workflow uses GitHub Actions to run tests, build, deploy (prod - preview - docs) and publish packages. To handle versioning up and publishing, we use Changesets

Create a changeset file

To increase the version of a package, you need to create a changeset file. You can create a changeset file by running the following command:

yarn changeset

Any PR without a changeset file will just trigger the tests and eventually deploy/preview the app.

Current major release features

If you want to contribute on the current major version, you can create a PR on the main branch. Any merged PR on the main branch that contains changeset files will create a PR changeset-release/main, which we could merge into main to release a new version.

Note: Make sure that the branch was created and updated from the main branch.

schema

Fixing an old major release

If you want to fix a previous major version, you can create a PR on the relative branch (fix v1 on branch v1). Any merged PR on those branches that contains changeset files will create a PR changeset-release/[v1|v2|v3], which we could merge into [v1|v2|v3] to release a new version.

Note: Make sure that the branch was created from the latest release of the major version you want to fix.

schema-fix

Once a fix has been released, you can cherry-pick the fix on the develop branch if that fix is still relevant.

Build

To build all apps and packages, run the following command:

yarn run build

Develop

To develop all apps and packages, run the following command:

yarn run dev
docker-compose up
cd apps/example && yarn database

E2E

Tests are using Playwright to test directly with a browser.

You can write and debug tests easily with this commande

cd apps/example
npx playwright install
npx playwright test --ui