SocialSphere is a scalable and modular microservice architecture-based social media platform. The architecture consists of eight services: Authentication, User, Post, Interaction, Tag, User Analytics, Post Analytics, and Home Feed service. Each service is responsible for a specific functionality, making SocialSphere highly maintainable and easy to update or scale. The backend is built with Express.js and Prisma as an ORM, and PostgreSQL is used as the database.
SocialSphere services are dockerized, meaning each service has its own Dockerfile and they are orchestrated using a docker-compose.yaml
file.
- Authentication Service: Manages user authentication processes such as user registration, login, token verification, password recovery, and logout.
- User Service: Manages user profiles including bio, username, full name, cover image, and friend list. Users can view their own profile or those of their friends. Also handles friend requests.
- Post Service: Handles all operations related to posts such as creating, editing, viewing, deleting, and searching. Each post maintains a "last interaction date," which updates when someone interacts with the post (via the Interaction Service).
- Tag Service: Manages all operations related to tags associated with a post, including creating, editing, viewing, and deleting them.
- Interaction Service: Manages interactions with a post or a comment, including creating, viewing, deleting, and managing likes and comments. This service also provides a list of posts that a user has liked.
Clone the repository to your local machine.
git clone --recursive https://github.com/MkDierz/SocialSphere.git
The --recursive
argument is used to clone all the submodule repositories.
Ensure you have the following installed on your system:
- Docker
- Docker Compose
- Node.js (For development)
Navigate into the root directory of the project and use Docker Compose to build and run the application:
docker-compose up --build
This will spin up all the services, and they will start communicating with each other.
To stop running all services, use:
docker-compose down
Further documentation on each service is available within the respective service's directory. The documentation includes information on the service's API endpoints, data models, and specific setup or running instructions.
Please refer to the CONTRIBUTING.md file for information about how to contribute to SocialSphere.
This project is licensed under the MIT License. See the LICENSE.md file for details.