Salam Hackathon Project β AI-powered educational platform for Grades 10-12. Combines RAG-based syllabus search, AI tutoring, and adaptive content generation using LangChain + Google Gemini.
Darajat (Ψ―Ψ±Ψ¬Ψ§Ψͺ = "Grades" in Arabic) is a hackathon prototype built for the Salam Hackathon. An AI-powered educational platform targeting Grades 10-12 students in Sudan, providing intelligent tutoring, syllabus-aligned content generation, and adaptive learning paths using RAG over curriculum data.
darajat/
βββ backend/ # Bun + Express + TypeScript
β βββ src/
β β βββ routes/
β β β βββ coach.ts # AI Tutoring endpoint
β β β βββ content.ts # Content generation
β β β βββ plan.ts # Learning plan generation
β β β βββ index.ts # Route aggregation
β β βββ middleware/
β β β βββ loggerMiddleware.ts
β β βββ syllabus/ # Curriculum data (JSON)
β β β βββ G10.json
β β β βββ G11.json
β β β βββ G12.json
β β βββ lib/
β β β βββ llm.ts # Google Gemini 1.5 Pro config
β β β βββ coachChain.ts # LangChain RAG chain
β β β βββ contentGenerator.ts
β β β βββ material.ts
β β β βββ planner.ts
β β β βββ syllabus.ts
β β βββ types/
β β β βββ contentResponse.ts
β β β βββ plannerResponse.ts
β β βββ index.ts # Express app entry
β βββ package.json
β βββ tsconfig.json
β βββ README.md
βββ frontend/ # Static JSON lessons
β βββ Lessons/
β βββ MathG10.json
β βββ MathG11.json
β βββ MathG12.json
β βββ ScienceG10.json
β βββ ScienceG11.json
β βββ PhysicsG11.json
βββ erd.md # Entity Relationship Diagram
βββ schema-definition.md # Database schema
βββ package.json # Root scripts
βββ README.md
| Category | Technologies |
|---|---|
| Runtime | Bun (primary) / Node.js |
| Language | TypeScript 5+ |
| Framework | Express.js 4.21+ |
| AI/ML | LangChain, LangChain-Google-GenAI, LangChain-Core |
| LLM | Google Gemini 1.5 Pro (gemini-1.5-pro) |
| RAG | LangChain Runnables, PromptTemplate |
| Validation | Zod (planned) |
| Logging | Custom middleware |
git clone https://github.com/oovaa/darajat.git
cd darajat
# Backend
cd backend
bun install
bun run dev # Starts on http://localhost:3000
# Frontend lessons are static JSON
# Serve with any static server or use frontend framework# backend/.env
GOOGLE_API_KEY=your_gemini_api_key
PORT=3000POST /coach
Content-Type: application/json
{
"information": "The first law of thermodynamics states that energy cannot be created or destroyed...",
"question": "How does the first law apply to closed systems?"
}Response:
{
"answer": "The first law of thermodynamics states that in a closed system, the total energy remains constant..."
}POST /content
Content-Type: application/json
{
"grade": "G11",
"subject": "Mathematics",
"topic": "Quadratic Equations",
"difficulty": "medium"
}POST /plan
Content-Type: application/json
{
"grade": "G12",
"subjects": ["Mathematics", "Physics"],
"duration_weeks": 12,
"hours_per_week": 10
}// backend/lib/coachChain.ts
const coach = `
## Context:
{information}
## Question:
{question}
## Task:
Answer the provided question based on the given information
## Response:
`
const coach_prompt = PromptTemplate.fromTemplate(coach)
const chain = RunnableSequence.from([coach_prompt, llm])
export async function coachAnswer(information: string, question: string) {
const response = await chain.invoke({ information, question })
return { answer: response.content }
}Flow:
- Retrieve relevant syllabus context from G10/G11/G12 JSON
- Augment prompt with retrieved information
- Generate answer using Gemini 1.5 Pro
- Return structured response
| Grade | Subjects | Format |
|---|---|---|
| G10 | Mathematics, Science | JSON |
| G11 | Mathematics, Science, Physics | JSON |
| G12 | Mathematics, Science | JSON |
Sample Structure (backend/src/syllabus/G11.json):
{
"subjects": [
"Equations and Functions",
"Variable Expressions",
"Order of Operations",
"Patterns and Equations",
"Equations and Inequalities",
"Functions as Rules and Tables",
"Functions as Graphs",
...
]
}| Category | Technologies |
|---|---|
| Runtime | Bun (primary) / Node.js 20+ |
| Language | TypeScript 5+ (ESM) |
| Framework | Express.js 4.21+ |
| AI/ML | LangChain, LangChain-Google-GenAI, LangChain-Core |
| LLM | Google Gemini 1.5 Pro (gemini-1.5-pro) |
| RAG | LangChain Runnables, PromptTemplate, RunnableSequence |
| Validation | Zod (planned) |
| Dev Tools | Bun --watch, TypeScript 5+, ESLint |
git clone https://github.com/oovaa/darajat.git
cd darajat
# Backend
cd backend
bun install
bun run dev # http://localhost:3000
# Frontend lessons (static JSON)
# Serve with any static server or integrate with React/Vue// backend/package.json
{
"scripts": {
"dev": "bun --watch index.ts",
"start": "bun index.ts"
}
}Built for Salam Hackathon β addressing educational gaps in Sudan with AI-powered, curriculum-aligned tutoring for Grades 10-12.
- Limited access to quality tutoring
- Curriculum misalignment with available resources
- No adaptive learning for Sudanese curriculum
- RAG over Sudanese curriculum (Grades 10-12)
- Gemini 1.5 Pro for high-quality Arabic/English responses
- Modular chains for coaching, content generation, planning
- Offline-first JSON syllabus data
- Vector database integration (Qdrant/Pinecone) for better RAG
- Frontend React/Next.js application
- User authentication & progress tracking
- Multi-language support (Arabic/English)
- Offline sync capability
- Teacher dashboard for content management
- Assessment & quiz generation
- Voice interface for accessibility
MIT License - see LICENSE for details.
Omar Abdulrahim
GitHub: @oovaa
Salam Hackathon Participant