RESTful Node.js Starter with Prisma and Typescript
This is an entity-based (atom) starter that utilizing
- Typescript
- Prisma (ORM)
- Eslint
- Jest
- Casl
- Husky
So what is an atom
An atom is a single part of the project, atoms can work together to response to certain requests
The core components of an atom are
- Schemas
- Service
- Controller
- Router
Schemas
Schemas are zod schemas that used to validate the incoming data
Service
A service is an API between a atom and the database
Controller
A controller control the logic of a atom, a controller may need schemas and/or service
Router
A router routes traffic to the desired function
Other files may be provided such as
- Tests
- Types
- Helpers
CLI
npm run initialize
for initialization this command will- delete LICENSE and CONTRIBUTING.md files
- empty README.md file
- delete .env.example and copy its content to .env
- ask you for project Name, Version, Description and Author and write them to package.json
npm run make atom <name>
to make a new atomnpm run make atom <name> -crud
to make a new CRUD atomnpm run make root-user
to make root user (role=ROOT)