A sample to play around with pnpM (and eventually Turborepo) monorepos, Prisma with NestJS and Next.js with Refine.
- Node v20.x
- npm v10.x
- pnpM v8.9.0
- Docker Compose
Start by installing:
pnpm install
Copy the src/assets/config-template.json
file as src/assets/config.json
cp packages/api/src/assets/config-template.json packages/api/src/assets/config.json
Feel free to edit settings in config.json according to your environment requirements.
If you have a local postgres DB, copy the packages/api/.env.template-local
file as packages/api/.env
cp packages/api/.env.template-local packages/api/.env
Important
Feel free to edit settings to match your environment requirements.
To use docker compose for a postgres DB, copy the packages/api/.env.template-compose
file as packages/api/.env
cp packages/api/.env.template-compose packages/api/.env
then launch with
docker-compose up
Push the database schema with
pnpm run db:push
then seed with sample data:
pnpm run db:seed
To run unit tests in all workspaces:
pnpm run test
To run e2e tests in all workspaces:
pnpm run test:e2e
HTML test reports for your browser are published in packages/*/output.
Tip
Test results are also published as the build summary in Github Actions and a comment in Pull Requests.
pnpm run server
pnpm run client
Browse http://localhost:3001 and login with:
- username: admin@test.com
- password: Test123!