Inspiration

Africa is not lacking talented students who want to learn technology. The bigger problem is access. Many students rely on affordable or refurbished laptops with limited RAM, inconsistent internet connectivity, expensive cloud services, and limited access to personalized programming support.

We were inspired by the idea that AI education should not depend on owning a powerful computer or having a constant internet connection.

The Africa Deep Tech Challenge's focus on making language-model applications run on an 8 GB commodity laptop made us ask:

What if a student could have an AI programming tutor that runs entirely on the laptop they already own?

That question led to CodeTutor Africa.

What it does

CodeTutor Africa is an offline-first AI coding tutor designed for students and aspiring developers across Africa.

It combines a lightweight local language model with programming education tools to help learners:

Learn programming concepts through an AI tutor. Ask questions and receive explanations. Practice programming problems. Debug their code. Run and evaluate code locally. Track their learning progress. Play programming and algorithm games. Learn without depending on cloud AI APIs. Continue learning when internet connectivity is unavailable.

The platform supports multiple programming languages, including Python, JavaScript, TypeScript, Java, and SQL.

The goal isn't simply to put an LLM on a laptop. We are engineering the entire system around constrained hardware so that the AI remains useful while respecting the limits of an 8 GB RAM, CPU-only laptop.

How we built it

We designed CodeTutor Africa as a lightweight modular system.

The frontend is built with React and provides the learning dashboard, AI tutor, coding practice, debugger, progress tracking, and programming games.

The backend is built with Python and FastAPI, using a modular architecture: React Frontend │ ▼ FastAPI │ ┌─────┴──────────┐ ▼ ▼ Services SQLite │ ├── Tutor ├── Practice ├── Debugger ├── Learning ├── Progress └── Games │ ▼ Code Execution Engine │ ├── Python ├── JavaScript ├── TypeScript ├── Java └── SQL We use SQLite because the application needs to operate locally without requiring a database server.

For programming exercises, we built a lightweight local execution layer that runs submitted code in isolated subprocesses with execution time, output, and resource limits.

The AI layer is designed around an abstraction so that the application can eventually connect to a quantized GGUF model through llama.cpp without coupling the rest of the application directly to a specific model.

We are also designing the system around the official ADTC profiler, allowing us to measure the metrics that actually matter for the challenge: Sₜₒₜₐₗ = 0.50Sₐcc + 0.30Sₚₑᵣf + 0.20Sₑff − Pₜₕₑᵣₘₐₗ ​​ This means we cannot optimize only for model quality. We have to balance accuracy, inference speed, memory consumption, and thermal performance.

Challenges we ran into

The biggest challenge has been designing an AI system that is useful while operating under severe resource constraints.

An 8 GB laptop with integrated graphics is very different from the machines normally used to run modern AI models.

We therefore had to think carefully about: Model size and quantization. RAM consumption. CPU-only inference. Context length. Inference latency. Concurrent operations. Local storage. Offline operation. Safe code execution.

Another major challenge was allowing students to execute code without allowing untrusted programs to compromise the application.

We avoided approaches such as eval() and exec() and designed a controlled execution architecture using language-specific subprocess runners, strict timeouts, bounded output, temporary workspaces, and isolated in-memory databases for SQL exercises.

We also had to ensure that adding AI capabilities would not turn the application into a resource-heavy platform that defeats the purpose of the challenge.

Accomplishments that we're proud of

We are proud that CodeTutor Africa is being designed from the hardware constraints upward, rather than taking a cloud application and simply trying to make it smaller.

Some of our key accomplishments include:

Building an offline-first architecture. Creating a modular FastAPI backend. Building a React learning interface. Deploying the frontend. Designing a local SQLite data layer. Building a multi-language code execution architecture. Supporting Python, JavaScript, TypeScript, Java, and SQL execution. Adding offline programming games. Designing the system around local GGUF inference. Planning benchmarking around the official ADTC profiler. Prioritizing memory and CPU efficiency as first-class engineering requirements.

Most importantly, we are building toward a system where the absence of internet access does not mean the absence of an AI tutor.

What we learned

This project taught us that building an AI application for constrained hardware is fundamentally different from simply calling an API.

We learned that the model is only one part of the system.

Performance depends on the entire stack: Model ↓ Quantization ↓ Runtime ↓ Memory management ↓ Application architecture ↓ Retrieval ↓ User experience

We also learned the importance of measuring rather than assuming. A smaller model is not automatically better, and a more capable model is not necessarily practical on an 8 GB laptop.

The ADTC benchmarking requirements pushed us to think about AI as a systems engineering problem, where accuracy, latency, RAM usage, CPU utilization, and thermal behavior must all be considered together.

What's next for CodeTutor Africa

Our next major milestone is integrating and benchmarking a quantized local GGUF language model through llama.cpp.

We will evaluate different models on the ADTC Standard Laptop and optimize for:

Accuracy. Tokens per second. First-token latency. Peak RAM. CPU utilization. Thermal behavior.

We also plan to add local RAG using programming course materials, improve personalized learning recommendations, expand the offline game library, and strengthen the code-execution isolation layer.

Ultimately, we want CodeTutor Africa to become more than an AI coding assistant.

We want it to demonstrate that high-quality AI-powered education can be made accessible on the hardware that students across Africa can actually afford.

Built With

Share this project:

Updates

Submission history