QuizAppwithFastAPI Tailwind Templates

Quizappwithfastapi

A modern quiz application built with FastAPI and Tailwind CSS.

Quiz App

A modern quiz application built with FastAPI and Tailwind CSS.

Features

  • Create and manage quizzes
  • Add multiple-choice questions to quizzes
  • Take quizzes with a clean, responsive UI
  • Track your progress and see your score
  • Mobile-friendly design

Tech Stack

  • Backend: FastAPI (Python)
  • Frontend: HTML, CSS, JavaScript, Tailwind CSS
  • Database: In-memory storage (can be extended to use a real database)

Requirements

  • Python 3.7+
  • pip (Python package installer)

Setup and Installation

  1. Clone this repository or download the project

  2. Create a virtual environment (optional but recommended):

    python -m venv venv
    
  3. Activate the virtual environment:

    • Windows:
      venv\Scripts\activate
      
    • macOS/Linux:
      source venv/bin/activate
      
  4. Install the required dependencies:

    pip install -r requirements.txt
    

Running the Application

  1. Start the FastAPI server:

    python main.py
    

    Alternatively, you can use Uvicorn directly:

    uvicorn main:app --reload
    
  2. Open your browser and navigate to http://localhost:8000

API Documentation

Project Structure

quiz-app/
├── main.py           # FastAPI application
├── requirements.txt  # Project dependencies
├── static/           # Static files (CSS, JS)
│   ├── css/
│   │   └── style.css
│   └── js/
│       └── main.js
└── templates/        # Jinja2 templates
    ├── base.html
    ├── index.html
    ├── quiz.html
    └── admin.html

Future Enhancements

  • User authentication and user-specific quizzes
  • Persistent database storage (PostgreSQL, SQLite, etc.)
  • Quiz categories and tags
  • More question types (true/false, fill-in-the-blank, etc.)
  • Timed quizzes
  • User statistics and performance tracking

License

MIT

Top categories

Loading Svelte Themes