Coder Social home page Coder Social logo

bugtracker-kafka's Introduction

Bug Tracker - Kafka

โœจ Sample bug tracker app (Trello like) with event-driven microservices architecture using Apache Kafka as message broker for educational purpose

node express

service map

Intro ๐ŸŒด

  • Read: What is Apache Kafka || Install Kafka with Homebrew ๐Ÿ“•
  • Stack: Nodejs, Express, Postgre, MariaDB, MongoDB, Kafka, JWT Auth, PM2, KrakenD API Gateway
  • API Docs: Postman
  • Find Redis Streams example ? bugtracker-redis
  • Step run the app :
    • install dependency & setup env for each services
    • install PM2 & run each services with that
    • install Krakend, go to gateway folder & type krakend run -c krakend.json
    • ready to go ๐ŸŽ๏ธ

Detail Services ๐Ÿ”…

1. Auth (postgree-express) [table:users]

  • endpoint:

    • register
    • login
    • logout
    • refresh jwt token
    • get current user data
    • get all users (+filter by name & offset based pagination)
    • get detail user
  • event

    • publish: newUser, newNotif
    • consume: -

2. Project (mariadb-express) [table:project,card,comment,users]

  • note : here, i am still merging project service with the card service, i think the coupling is too tight to be place in separated services and because it is only for learning purpose, so ya i think it's ok to place it in the same service.

  • endpoint:

    • create project
    • get projects (+filter by project title & offset based pagination)
    • get detail project
    • update, delete project (cascade delete card)
    • create,update & delete card
    • get cards by projectId (+filter by status & cursor based pagination)
    • get detail card
  • event

    • publish: newProject, updateProject, deleteProject, newCard, updateCard, changeCardStatus, newNotif
    • consume: newUser, newComment, deleteComment

3. Comment (mariadb-express) [table:comment,users,card,project]

  • endpoint:

    • create comment (when comment create, totalComment in card must be update too)
    • get comments by cardId (cursor based pagination)
    • get detail comments
    • delete comment
  • event:

    • publish: newComment, deleteComment, newNotif
    • consume: newUser, newProject, updateProject, deleteProject, newCard, updateCard, updateCardStatus

4. Notif (MongoDB-express) [collections: notif ]

  • endpoint:

    • get notifications by userId (mongoose paginate). type notification: registration, create project, delete project, create card, change status card, create commet
  • event:

    • publish: -
    • consume: newNotif

what's missing ? (reason: dont have free time to add it) ๐Ÿ™

  • you can add, category services for grouping card inside project
  • better error handling & query validation
  • some primary feature, ex: forgot password, change password, kick member from project, advance permission etc..

improvement that can be done ๐Ÿšง

  • better try fail over & storage mechanism
  • write unit & integration test
  • if you have a lot of free time, you can add docker & kubernetes on top of it

๐Ÿ—ก July 2022 - faeshal.com

bugtracker-kafka's People

Watchers

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