Database Models
The application uses SQLAlchemy with PostgreSQL. Models are defined in app.common.models.
User
Stores user profile information.
username(PK): Unique identifier.password_hash: Hashed password.learning_goals,prior_knowledge,learning_style: Personalization fields.
Topic
Represents a subject the user is learning.
id(PK)name: Name of the topic.user_id: Owner of the topic.study_plan: JSON list of steps.
Relationships:
steps: One-to-Many withStudyStep.quizzes: One-to-Many withQuiz.flashcards: One-to-Many withFlashcard.
StudyStep
A single unit of learning within a Topic.
topic_id: FK toTopic.step_index: Order in the plan.content: Markdown text of the lesson.questions: JSON list of assessment questions.user_answers: JSON record of user's answers.
Quiz
A standalone quiz generated for a topic.
questions: JSON list of multiple-choice questions.score: Float representing performance.
Flashcard
Vocabulary builder tool.
term: The concept.definition: The explanation.