LeetCode

A graded problem bank and judge for practicing coding interviews, plus company-tagged questions and editorials behind a paid tier.

NOT REALLY · consider alternatives
price $35/mosubscription / year $420estimated build time a weekendreplaced by 0 people

An agent can produce a Monaco editor, a problem list, a submissions table and a Judge0 sandbox in a session, and none of that is the product. LeetCode is a content and coordination asset: thousands of curated problems with hidden test cases that actually catch off-by-one and TLE, editorials, company frequency tags, and the social fact that interviewers pull questions from it, which you cannot self-host. Clone the harness and you sit staring at an empty problems directory; authoring good problems with adversarial test cases is the actual job. Build the trainer if you want a private drill rig over problems you have already seen, but do not pretend it replaces the bank.

Build verification: not recorded. How we judge buildability

What you give up

  • The problem bank itself, thousands of problems with hidden tests tuned to catch the specific ways people get it wrong
  • Company tags and frequency data, which is the main reason people pay for Premium
  • Editorials and the discussion threads where the actual learning happens
  • Contests, ratings, and the mild public humiliation that makes you keep showing up
  • Any signal that you are practicing the same questions your interviewer will ask

Why people still pay

Because thirty-five dollars for the month before an onsite is trivially cheap against the salary delta, and because nobody wants to author their own curriculum while also preparing for interviews. Premium buys company-filtered lists and editorials, which is a shortcut through the one resource candidates are actually short on: time. A self-hosted drill app competes on none of that. It competes on being a nicer place to redo problems you already understand, which is a real but much smaller need.

Your build guide

The stack, security requirements, and agent rules for a focused replacement.

Before you start

  • Docker installed and a willingness to trust your own container flags with untrusted code
  • Your own problem statements and test cases, written by hand or from openly licensed sets
  • Python 3.11 and Node for the app itself
  • Time budget for the boring part: authoring adversarial test cases, not the UI
01
Stack, not negotiable: Python 3.11 with FastAPI on the backend, SQLite through SQLAlchemy, a Vite + React + TypeScript frontend using the Monaco editor, Docker for code execution. Do not add auth. Do not add a hosted judge API.
02
Store every submission in SQLite: slug, language, code, verdict, runtime, timestamp. I want to diff my third attempt against my first.
03
Interface for this coding interview prep workflow: a local web page with input, progress, review, and export views.
engineering roadmap

Implementation plan

1

Phase 1, architecture and data

Stack, not negotiable: Python 3.11 with FastAPI on the backend, SQLite through SQLAlchemy, a Vite + React + TypeScript frontend using the Monaco editor, Docker for code execution. Do not add auth. Do not add a hosted judge API. Store every submission in SQLite: slug, language, code, verdict, runtime, timestamp. I want to diff my third attempt against my first.

2

Phase 2, implement

Review queue: SM-2 style spaced repetition over solved problems. Correct solve pushes the next due date out, a failure resets it. GET /api/due feeds a Today view that tells me what to redo.

3

Phase 3, implement

Explicitly out of scope: contests, leaderboards, other people's solutions, discussion threads, company tags, languages beyond Python and JavaScript, mobile layout, deployment.

4

Phase 4, review and output

A local judge that runs your submitted Python or JavaScript against test cases in Docker, stores every attempt, and resurfaces solved problems on a spaced repetition schedule. Explicitly out of scope: contests, leaderboards, other people's solutions, discussion threads, company tags, languages beyond Python and JavaScript, mobile layout, deployment.

5

Phase 5, recovery and acceptance

Execution: POST /api/run accepts {slug, language, code} and runs it in a throwaway Docker container. Only python:3.11-slim and node:20-slim images. Flags: --network none, --memory 256m, --cpus 0.5, --pids-limit 64, read-only root filesystem, non-root user, 5 second wall clock kill. Wrap the submitted function with a harness that feeds each test case and compares output. Return per-test pass or fail, stderr, and runtime in milliseconds. Never execute submitted code outside Docker, not even in dev mode, not even as a fallback. Verify this invariant with a saved fixture: An invalid input or interrupted operation must retain the source and show a recoverable state; exported records must reload with the same IDs. State the practical limit: The problem bank itself, thousands of problems with hidden tests tuned to catch the specific ways people get it wrong.

the pro prompt
Build a local coding interview trainer. One repo, single user, no accounts, no cloud, no telemetry. It runs on my machine.

Stack, not negotiable: Python 3.11 with FastAPI on the backend, SQLite through SQLAlchemy, a Vite + React + TypeScript frontend using the Monaco editor, Docker for code execution. Do not add auth. Do not add a hosted judge API.

Problems live on disk, not in the database. Each problem is a folder under ./problems/<slug>/ containing problem.md (the statement), meta.yaml (title, difficulty, topic tags, language stubs) and tests.json (an array of {input, expected} objects, including at least one large case for timing). Write 12 seed problems yourself covering arrays, two pointers, a stack, binary search, BFS on a grid, interval merging, and one small DP. Do not scrape or reproduce LeetCode content.

