It is a social media application backend which uses microservices architecture.
Contents
The services except the Follow service are written in Javascript, Follow service is written in Go. The Authentication and User service uses MongoDB, and other services use PostgreSQL. For the event bus, RabbitMQ was used, and Express-Gateway for API-Gateway.
-
POST - Register Userhttp://localhost:8080/auth/register
-
POST - Login Userhttp://localhost:8080/auth/login
-
POST - Logout Userhttp://localhost:8080/auth/logout
-
GET - Get user by IDhttp://localhost:8080/user/get_id?user_id=<user_id>
-
GET - Get user by usernamehttp://localhost:8080/user/get_username?user_id=<user_name>
-
GET - Get all user postshttp://localhost:8080/user/get_posts?user_id=<user_id>
-
GET - Get all user commentshttp://localhost:8080/user/get_comments?user_id=<user_id>
-
POST - Follow userhttp://localhost:8080/user/follow?user_id=<user_id>
-
POST - Unfollow userhttp://localhost:8080/user/unfollow?user_id=<user_id>
-
GET - Get user's all followershttp://localhost:8080/user/get_all_followers?user_id=<user_id>
-
GET - Get user followshttp://localhost:8080/user/is_follows?user_id=<user_id>
-
POST - Create posthttp://localhost:8080/posts/create
-
GET - Get post by IDhttp://localhost:8080/posts/get_post?post_id=<post_id>
-
GET - Get post's all commentshttp://localhost:8080/posts/get_comments?post_id=<post_id>
-
GET - Get post's one commenthttp://localhost:8080/posts/get_one_comment?post_id=<post_id>&comment_id=<comment_id>
-
DELETE - Delete posthttp://localhost:8080/posts/delete_post?post_id=<post_id
-
POST - Create Commenthttp://localhost:8080/comment/create?post_id=<post_id>
-
DELETE - Delete Commenthttp://localhost:8080/comment/delete?comment_id=<comment_id>
The connection strings and passwords are not included in .env and docker-compose file.
Distributed under the MIT License. See LICENSE
for more information.