Skip to content
/ Readme Public

Blog engine built with microservice architecture using Nest.js and NX, supporting various publication formats and user subscriptions

Notifications You must be signed in to change notification settings

opifexM/Readme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node CI

Readme

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.

Description

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.

Features

  • 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.

Usage

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:

User Management

  • 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

Content Management

  • 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

File Management

  • 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

Notification Management

  • 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

API Service

  • Serve API:
    npx nx run api:serve

General Commands

  • Reset:
    npx nx reset

Database Management

Prisma Commands (Content Management)

  • 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

Technologies Used

  • 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.

License

Readme is licensed under the ISC license.

About

Blog engine built with microservice architecture using Nest.js and NX, supporting various publication formats and user subscriptions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages