Appearance
CP System ("God's Will")
A 600-problem competitive-programming practice set organized as timed contests, with solve verification against Codeforces itself rather than a local judge. It's the section with the most unusual design decisions, all downstream of one fact: the problems are real CF problems, so CF is the source of truth for "solved."
Structure
Problems are grouped into tests → contests (routes /cp/:testId/:contestId). The set was ingested from a curated Excel sheet via tools/convert-sheet.mjs into src/data/cpTests.js; a later audit found 11 duplicate problems across tests, which were identified programmatically and replaced — the ingestion script now flags duplicates so the class of bug can't silently return.
Problem bodies (editorial scaffolds, hints, solution write-ups — one markdown file per problem, 1:1 with cpTests.js) are the one content section served from CDN (jsDelivr) instead of Pages, keeping 600 files outside the deployment budget (Question Bank).
Contest timers
Contest timers are Firestore-backed: the attempt document's server startedAt is the source of truth, so a refresh mid-contest resumes the countdown exactly (the same integrity model as the OA Simulator, and the original reason auth persistence moved to indexedDBLocalPersistence).
Solve verification via Codeforces
Marking a problem solved isn't an honor-system checkbox. The client calls the CF proxy Functions (cf-profile, cf-status) — which exist because Codeforces has no CORS and needs polite rate-limiting — and checks the user's recent submissions for an OK verdict on that exact problem. The user's CF handle comes from Settings. Verified solves update progress/{uid} and the dashboard rating card.
Hidden metadata
Each problem's rating/tags are hidden until solved or revealed — deliberately, because seeing "DP, 1900" before attempting changes how you attempt. Reveal is per-problem, recorded, and factored into how the attempt is displayed afterward.
Drafts that survive
useCodeDraft persists in-progress code per problem to localStorage immediately and Firestore debounced — the two-tier design means a tab crash loses nothing (local) and switching devices loses at most the debounce window (remote). The same hook backs the IDE and DSA editors.
CP Solutions
/cp-solutions (CpSolutions.jsx) is the editorial companion: all 600 write-up scaffolds, grouped by topic with a sticky Quick Navigation rail. It uses the standard lazy body-loading path, so opening the page costs an index shard, not 600 markdown fetches.
Known sharp edges
- CF's API rate-limits aggressively; the proxy batches and backs off, but a user hammering "verify" can still hit a cooldown — surfaced as a friendly retry message, not an error.
- Handle typos look like "never solved anything"; Settings validates the handle against
cf-profileat save time to catch this early.