Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amrdb/friendsfeed
A social network for friends to see their life updates only to support friends communication without influencers, creators, pages, etc...
https://github.com/amrdb/friendsfeed
jwt microservices nestjs social-network typeorm typescript
Last synced: about 1 month ago
JSON representation
A social network for friends to see their life updates only to support friends communication without influencers, creators, pages, etc...
- Host: GitHub
- URL: https://github.com/amrdb/friendsfeed
- Owner: amrdb
- Created: 2022-07-04T00:36:11.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-26T12:52:58.000Z (8 months ago)
- Last Synced: 2024-10-26T22:45:17.720Z (about 2 months ago)
- Topics: jwt, microservices, nestjs, social-network, typeorm, typescript
- Language: TypeScript
- Homepage: https://friendsfeed.onrender.com/api/v1.0/docs
- Size: 606 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Friendsfeed
A social network for friends to see their life updates only to support friends communication without influencers, creators, pages, etc...
## Technologies
* Node.js
* TypeScript
* Nest.js
* PostgreSQL
* TypeORM
* Kysely (query builder)
* Redis
* RabbitMQ
* Google Cloud Storage
* Firebase Cloud Messaging (Notifications)
* JWT Authentication
* Swagger## System Architecture
![system-arch.png](.github/system-arch.png)
## Docs
Swagger [https://friendsfeed.onrender.com/api/v1.0/docs](https://friendsfeed.onrender.com/api/v1.0/docs)
> Note: It could take up to 30 seconds to load (because of the free hosting).## Features
The following features are available: (without details)
* Authentication:
* Sign up
* Login
* Logout
* JWT-based auth with Refresh tokens* Users:
* Get my profile
* Get user profile with friendship status
* Update profile picture
* Update profile* Friendships:
* Friendship request
* Accept friendship request
* Reject friendship request
* Get/Filter/Search friendship requests
* Get/Filter/Search friends* Posts:
* Create post
* Get/Filter posts of a user
* Get post by id
* Update post
* Delete post* Comments:
* Create comment on a post
* Get comments of a post
* Get comment by id
* Update comment
* Delete comment* Likes:
* Like a post
* Unlike a post
* Get likes of a post* Notifications:
* Get unread notifications count
* Get notifications and mark them as read
* Send notification on a post like or comment
* Send notification on a friendship request
* Send notification on a friendship request acception* Feed (posts of my friends):
* Store each user's feed using a distributed worker
* Get feed of a user (autoscroll)
## Design Patterns* Utilized the Dependency Injection Pattern (built in Nest.js by default) to achieve the [Dependency Inversion Principle (D in SOLID)](https://martinfowler.com/bliki/InversionOfControl.html) for loosely coupled modules.
* Utilized the Repository Pattern to decouple the service (business logic) layer from the data access layer.## Feed Worker
It is a distributed worker (nestjs microservice) that stores each user's feed in the PostgreSQL database using Kysely query builder. It communicates with the core monolith using RabbitMQ. It listens to posts creation events and updates the feed of the friends of the user.