
Project 01
LeetLab
A mobile LeetCode client with a server-side judge.
Browse problems, write JavaScript, Python or Java in the app, and submit against hidden test cases with a per-case verdict.
Overview
- Problem
- Practising data structures and algorithms usually means sitting at a desktop browser. LeetLab brings the browse, solve and submit loop to a phone.
- Who it is for
- Students and engineers who want to practise in short sessions without opening a laptop.
- What it does
- An Expo app with a problem library, an in-app editor and a judge that returns Accepted, Wrong Answer or Error with per-case detail.
What I built
- Problem library with search, tag filters and explicit loading, error and empty states.
- Problem detail with statement, examples, hints, constraints and acceptance rate.
- In-app editor with JavaScript, Python and Java starter templates.
- Judge result screen with passed count and expected-versus-actual output.
- Google Sign-In through Supabase, with protected tabs and a persisted session.
- Profile with an activity heatmap and sign-out.
Engineering
Client
Expo Router app with Zustand stores. Problem data is read from Supabase Postgres.
Judge API
POST /api/submit verifies the bearer JWT, loads hidden test cases with the service-role key, calls a Judge0-compatible CodeBox instance and compares stdout.
Data access
Supabase row-level security protects user data, and column-level grants keep test_cases out of every client read.
Difficulty
Difficulty is derived from acceptance rate at read time (60% or more is Easy, 40% or more is Medium, otherwise Hard) instead of stored as a column.
Delivery
EAS Build with continuous native generation, so there are no checked-in ios/ or android/ directories.
Challenges & tradeoffs
Keeping hidden tests hidden
The judge needs the test cases; the client must never see them. The submission route is the only reader and uses the service role, while the table is not readable from the app.
Normalising judge output
CodeBox responses include compile and runtime failures. The API maps them into one verdict shape so the result screen can render per-case output consistently.
One session across app and API
Tabs and the submit route both depend on the Supabase session, while the API still has to be reachable from a physical device during development.
Stack
- App
- React NativeExpoExpo RouterTypeScriptZustand
- Backend
- Supabase AuthPostgresRow-level securityExpo server route
- Judge
- CodeBox (Judge0-compatible)
- Delivery
- EAS Build



