Skip to content

UtkuAltnkaya/Social-Media-Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Media Application

It is a social media application backend which uses microservices architecture.

Contents

Services

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.

Endpoints

    Authentication

    • POST - Register User
      http://localhost:8080/auth/register
    • POST - Login User
      http://localhost:8080/auth/login
    • POST - Logout User
      http://localhost:8080/auth/logout

    User

    • GET - Get user by ID
      http://localhost:8080/user/get_id?user_id=<user_id>
    • GET - Get user by username
      http://localhost:8080/user/get_username?user_id=<user_name>
    • GET - Get all user posts
      http://localhost:8080/user/get_posts?user_id=<user_id>
    • GET - Get all user comments
      http://localhost:8080/user/get_comments?user_id=<user_id>
    • POST - Follow user
      http://localhost:8080/user/follow?user_id=<user_id>
    • POST - Unfollow user
      http://localhost:8080/user/unfollow?user_id=<user_id>
    • GET - Get user's all followers
      http://localhost:8080/user/get_all_followers?user_id=<user_id>
    • GET - Get user follows
      http://localhost:8080/user/is_follows?user_id=<user_id>

    Posts

    • POST - Create post
      http://localhost:8080/posts/create
    • GET - Get post by ID
      http://localhost:8080/posts/get_post?post_id=<post_id>
    • GET - Get post's all comments
      http://localhost:8080/posts/get_comments?post_id=<post_id>
    • GET - Get post's one comment
      http://localhost:8080/posts/get_one_comment?post_id=<post_id>&comment_id=<comment_id>
    • DELETE - Delete post
      http://localhost:8080/posts/delete_post?post_id=<post_id

    Comment

    • POST - Create Comment
      http://localhost:8080/comment/create?post_id=<post_id>
    • DELETE - Delete Comment
      http://localhost:8080/comment/delete?comment_id=<comment_id>

Note

The connection strings and passwords are not included in .env and docker-compose file.

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgments

About

Social media application with microservices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published