Editor and output
React, Monaco, and Supabase Auth provide sign-in, an exercise draft for each language, automatic saving, Run output, and exercise conversations. Render Static Site is the proposed host for the Vite build.
System overview · proposed public release
An exercise-based Python and TypeScript editor with automatic saving, resumable agent conversations, and a TypeScript worker that runs code in isolated sandboxes.
Solid paths show requests, jobs, and results. Dashed paths show repository deployment.
Each part has one clear responsibility. Hosting choices are the current recommendation, not deployed infrastructure.
React, Monaco, and Supabase Auth provide sign-in, an exercise draft for each language, automatic saving, Run output, and exercise conversations. Render Static Site is the proposed host for the Vite build.
The TypeScript API authenticates users, checks ownership and quotas, saves exercise revisions and immutable job records, enqueues IDs, and streams authorized results. It holds neither model nor sandbox credentials.
One TypeScript Render background worker initially consumes two queues with independent concurrency. Agent turns use Vercel AI SDK Core to call the configured model provider and checkpoint every step in Postgres; code runs create Modal Sandboxes. Split the consumers into services if load requires it.
Modal Sandboxes execute a recorded Python or TypeScript snapshot in a fresh environment with pinned runtimes, blocked networking, no application secrets, and time, compute, and output limits.
Supabase Auth and Postgres store users, exercises, revisions, conversations, turns, run records, and bounded output. Two durable queues carry job IDs. Records and queue messages are created together.
The private GitHub monorepo holds the web app, API, worker, and shared contracts. The API and worker are separate processes. See the living cost model for the two-service baseline.
The backend owns server work; the browser owns the editing experience.
The first edit sends the active main file to the exercise API immediately. Further edits are combined while the request runs and for about one second afterward; the latest version is then saved. The server confirms each saved revision.
The API authorizes a manual run or agent turn, saves its state, and enqueues its ID in Postgres. An agent can enqueue a code run through the same path as the Run button.
The worker uses Vercel AI SDK Core to call the configured model gateway or runs a Modal Sandbox, persists each model/tool checkpoint plus bounded output and status, then acknowledges the job. The API streams authorized results; the worker removes each finished sandbox.