A best practice for using Prisma + Postgres, Socket.IO (Guest or authentication required) and Zod data validation. And it covers unit testing and integration testing.

- Framework: NestJS (Based on Fastify)
- Language: TypeScript (Best practices, Not AnyScript)
- Database ODM: Prisma (Fully type-safe schema and query)
- Data Validation: Zod
- Testing: Vitest
- Package Manager: pnpm
- DevOps: Docker
- Other: Monorepo, Prettier, ESLint, Husky, Bump Version, etc.
- Copy and adjust
.env.template to .env
cp .env.template .env
vim .env
docker build . -t innei/nest-http-prisma-zod
docker compose up
pnpm run init # first time
npm run dev
Before you start dev, do not forget copy .env.template to .env
Using this template for your own project
Just tap the Fork button.
Write an service unit test
Write an route integration test
- Custom Logger without consola
- Prisma pagination implementation
- Fully testing unit and e2e
- Data caching and API caching without cache-manager
2023 © Innei, Released under the MIT License.
Personal Website · GitHub @Innei