DataBase Schema and Backend Routes - MDasch22/Instashow GitHub Wiki

DataBase Schema and Backend Routes

Database Schema

image

Backend Routes

Auth ("/api/auth")

  • /

    • Authenticate User
  • /login

    • User login
  • /logout

    • User logout
  • /signup

    • User login

Comments ("/api/comments")

  • /

    • Getting all Comments
  • /<int: comment_id>/edit

    • Edit comment by id
  • /<int: comment_id>/delete

    • Delete the comment by id

Posts ("/api/posts")

  • /

    • Getting all posts
  • /<int: post_id>

    • Get post by id
  • /<username>

    • Get user by username
  • /explore/<int: id>

    • Getting explore page based on user Id
  • /new

    • Create a new post
  • /<int:post_id>/edit

    • Edit post by id
  • /<int:post_id>/delete

    • Delete post by post Id
  • /<int:post_id>/comments

    • Get all comments by post Id
  • /<int:post_id>/comments/new

    • Create a new comment on a post by Id
  • /like/<int:post_id>

    • Like a post-by-post Id
  • /unlike/<int:post_id>

    • Like a post-by-post Id

Followers ("/api/follows")

  • /follow/<int:userId>

    • Update user following
  • /unfollow/<int:userId>

    • Remove from user following

Users ("/api/users")

  • /

    • Get all users
  • /profile/<username>

    • Get user by username
  • /profile/<int:id>/edit

    • Edit user by username
  • /profile/<int:id>/profileImg/edit

    • Edit profile Img with AWS
⚠️ **GitHub.com Fallback** ⚠️