Database Schema and Backend Routes - DylanPeate/discord-clone GitHub Wiki

Database Schema

image

Link to DB diagram


Backend Routes

Users:

  • GET /api/userId
    • Returns user profile

Sessions:

  • GET /api/auth/
    • Returns info about logged-in user
  • POST /api/auth/signup
    • Signs a new user up
  • POST /api/auth/login
    • Logs in a user
  • DELETE /api/auth/
    • Logs out a user

Channels:

*GET /api/channelId

  • Gets channel *POST /api/channels
  • Creates channel *DELETE /api/channelId
  • Deletes channel

Server:

  • GET /api/serverId
    • Gets server
  • POST /api/server
    • Creates server
  • DELETE /api/serverId
    • Deletes server