Time taken: 11 hours
MintLearn is an interactive quiz generation platform that transforms any content into engaging quizzes using AI. Powered by Mistral AI, it creates adaptive learning experiences that evolve based on user performance.
- AI-Powered Quiz Generation: Convert any text content into well-structured quizzes
- Adaptive Learning: Questions adjust based on previous performance
- Instant Feedback: See detailed results and correct answers immediately
- Progress Tracking: Monitor your learning journey with comprehensive scoring
- Retry Mechanism: Generate similar quizzes focusing on areas that need improvement
The quiz generation process follows these steps:
- User inputs content and title
- Mistral AI analyzes the content and generates relevant questions
- Questions are stored with multiple-choice options
- User attempts the quiz
- Results are analyzed for adaptive learning
- New quizzes can be generated focusing on weak areas
flowchart TD
    A[Prompt Mistral model with 'title' and 'content'] --> B{Is the response schema validated?}
    B -->|Yes| C[Populate props of Quiz component]
    B -->|No| D{Attempted more than n times?}
    D -->|Yes| E[Throw an error]
    D -->|No| B
    style A fill:#e6fff7,stroke:#00bf8f
    style B fill:#e6fff7,stroke:#00bf8f
    style C fill:#e6fff7,stroke:#00bf8f
    style D fill:#e6fff7,stroke:#00bf8f
    style E fill:#e6fff7,stroke:#00bf8f
    classDef note fill:#f9f9f9,stroke:#ccc,font-size:12px;
    The schema that is expected from the LLM is below
{
  "questions": [
    {
      "id": 1,
      "title": "Question text here",
      "options": [
        {
          "id": 1,
          "content": "First option"
        },
        {
          "id": 2,
          "content": "Second option"
        },
        {
          "id": 3,
          "content": "Third option"
        },
        {
          "id": 4,
          "content": "Fourth option"
        }
      ],
      "correct": 2 // Integer representing the correct option position (1-4)
    }
  ]
}The schema validation ensures:
- Each question has exactly 4 options
- IDs are sequential numbers
- The 'correct' field is a number 1-4 representing the position of the correct answer
- All required fields are present and properly formatted
If you do not have turso installed on your computer please run the following command:
# For macOS
brew install tursodatabase/tap/turso
# For linux or windows
curl -sSfL https://get.tur.so/install.sh | bashThen to actually set up the project:
# Clone the repository
git clone https://github.com/yourusername/mintlearn.git
# Install dependencies
pnpm install
# Run development server for turso
turso dev
# Initialize the database
pnpm run init-db
# Run the development server
pnpm run devOpen http://localhost:3000 with your browser to see the result.
MintLearn uses Vitest for testing, including unit tests for database queries and quiz generation validation
- Database operations
- Quiz generation
pnpm run test- Frontend: Next.js 15, TailwindCSS
- Database: libSQL, Turso
- AI Model: Mistral
- Language: TypeScript
Contributions are welcome! Please feel free to submit a Pull Request.