This is a Boilerplate project for using Express with Typescript using Typegoose for ORM for MongoDB connection
Created By Faizan Zaheer
This Project contains the following: -
- Express Server Setup And Routing with MVC File Folder Structure for Typescript
- Mongoose Models created with heavily typed, Typegoose library
- Repository Pattern with abstract class
- Zod for validations
- basic auth flow , using encrypted JWT and passport
- email sending, SMS sending
- Event emitter publisher and subscriber pattern for optimization
- Bull Queues with Redis for sending Emails and SMS
- prettier and eslint setup
- Swagger API documentation
- Optimized Docker build
Before running the main project make sure that queue processors are running using :-
- npm | pnpm run start:email-bullq-worker
- npm | pnpm start:sms-bullq-worker
For running this example run cmd on cli, npm | pnpm run start,
For running in development watch mode, run cmd on cli, npm | pnpm run start:dev