Skip to content

Kanji Karma Database Schema and Backend Routes

Christian Cozma edited this page Jun 2, 2021 · 9 revisions

Database schema

Link to the schema: Kanji Karma Schema

Database Schema

Backend API Routes

Users

GET /api/users/

  • Returns the information for all users

GET /api/users/:id

  • Returns the information for one user

Sessions

GET /api/auth/

  • Returns the information for the logged in user

POST /api/auth/signup

  • Signs a new user up

POST /api/auth/login

  • Logs a user in

DELETE /api/auth/

  • Logs a user out

Decks

GET /api/decks/

  • Returns all decks that a logged in user owns.

GET /api/decks/:id

  • Returns a specific deck that a logged in user owns.

POST /api/decks/

  • Allows a user to create a new deck on their profile.

PUT /api/decks/:id

  • Allows a logged in user to edit their deck.

DELETE /api/decks/:id

  • Allows a logged in user to delete a deck from their profile.

Search Kanji Characters

GET /api/search/

  • Returns a modal with the single kanji character that a user searched for that is found in the database.

Kanji Character

GET /api/character/:id

  • Get a kanji character info box

POST /api/character/:id

  • Allows a logged in user to add a kanji character info box to their profile OR a deck on their profile.

DELETE /api/character/:id

  • Allows a logged in user to delete a kanji character info box from their profile or their deck.
Clone this wiki locally