GithubHelp home page GithubHelp logo

sayeed1999 / home Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 10.0 597 KB

The monorepo contains unit microservices e.g home-service for sharing posts, chat-service for real-time dual/group chatting, auth-service, email-service, api-gateway for redirecting requests to appropriate services, bullmq as message bus, socket.io used for realtime data.

License: MIT License

TypeScript 99.58% Dockerfile 0.42%
docker modular-architecture nodejs onion-architecture typescript microservice mongodb mysql microservices message-queue

home's People

Contributors

munimrahman avatar sayeed1999 avatar tajul-islam-refath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

home's Issues

newsfeed/ post delete: soft delete and hard delete

  • deletedAt property in post model default null

  • deletePostById endpoint -> should soft delete by default,

  • deletePostById endpoint -> ?hardDelete=true should permanently delete posts and postlogs

  • delete all comments for hard delete on post

  • take db operation for service to repo in post module

chatapp/ write models for conversations

  • write enum for conversation_type
  • create Conversation mongoose model with props: participants[], messages[], conversation_type(Duo/Group), timestamps
  • create Message mongoose schema with props: sender, timestamps, message

ecommerce/ category crud with log keeping

  • create category
  • edit category
  • delete category
  • get category(s)
  • Product Create /Update/Delete with ProductLog
  • deletedAt prop in product model (default value: null) implement soft delete
  • get all category should not bring deleted products
  • undo soft delete

newsfeed/ features

  • cascade delete posts when a user is permanently deleted from db (comment not needed to delete from user model's hook. if user deletes posts, posts will automatically delete comments as implemented)
  • restore post from recycle bin by deletedAt = null

API Security in chat service

  • outsiders should not see dual or group conversations messages
  • outsiders should not add or remove members from group

here outsider means those who are not participants of that chat

create endpoints from group chatting

  • create group endpoint, first user will be logged in user
  • add users[] to group

Logic for adding user to group:-

  • added user cannot be added to group
  • filter out already present users from adding list, then add new users
  • remove single user from group

Logic for removing user:-

  • if only one user remains, and he removes himself, then delete entire conversation from db

initiate conversations through REST API

-- backend

  • get all users endpoint
  • receive messages of single conversation (dual)
  • start dual conversation (dual)
  • get all conversation list for logged in user (dual)
  • send message to another user (dual)

newsfeed/ load comments with post

  • get all comments with getSinglePost endpoint by default
  • getAllPosts endpoint shall have top 03 comments with each post
  • getAllCommentsByPostId endpoint

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.