This repository has Node.js microservices for PantryPal. It includes Auth Service for user authorization and User Service for managing user data. The services use the MVC pattern and follow REST API design.
Hi, I'm Manu Janardhana. I am a Full Stack Developer who likes to build reliable and secure web services using Node.js and Express. I focus on writing clean code and using good security practices like JWT for authorization.
You can find the Node.js services in the node folder of this repository.
To see the commits for the Node.js services, check the node
folder here.
- Created Auth Service (for authorization) and User Service (for user data) using the MVC pattern.
- Used Swagger for API documentation.
- Used JWT tokens with asymmetric encryption for secure authorization. link
- Added user roles in tokens to control access.
- Auth Service calls the User Service to check user data.
- folder link
- Added CRUD endpoints (GET, POST, PUT, DELETE) to manage user data. link
- Email verification is required during signup. link
- Users can only change their own data, but admins can delete any account.
- Uses REST calls to get and update data.
- folder link
- Logger with Correlation ID: Added to track logs across services for better debugging. link
- Rate Limiter: Used to prevent too many requests and keep the service secure. link
- Jest Tests: Tests were written to check if the services work correctly. link