Execution: POST /api/run accepts {slug, language, code} and runs it in a throwaway Docker container. Only python:3.11-slim and node:20-slim images. Flags: --network none, --memory 256m, --cpus 0.5, --pids-limit 64, read-only root filesystem, non-root user, 5 second wall clock kill. Wrap the submitted function with a harness that feeds each test case and compares output. Return per-test pass or fail, stderr, and runtime in milliseconds. Never execute submitted code outside Docker, not even in dev mode, not even as a fallback.

Store every submission in SQLite: slug, language, code, verdict, runtime, timestamp. I want to diff my third attempt against my first.

Review queue: SM-2 style spaced repetition over solved problems. Correct solve pushes the next due date out, a failure resets it. GET /api/due feeds a Today view that tells me what to redo.

UI, three routes: problem list with difficulty, last verdict and next due date · problem view with statement left, Monaco right, Ctrl+Enter to run, results panel below · stats page with a solve calendar and per-topic pass rate.

Explicitly out of scope: contests, leaderboards, other people's solutions, discussion threads, company tags, languages beyond Python and JavaScript, mobile layout, deployment.

Ship a README with a single make dev command and a .env holding only PORT and DOCKER_HOST. Before you claim it works, prove the sandbox survives an infinite loop, a fork bomb, a 2 GB allocation, and an outbound HTTP request, and paste the output.

$ open in your agent (prompt prefilled, you press enter), copy the prompt or copy AGENTS.md · generated from this app's build plan

prior art · use these instead of building, if you'd rather

No prior-art project is listed yet. Compare the scoped build with the paid product before choosing.

share on X ↗

Questions about LeetCode

Can you build your own LeetCode with AI?

A full replacement is not the recommended project. An agent can produce a Monaco editor, a problem list, a submissions table and a Judge0 sandbox in a session, and none of that is the product. LeetCode is a content and coordination asset: thousands of curated problems with hidden test cases that actually catch off-by-one and TLE, editorials, company frequency tags, and the social fact that interviewers pull questions from it, which you cannot self-host. Clone the harness and you sit staring at an empty problems directory; authoring good problems with adversarial test cases is the actual job. Build the trainer if you want a private drill rig over problems you have already seen, but do not pretend it replaces the bank.

What does the LeetCode build prompt cover?

The prompt starts with this scope: A local judge that runs your submitted Python or JavaScript against test cases in Docker, stores every attempt, and resurfaces solved problems on a spaced repetition schedule. Full-product capabilities excluded from the comparison include: The problem bank itself, thousands of problems with hidden tests tuned to catch the specific ways people get it wrong; Company tags and frequency data, which is the main reason people pay for Premium; Editorials and the discussion threads where the actual learning happens. Follow the implementation plan and its prerequisites before expanding the build.

How do I use the prompt, AGENTS.md and agent skills?

Start with the LeetCode prerequisites and stack, then copy the prompt into your coding agent. Save the project rules as AGENTS.md in the project root. Linked skills are optional packages or source instructions for specific tasks; review their current contents and install only those matching the chosen stack. A skill does not supply API credentials or verify the finished app.

How long will this LeetCode project take?

The catalogue estimate is a weekend for the limited scope. Setup, integration approvals, debugging, deployment and ongoing maintenance can add time. This is an estimate, not a delivery guarantee.

What would I give up by replacing LeetCode?

The problem bank itself, thousands of problems with hidden tests tuned to catch the specific ways people get it wrong; Company tags and frequency data, which is the main reason people pay for Premium; Editorials and the discussion threads where the actual learning happens; Contests, ratings, and the mild public humiliation that makes you keep showing up; Any signal that you are practicing the same questions your interviewer will ask. Because thirty-five dollars for the month before an onsite is trivially cheap against the salary delta, and because nobody wants to author their own curriculum while also preparing for interviews. Premium buys company-filtered lists and editorials, which is a shortcut through the one resource candidates are actually short on: time. A self-hosted drill app competes on none of that. It competes on being a nicer place to redo problems you already understand, which is a real but much smaller need.

What price is this guide comparing against?

The recorded Premium plan is $35/mo (monthly, single user), checked 2026-08-16. Check the linked pricing source before buying. Building your own also has hosting, API and maintenance costs; the recorded amount is not a guaranteed saving.

What can I use instead of building LeetCode?

No alternative is listed in this entry yet. That is a gap in this catalogue, not proof that no suitable product exists. Compare the paid product and the proposed scope before committing to a build.

Every week, more subscriptions die.

New verdicts, new prompts, the week's most-doomed apps.
One email. Unsubscribe in one click.

last week:100 Questions · KINDA1of10 · KINDA1Password · KINDA+1090 more

free forever · no scanner spam · the prompt stays on the site, the deaths come to you

$weekly: what got a verdict, what died.