- Full MVC pattern with modularity that ensures maximum resue of code, maintaining DRY principle.
- Iron strong server side validation.
- In memory cache for repetitive database queries.
- Api rate limitting is implemented for stopping abuse.
- Supports advanced query with mongoDb operators in the query param.
- limit-offset based pagination with in memory cache.
- JWT based stateless auth flow with Role-based access control (RBAC).
- Centralized error handling for production and development.
- async code for potential blocking tasks, so no blocking of the event loop.
- Written in TypeScript with type safety.
- Fully documented API with postman.
-
Setup Dependencies:
npm install
-
Rename the
sample.env
file to.env
and set value to the variables with proper credentials. -
Start development server:
npm run dev
-
MONGODB_URL="mongodb://admin:admin@localhost:27020/ums"
-
For running mongoDB in Docker, docker-compose file is added. Just run
docker compose up
inside project's root directory. Add -d flag to run in the background likedocker compose up -d
. In some system,docker compose
isdocker-compose
. -
For redis:
echo "vm.overcommit_memory = 1" | sudo tee -a /etc/sysctl.conf && sudo chown -R 1001:1001 ./redis_data
-
postman api doc: https://documenter.getpostman.com/view/25816259/2s93sXdaFZ