Coder Social home page Coder Social logo

xxyet / nest-http-prisma-zod Goto Github PK

View Code? Open in Web Editor NEW

This project forked from innei-template/nest-http-prisma-zod

0.0 0.0 0.0 1.32 MB

A best practice for NestJS framework with using Prisma + Postgres, Socket.IO, Zod and Vitest

License: MIT License

Shell 2.66% JavaScript 1.04% TypeScript 96.31%

nest-http-prisma-zod's Introduction

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.

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
cp .env.template .env
vim .env
docker build . -t innei/nest-http-prisma-zod
docker compose up

How to start development

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

  • Custom Logger without consola
  • Prisma pagination implementation
  • Fully testing unit and e2e
  • Data caching and API caching without cache-manager

License

2023 © Innei, Released under the MIT License.

Personal Website · GitHub @Innei

nest-http-prisma-zod's People

Contributors

renovate[bot] avatar innei avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.