INFRACTRUTURE API FOR AFRICA LEARNING SYLLABLES
# AfriLearn Curriculum API
> **The open digital backbone & curriculum data layer for African educational technology, school portals, edtech apps, and AI Tutors.**
> **BECE (JSS1-3) · WAEC (SS1-3) · JAMB UTME · NUC CCMAS Degrees · NBTE Polytechnics · Open Data (MIT License) · AI Tutor LLM Prompts · Interactive Swagger Docs**
---
## 🌍 Open Data & Community Commitment
All raw curriculum datasets in `data/curricula/` are **100% open-source under the MIT License**. Anyone can clone, use, extend, or contribute datasets to improve educational data access across Africa.
- **Datasets Location**: `data/curricula/` — 56 JSON files covering 14 institutions & exam boards
- **Contribution Guide**: `CONTRIBUTING.md` — schema rules, validation CLI, and PR workflow
- **Benchmark Report**: `BENCHMARK_REPORT.md` — Claude Sonnet 4.6 baseline vs AfriLearn System (16 scenarios, +90.4% gain)
- **Full Evaluation Suite**: `questionstest.md` — 1,147-line parallel A/B test across 6 curriculum levels
- **Technical Roadmap**: `ROADMAP.md` — 6-phase engineering plan (embeddings, progress tracking, adaptive pathways)
---
## 🌟 What We've Built
AfriLearn is a **production-grade curriculum backend + LLM system prompt engine** purpose-built for African educational AI. Here is everything in the system:
### Core Infrastructure
| Component | File(s) | Description |
|---|---|---|
| **HTTP API Server** | `cmd/api/main.go` | Gin-based REST API with middleware, rate limiting, API key auth |
| **Database Layer** | `internal/database/` | PostgreSQL connection pool with `pgvector` extension support |
| **Schema & Migrations** | `cmd/migrate/main.go` | Auto-deploys all tables, GIN FTS indexes, PGVector HNSW column |
| **Curriculum Ingestion Engine** | `internal/ingestion/engine.go` | Reads 56 JSON files → upserts to PostgreSQL (idempotent) |
| **Data Seeder** | `cmd/seeder/main.go` | Runs ingestion for all datasets with `--validate-only` flag |
| **In-Memory Cache** | `internal/cache/` | Thread-safe L …