A privacy-focused, stateless self-assessment quiz application built with Elixir and Phoenix LiveView. This application requires users to both select an answer AND provide a written justification for each question, promoting active learning through reflection.
- 10 Random Questions: Each session presents 10 randomly selected questions from a large database
- Dual Input Required: Users must both select an option AND provide a textual justification
- Stateless & Private: NO user responses are ever stored - everything stays in your browser session
- Results Review: After submission, view correct answers and detailed explanations
- Modern UI: Built with DaisyUI components for a polished, responsive interface
This application is completely stateless regarding user data:
- ✅ Questions are stored in the database (read-only)
- ❌ User selections are NEVER stored
- ❌ User justifications are NEVER stored
- ❌ Scores are NEVER calculated or displayed
- ❌ No tracking, analytics, or data persistence
All user input exists only in the LiveView socket during the session and is cleared when you close the browser.
- Framework: Phoenix 1.8 with LiveView
- Language: Elixir
- Database: PostgreSQL (for question storage only)
- UI: DaisyUI + Tailwind CSS v4
- No client-side JavaScript required (except Phoenix LiveView)
- Elixir 1.14+
- Erlang/OTP 25+
- PostgreSQL (or configure for SQLite)
-
Clone the repository
-
Install dependencies:
mix setup
-
Create and seed the database:
mix ecto.create mix ecto.migrate mix run priv/repo/seeds.exs
-
Start the Phoenix server:
mix phx.server
-
Visit
localhost:4000in your browser
Questions are stored in seeding.json at the project root. To add new questions:
-
Edit
seeding.jsonfollowing this structure:{ "question": "Your question text?", "options": [ "Option 1", "Option 2", "Option 3", "Option 4" ], "correct_answer": "Option 1", "motivation": "Explanation for why Option 1 is correct..." } -
Re-seed the database:
mix run priv/repo/seeds.exs
Note: Each question must have exactly 4 options, and correct_answer must match one of them exactly.
mix testRun the precommit checks (formatting, compilation warnings, etc.):
mix precommitlib/
ai_quizzer/
quiz.ex # Context module for question queries
quiz/
question.ex # Ecto schema for questions
ai_quizzer_web/
live/
quiz_live.ex # Main LiveView module
quiz_live.html.heex # Quiz and results templates
- Quiz Session Start: 10 random questions are fetched from the database
- User Input: For each question, the user must:
- Select one of four options (radio button)
- Write a justification explaining their choice (text area)
- Validation: The "Submit Quiz" button remains disabled until ALL 10 questions have both inputs
- Results: Upon submission, the application displays:
- The correct answer for each question
- A detailed explanation/motivation
- NO score or pass/fail status (purely informational)
- New Quiz: Users can start a new session with 10 different random questions
This application follows a strict "information-only" approach:
- No scoring: We don't calculate or display grades
- No persistence: User responses vanish after the session
- Active learning: Requiring justifications promotes deeper engagement with material
- Self-assessment: The goal is reflection, not evaluation
[Your License Here]
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix