The Problem Nobody Was Solving
Every year, 1.2 million South Africans sit for the DLTC learner's licence test. More than half fail.
That number isn't a statistic Ā· it's a blocked job opportunity. In a country where youth unemployment exceeds 45%, a driver's licence is literally a job offer. Courier services. Taxi operations. Delivery roles. Logistics positions. Each of these requires that laminated card. Each failure delays economic participation by months.
The existing alternatives? Costly. Ad-heavy. Outdated. Designed for markets with reliable infrastructure, mid-range devices, and users who can absorb a R500 study book.
I built K53 Drill Master for everyone else.
The Design Philosophy: Minimum Stack, Maximum Access
Before writing a single line of code, I made a decision that shaped everything: no UI framework dependencies.
No Tailwind. No shadcn. No component library. Just React 18, Vite 5, and inline styles with a carefully designed colour palette drawn from the South African flag Ā· #007A4D green, #FFB612 gold, #DE3831 red.
Why? Because the target user is on a budget Android phone, often on 3G. Every kilobyte of JavaScript that isn't earning its keep is a barrier between a learner and the knowledge they need.
The result: a PWA that loads in under 2 seconds on 3G. That's not a performance benchmark Ā· it's an accessibility requirement.
Architecture: A State Machine Without a Router
The navigation pattern was a deliberate architectural choice. No React Router. No URL-based routing. Instead, a single app-level state machine:
const [activeGame, setActiveGame] = useState(null);
// null ā home screen
// "gauntlet" | "hybrid" | "patterns" | "roadrules" | "mockexam" | "progress"
Each drill mode receives a single onBack prop. Internal screens manage their own local state independently. This produces an app that behaves like a native mobile experience Ā· no page refreshes, no loading states between screens, no browser history management complexity.
For a study app where a learner might switch between drill modes 50 times in a session, this matters.
Five Drill Modes, One Mission
The content architecture mirrors the actual DLTC test structure:
| Mode | Questions | Purpose | |------|-----------|---------| | Code 8 Gauntlet | 90 | Covers every K53 category systematically | | Hybrid Gauntlet | 100 | Questions that trip real candidates | | Know Your Numbers | 41 + speed mode | Pattern drilling of K53 numeric values | | Road Rules Gauntlet | 120 | Organized by vehicle code | | Mock Exam | 68 | Full DLTC format: 45-min timer, 75% pass mark |
Every question derives from two official South African Traffic Department publications: Rules of the Road and Manual on Road Traffic Signs. No third-party condensations. No estimation. The same source documents the actual test draws from.
This matters legally and pedagogically. A learner shouldn't have to unlearn anything when they sit in that exam chair.
The Payment Flow: PayFast as the Great Equaliser
Implementing PayFast for a R29/month product taught me more about SA fintech than any course could.
The subscription flow:
User pays via PayFast
ā PayFast ITN fires ā /api/notify ā upsert subscribers table
ā User redirected to /?unlock=TOKEN
ā /api/verify validates token ā storePremiumToken() in localStorage
ā AuthModal opens ā user enters email
ā /api/claim ā creates Supabase auth user ā sends magic link
ā User clicks link ā onAuthStateChange fires ā checkSubscription()
ā Supabase RLS: SELECT WHERE auth.uid() = user_id AND expires_at > NOW()
ā Premium unlocked
The freemium boundary is enforced at the component level using localStorage: 10 free questions daily, resetting at midnight. When the gate fires, the upgrade modal appears with clear, non-manipulative pricing.
R29/month. Less than bread and two litres of milk. R69 for 3 months Ā· less than a single bus week for rural learners who make one trip to the test centre and need to pass.
AI Tutor: GPT-4o-mini as the Patient Explainer
When a user gets a question wrong, an Explain This button appears. This triggers GPT-4o-mini with a carefully engineered prompt:
- Question context
- Correct answer
- Relevant K53 rule reference
- Instruction to respond in plain South African English, 2ā3 sentences max
Responses are cached per question in memory for the session. This keeps API costs manageable (gpt-4o-mini at fraction-of-a-cent per call, cached for reuse) while providing genuine pedagogical value.
The AI tutor isn't a chatbot. It's a precise, contextual explainer that does one job perfectly.
Supabase RLS: Security That Scales to Zero
The subscribers table has exactly one policy:
create policy "own row" on subscribers
for select using (auth.uid() = user_id);
Users can only see their own subscription. No admin panel needed. No server-side session management. Supabase's Row-Level Security handles authorisation at the database layer Ā· meaning even if someone found the Supabase URL, they couldn't read another user's data.
This is how you build a secure subscription product solo, without a backend team.
What I Learned
On pricing for impact: R29 wasn't chosen by A/B testing. It was chosen by asking what does R29 mean to a learner on a prepaid budget? Less than data for a week. Accessible. Not free (free devalues learning), but not a barrier.
On stack minimalism: Every dependency is a potential failure point. A zero-dependency frontend that works on 3G is a product decision, not a technical compromise.
On using AI as a tool, not a feature: The AI tutor exists because it genuinely helps learners understand why they got something wrong. It's not there to look impressive. That distinction matters.
The Numbers
- 50+ paying subscribers at R29/month
- 4.8/5 user rating
- 1.2M+ South Africans sit the K53 test annually, the addressable market
- Zero framework dependencies in the frontend
A driving licence is a job offer. K53 Drill Master makes sure everyone gets to say yes.
Built by Nandawula Regine Kabali-Kagwa, AI Engineer & Creative Technologist, East London, South Africa. Tech: React 18, Vite 5, Supabase, PayFast, OpenAI gpt-4o-mini, Vercel
Reader Insights
0 responses
No insights yet. Be the first!