A minimal, modular Express API boilerplate using TypeScript and Prisma, featuring a simple TODO CRUD example. JWT authentication will be added soon.
- Modular architecture: Each module (e.g., TODO) is self-contained, with its own controller, service, route, and validation files.
- TypeScript: Type-safe code for better development experience and error checking.
- Prisma ORM: Easy-to-use database querying and migration tool.
- Public TODO Routes:
- POST
/todos
: Create a new TODO - GET
/todos
: Get a list of all TODOs - GET
/todos/:id
: Get a specific TODO by ID - PUT
/todos/:id
: Update a TODO by ID - DELETE
/todos/:id
: Delete a TODO by ID
- POST
- JWT authentication to be added soon!
-
Clone the repository:
git clone https://github.com/RahimGuerfi/express-prisma-todo-boilerplate.git
-
Install dependencies:
npm install
-
Set up your environment variables:
- Copy
.env.example
to.env
- Set your
DATABASE_URL
in.env
- Copy
-
Push your Prisma schema:
npm run db:push
-
Run the server:
npm run dev
- Express: Web framework for building APIs.
- Prisma ORM: Database toolkit.
- TypeScript: JavaScript with type definitions.
- JWT Authentication
- Enhanced API features