Skip to main content

API Routes

The following endpoints are defined in app.common.routes.

Authentication

POST /signup

Creates a new user account.

  • Params: username, password

POST /login

Authenticates a user.

  • Params: username, password

GET /logout

Ends the user session.

Topic Management

POST / (Index)

Starts a new learning session.

  • Params:
    • topic: Name of the topic.
    • mode: Learning mode (chapter, quiz, flashcard, reel).

GET /delete/<topic_name>

Deletes a topic and all associated data.

GET /api/suggest-topics

Returns a list of suggested topics based on the user's profile.

  • Auth Required: Yes
  • Response: JSON { "suggestions": [...] }

User Profile

POST /user_profile

Updates user personalization settings.

  • Params: learning_goals, occupation, learning_style, etc.