GithubHelp home page GithubHelp logo

bkhalifeh / microservice-blog Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 164 KB

A simple blog project built using microservice architecture and the NestJS framework with an event-driven pattern.

JavaScript 0.79% Dockerfile 0.26% TypeScript 98.25% Shell 0.70%
blog drizzle-orm event-driven fastify microservice nats nestjs nodejs typia

microservice-blog's Introduction

microservice-blog

Description

This project is a simple blog platform developed using the NestJS framework. It leverages microservice and event-driven architecture to ensure scalability, flexibility, and efficient communication between different components. The architecture is designed to handle various aspects of a blog, such as post creation, comment management, and user interaction, through distinct microservices that communicate via events. This setup allows for seamless integration, improved performance, and ease of maintenance.

Key features include:

  • Microservice Architecture: Each core functionality (e.g., posts, comments) is handled by a dedicated microservice, promoting modularity and scalability.
  • Event-Driven Communication: The microservices communicate through events, ensuring loose coupling and asynchronous processing.
  • NestJS Framework: Utilizes NestJS for building scalable and maintainable server-side applications with TypeScript.

Authentication

  • HTTP Authentication, scheme: bearer

User Service

User signs up.

POST /api/v1/user/sign-up

{
    "fullName": "behzad khalifeh",
    "email": "[email protected]",
    "password": "Behzad@Kh80"
}

User signs in.

POST /api/v1/user/sign-in

{
    "email": "[email protected]",
    "password": "Behzad@Kh80"
}

Get information about the user.

GET /api/v1/user

Post Service

Create a new post.

POST /api/v1/post

{
    "title": "microservice",
    "content": "Hello World!"
}

Get a list of all posts.

GET /api/v1/post

Get a list of all posts authored by a specific user.

GET /api/v1/user/:userId/post

Get all information about the post.

GET /api/v1/post/:postId

Comment Service

Get a list of comments on the post.

GET /api/v1/post/:postId/comment

Add a new comment to the post.

POST /api/v1/post/10/comment

{
    "content": "Woow"
}

microservice-blog's People

Contributors

bkhalifeh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.