Project Info
Inspiration
Quran learning often requires moving between separate tools for reading, tafsir, memorisation, vocabulary, and personal consistency. We wanted to create one calm, focused learning space that helps learners return to the Quran every day without making AI the source of truth.
What it does
NoorPath is a browser-based Quran learning prototype built around a local Quran corpus. Users can: Read the Quran by Surah, Ayah, or global ruku. Switch between English and Urdu translations. View local ayah-level tafsir and word-by-word Arabic vocabulary. Practise Hifz with pause-mark-aware continuation questions. Study a ruku through grouped tafsir lessons and vocabulary quizzes. Track daily habits including salah, reading, Hifz, lessons, vocabulary, charity, and social-media time. Optional AI features can create a short ruku overview, a five-question quiz, and a lesson Q&A response. These features are supplementary: they are grounded in the selected local tafsir context and never replace canonical Quran text or verified tafsir.
How we built it
NoorPath is a static web application built with vanilla JavaScript, HTML, and CSS. The Quran corpus, translations, metadata, tafsir, and vocabulary are stored locally as JSON. We separated data access into focused services: the Quran service handles Surah and ruku lookup, while tafsir and vocabulary services lazy-load and cache data for the active Surah. Browser localStorage keeps progress private to the learner’s device. The interface uses a lightweight state-driven renderer, delegated events, responsive styling, and RTL-aware Arabic presentation. Optional Gemini requests are isolated in their own service and receive only the selected study context.
Challenges we ran into
The main challenge was balancing useful AI assistance with the sensitivity of Quranic study. We kept canonical Quran data and generated content separate, restricted AI context to the selected local tafsir excerpts, and made AI optional. We also worked through Arabic-specific UI details: right-to-left layout, word display, and splitting Hifz practice at meaningful pause marks without breaking a word. Finally, we designed the app to remain useful even when optional AI or supporting local files are unavailable.
What we learned
We learned that trustworthy learning tools need clear source boundaries, not only polished AI features. Local-first data, narrow AI context, graceful fallbacks, and simple service boundaries made NoorPath easier to reason about and safer to extend. We also learned how much product quality depends on small interaction details: progress should be private and reliable, Arabic should render naturally, and memorisation feedback should encourage learners to continue after a wrong answer.
What's next
Next, we would add scholar-reviewed and fully attributed source material, a secure backend for cross-device progress, authentication, citations for generated responses, and a production-safe server-side AI integration.
NoorPath
NoorPath is a vanilla-JavaScript Quran study app. Quran reading, tafsir display, vocabulary, Hifz practice, and progress tracking are local-first browser features. Optional AI study features use a Vercel serverless RAG endpoint backed by Qdrant.
Run locally
Install the Node dependencies first:
npm install
For local reading-only work, serve the repository with a static server:
python -m http.server 8000
For the AI study features, use Vercel's local runtime so /api/ask is available:
npx vercel dev
Do not open index.html directly: the app fetches its local data files.
Features
- Read the full Quran by Surah, Ayah, or any of the 556 global rukus, with Arabic plus English or Urdu translation.
- View local ayah-level tafsir and word-by-word Arabic vocabulary.
- Practise Hifz through pause-mark-aware continuation questions.
- Study a ruku through grouped local tafsir, RAG-grounded summaries and quizzes, and source-backed Q&A.
- Explore Arabic vocabulary by ruku, surah, or starting letter, including a ruku vocabulary quiz.
- Track a private daily journey: salah, wellbeing, reading, Hifz, lesson, vocabulary, charity, and social-media habits. Progress, streaks, and points remain in browser
localStorage.
RAG architecture
scripts/ingest.jsreads everydata/tafsir/<surah>.jsonfile and groups adjacent ayahs with exactly identical tafsir text into one chunk.- Each chunk stores a stable readable ID, surah, ayah range, Arabic ayahs, English translations, and tafsir. Its tafsir is embedded with
sentence-transformers/all-MiniLM-L6-v2(384 dimensions). - The vectors and payloads are upserted to Qdrant collection
noorpath_tafsirusing cosine distance. The ingestion script also creates the integer payload index onsurah, which scoped ruku retrieval requires. api/ask.jsembeds a question with the same model, retrieves the five most relevant chunks, builds Gemini context from ayah text and tafsir, and returns an answer with source references.src/ragService.jsis the browser boundary for the endpoint.askRag(question)posts{ question }to/api/askand returns{ answer, sources }; the lesson summary and quiz helpers use the same endpoint internally.
Run the tafsir ingestion after configuring the environment variables below:
npm run ingest:tafsir
The current corpus produces 1,896 grouped tafsir chunks. Rerunning ingestion is safe: deterministic point IDs update the existing Qdrant points.
Data and AI boundaries
- Canonical Quran text, translations, metadata, ruku navigation, Hifz prompts, tafsir display, vocabulary, and progress are local features; they do not rely on AI.
- The bundled corpus contains 114 surahs, 6,236 ayahs, and 556 rukus. Tafsir and word data are lazy-loaded per surah; the word index supports full-Quran letter browsing.
- AI output is supplementary study material, grounded in retrieved tafsir chunks, and is not a replacement for verified tafsir or primary scholarly sources.
- Generated material remains separate from canonical Quran records.
Project structure
| Area | Responsibility |
|---|---|
index.html | Static app shell, navigation, fonts, and stylesheets. |
src/app.js | Client-side state, rendering, event handling, study flows, and local progress. |
src/quranService.js | Canonical Quran corpus access, Surah/ruku lookup, and study-context construction. |
src/ragService.js | Browser client for /api/ask; exposes RAG Q&A plus lesson summary and quiz helpers. |
api/ask.js | Vercel serverless RAG endpoint: Hugging Face embeddings, Qdrant retrieval, and Gemini generation. |
src/tafsirService.js / src/vocabularyService.js | Cached, lazy-loaded per-surah tafsir and word-by-word vocabulary. |
src/wordIndexService.js | Cached full-Quran word index used by Arabic letter browsing. |
scripts/ingest.js | Builds grouped tafsir chunks, embeddings, Qdrant points, and the surah payload index. |
data/ | Local Quran corpus, schema, tafsir, vocabulary, and word-index files. |
docs/ | Development history and project documentation. |
Practices and methodology
- Local-first: the core Quran study experience remains usable without AI services.
- Service boundaries: the UI uses focused corpus, tafsir, vocabulary, and RAG services rather than accessing data or credentials directly.
- Grounded generation: server-side prompts receive retrieved ayah text and tafsir only; returned source ranges are displayed under lesson answers.
- Secret isolation: Hugging Face, Qdrant, and Gemini credentials stay in environment variables on the server.
- Simple frontend: vanilla ES modules, a single state-driven renderer, delegated events, guarded
localStorage, and responsive/RTL styling keep the client lightweight.
Team contributions
- M. Mahad Amir — led the app’s design and implementation, including the static architecture, normalized Quran corpus, service layer, ruku navigation, Hifz, Arabic vocabulary, lessons, journey tracking, UI refinements, and documentation.
- Syed Muhammad Areeb — integrated the initial dynamic Gemini reading, quiz, and chat features; later refactored the reading/vocabulary views and helped remove the exposed API key.
- Faaiq Ahmed — led the local data-layer work, including tafsir and word-vocabulary additions, ruku-navigation and vocabulary enhancements.
Contributions above reflect the repository’s Git history.
Analysis
View
Metric
- 29
- 5
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- HTMLIn code
- JavaScriptIn code
- Google GeminiClaimed
3 of 4 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
133 KB
Source files
16
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
M-Mahad-Amir/OpenAI__build-week
251 files · 52.7 MB · @ 8dd38ed
Structure
Interface
1 file · 0%Screens, components and styles rendered to the user.
API & routing
1 file · 0%Request entry points: routes, handlers and controllers.
Application logic
242 files · 96%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- JavaScript70%
- Markdown22%
- CSS6%
- HTML2%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 2- @qdrant/js-client-rest
- dotenv
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.