The Online Content Microservice Project aims to build three microservices to manage content, user interactions, and user data. The project follows the microservices architecture and uses Docker for containerization. Each microservice has its own dedicated database.
The architecture comprises one proxy server and three microservices. The proxy server is responsible for routing requests to the appropriate microservice. The proxy server is implemented using Nginx.
The database is implemented using MongoDB. Each microservice has its own dedicated database. The databases are containerized using Docker.
The three microservices are:
- Content Service: Responsible for managing content, including books, and provides CRUD operations for content, new content listings, and top content listings based on user interactions.
- User Interaction Service: Records user interactions "Like" and "Read" events and APIs to manage these events. It also exposes internal APIs to facilitate content sorting based on interactions.
- User Service: Manages user data and offers CRUD operations for user profiles.
Key Features:
- Ingests data from CSV files.
- Stores content details including title, story, date published, and user ID.
- Provides RESTful APIs for CRUD operations on content.
- Offers an API for listing new contents sorted by date.
- Offers an API for listing top contents sorted by the number of interactions (likes and reads).
Key Features:
- Records "Like" and "Read" events for content.
- Provides APIs to record and read these interactions.
- Exposes internal APIs for content service to sort content based on user interactions.
Key Features:
- Manages user profiles.
- Provides RESTful APIs for CRUD operations on users, including first name, last name, email, and phone number.
- Provide authentication token to users.
- Language: Node.js (Express.js), TypeScript
- Databases: Docker Containerized MongoDB instance with separate databases for each microservice
- Docker for containerization
- Swagger for documentation
- Postman collection to test apis
Each microservice uses its own dedicated database. Database schema design for each microservice will be detailed in the Low-Level Design (LLD).
API design for each microservice will be detailed in the Low-Level Design (LLD). Conventions for RESTful endpoints and data formats will be followed.
- Docker Compose is used for managing multiple services including Nginx and MongoDB.
- Instructions for building and running the Dockerized applications are provided in the README.md file at the root of repository.