Readme is a straightforward headless blog engine built using microservice architecture and the modern Nest.js framework. The project comprises multiple microservices, each addressing a specific task.
Readme focuses on backend development for a multi-user blog. The core feature of the service is the variety of publication formats and the ability to subscribe to updates from other users, which influences the user's content feed.
- User Management: Registration, JWT-based authentication, and user profile management.
- Content Management: Creation, editing, deletion, and viewing of various types of blog posts (video, text, quote, photo, link).
- File Management: Uploading images for blog posts.
- Notification Management: Email notifications about new publications.
- API Gateway: Integration of multiple microservices for a seamless API experience.
The project is developed using a microservice architecture with the following technologies:
- Nest.js: The primary framework used for building the microservices.
- TypeScript: Ensures type safety and modern JavaScript features.
- MongoDB and PostgreSQL: Used for database management, as per the requirements of each microservice.
- JWT: For secure authentication.
- Docker: To containerize and manage microservices.
Each microservice can be served and managed using specific commands:
-
Serve Application:
npx nx run user-management:serve
-
Docker Up:
docker compose --file ./apps/user-management/docker-compose.dev.yml --env-file ./apps/user-management/user-app.env --project-name "readme-user-management" up -d
-
Docker Down:
docker compose --file ./apps/user-management/docker-compose.dev.yml --env-file ./apps/user-management/user-app.env --project-name "readme-user-management" down
-
Serve Application:
npx nx run content-management:serve
-
Docker Up:
docker compose --file ./apps/content-management/docker-compose.dev.yml --env-file ./apps/content-management/content-app.env --project-name "readme-content-management" up -d
-
Docker Down:
docker compose --file ./apps/content-management/docker-compose.dev.yml --env-file ./apps/content-management/content-app.env --project-name "readme-content-management" down
-
Serve Application:
npx nx run file-management:serve
-
Docker Up:
docker compose --file ./apps/file-management/docker-compose.dev.yml --env-file ./apps/file-management/file-app.env --project-name "readme-file-management" up -d
-
Docker Down:
docker compose --file ./apps/file-management/docker-compose.dev.yml --env-file ./apps/file-management/file-app.env --project-name "readme-file-management" down
-
Serve Application:
npx nx run notification-management:serve
-
Docker Up:
docker compose --file ./apps/notification-management/docker-compose.dev.yml --env-file ./apps/notification-management/notification-app.env --project-name "readme-notification-management" up -d
-
Docker Down:
docker compose --file ./apps/notification-management/docker-compose.dev.yml --env-file ./apps/notification-management/notification-app.env --project-name "readme-notification-management" down
- Serve API:
npx nx run api:serve
- Reset:
npx nx reset
-
Lint Database Schema:
npx prisma validate --schema ./schema.prisma
-
Migrate Database:
npx prisma migrate dev --schema ./schema.prisma --skip-generate --skip-seed
-
Reset Database:
npx prisma migrate reset --schema ./schema.prisma --force --skip-generate --skip-seed
-
Generate Prisma Client:
npx prisma generate --schema ./schema.prisma
-
Seed Database:
npx ts-node seed.ts
- Nest.js: A modern framework for building efficient, reliable, and scalable server-side applications.
- TypeScript: A superset of JavaScript that adds static types, enhancing code quality and maintainability.
- MongoDB and PostgreSQL: Flexible and powerful databases for different microservices.
- JWT: JSON Web Tokens for secure authentication.
- Docker: Containerization for efficient deployment and management of microservices.
- Prisma: ORM for database management.
- Commander.js: Handles command-line inputs.
- Lodash: Offers a comprehensive set of utility functions to streamline code.
- js-yaml: Parses YAML files.
- Jest: Facilitates testing of the application.
- ESLint: Ensures adherence to code quality standards.
- RabbitMQ: For message queueing.
- Multer: Handles file uploads.
- Nodemailer: Manages email functionalities.
Readme is licensed under the ISC license.