DB Schema and Backend Routes - ryangoggin/Goggbook GitHub Wiki

Database Schema and Backend Routes

Database Schema:

image

Backend Routes:

User

  • GET /users - get all users
  • POST /users - create a new user
  • GET /users/:id - get a specific user by ID
  • GET /users/:id/friends - get a specific user's friends by user ID
  • PUT /users/:id - update a specific user by ID
  • DELETE /users/:id - delete a specific user by ID

Post

  • GET /posts - get all posts
  • POST /posts - create a new post
  • GET /posts/:id - get a specific post by ID
  • GET /posts/:id/comments - get a specific post's comments by post ID
  • GET /posts/:id/likes - get a specific post's likes by post ID
  • PUT /posts/:id - update a specific post by ID
  • DELETE /posts/:id - delete a specific post by ID

Comments

  • GET /comments - get all comments
  • POST /comments - create a new channel
  • GET /comments/:id - get a specific channel by ID
  • PUT /comments/:id - update a specific channel by ID
  • DELETE /comments/:id - delete a specific channel by ID

Likes

  • GET /likes - get all likes
  • POST /likes - create a new like
  • GET /likes/:id - get a specific like by ID
  • DELETE /likes/:id - delete a specific like by ID

Friends

  • GET /friends - get all friends
  • POST /friends - create a new friend
  • GET /friends/:id - get a specific friend by ID
  • DELETE /friends/:id - delete a specific friend by ID