Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/innei-template/nest-http-prisma-zod
A best practice for NestJS framework with using Prisma + Postgres, Socket.IO, Zod and Vitest
https://github.com/innei-template/nest-http-prisma-zod
nestjs
Last synced: 26 days ago
JSON representation
A best practice for NestJS framework with using Prisma + Postgres, Socket.IO, Zod and Vitest
- Host: GitHub
- URL: https://github.com/innei-template/nest-http-prisma-zod
- Owner: innei-template
- License: mit
- Created: 2023-08-28T05:34:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-12T10:10:51.000Z (about 1 year ago)
- Last Synced: 2024-05-18T17:46:56.016Z (7 months ago)
- Topics: nestjs
- Language: TypeScript
- Homepage:
- Size: 1.35 MB
- Stars: 91
- Watchers: 3
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nestjs - Nest Prisma Zod Boilerplate - A best practice for NestJS framework with using Prisma + Postgres, Socket.IO, Zod and Vitest. (Resources)
README
# Nest Http Template
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.
![](https://github.com/Innei/nest-http-prisma-zod/assets/41265413/beb9fac0-19c8-448f-ac28-9299765ed899)
## Which Tech Stack In Use
- 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.## Run in docker compose
1. Copy and adjust `.env.template` to `.env`
```sh
cp .env.template .env
vim .env
```2.
```sh
docker build . -t innei/nest-http-prisma-zod
docker compose up
```## How to start development
```bash
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
## TODO
- [x] Custom Logger without consola
- [x] Prisma pagination implementation
- [x] Fully testing unit and e2e
- [ ] Data caching and API caching without cache-manager## License
2023 © Innei, Released under the MIT License.
> [Personal Website](https://innei.in/) · GitHub [@Innei](https://github.com/innei/)