Skip to content

JaidevSK/Brahmi-Tutor-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brahmi Script Learning Application

This is a FastAPI-based web application designed to help users learn the ancient Brahmi script. It provides an interactive learning experience through structured character lessons, multiple-choice quizzes, progress tracking, and an integrated AI assistant powered by a local LLM.

Features

  • Script Lessons (/lesson): A reference page mapping Brahmi characters to their Devanagari counterparts and phonetic sounds.

  • Interactive Quizzes (/quiz/{number}): Test your knowledge with three different quiz modes:

  • Quiz 1: Translate Brahmi characters to Devanagari.

  • Quiz 2: Identify the correct Brahmi character based on its phonetic sound.

  • Quiz 3: Translate common Devanagari vocabulary (fruits, cities, seasons, etc.) into Brahmi.

  • Progress Dashboard (/progress): Uses a local SQLite database (progress.db) to track and display your latest scores across all quiz types.

  • AI Helper (/llm_helper): An interactive chatbot powered by a local Ollama model (gemma3:270m) that can answer questions about the script and provide guided help. Markdown responses are supported for rich text formatting.

  • Brahmi Converter (/brahmi_converter): A dedicated interface for converting text (implementation relies on the corresponding frontend template).

Prerequisites

Before running this application, ensure you have the following installed:

  1. Python 3.7+
  2. Ollama: Installed and running locally. You must pull the specified model before using the LLM helper:
ollama run gemma3:270m

Installation

  1. Clone or download the project files.
  2. Install the required Python packages:
pip install fastapi uvicorn jinja2 python-multipart markdown

Project Structure

Ensure your project directory is organized as follows for the application to serve the frontend correctly:

your_project_folder/
│
├── main.py               # The main FastAPI application code provided above
├── progress.db           # Auto-generated SQLite database for scores
├── static/               # Directory for static assets (CSS, JS, images)
└── templates/            # Directory for Jinja2 HTML templates
    ├── welcome.html
    ├── lesson.html
    ├── progress.html
    ├── quiz_start.html
    ├── quiz_question.html
    ├── quiz_result.html
    ├── llm_helper.html
    └── brahmi_converter.html

How to Run

  1. Open your terminal and navigate to the directory containing your script (e.g., main.py).
  2. Start the FastAPI server using Uvicorn:
uvicorn main:app --reload
  1. Open your web browser and navigate to: http://127.0.0.1:8000/

Database Details

The application automatically initializes an SQLite database (progress.db) upon startup if it does not already exist. It creates a results table with the following schema to log quiz sessions:

  • id (INTEGER, Primary Key)
  • quiz_type (TEXT)
  • score (INTEGER)
  • timestamp (TEXT)

About

The FastAPI-based web application designed to help users learn the ancient Brahmi script. It provides an interactive learning experience through structured character lessons, multiple-choice quizzes, progress tracking, and an integrated AI assistant powered by a local LLM.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors