EdTech and coding courses

A “Run” button for every coding lesson

Let learners write and run code directly in your course pages, quizzes and labs. CodeForge executes it in isolated sandboxes and returns output and errors in a shape that’s easy to show to beginners.

Four languages, one integration

Python, JavaScript, Java and C++ behind the same request and response format.

Beginner-friendly errors

Compiler messages, tracebacks and exit codes come back separately, so you can explain each kind of mistake.

Safe for public classrooms

Student code can’t reach the internet or your systems, and infinite loops are stopped automatically.

Predictable usage

Monthly allowances and a usage dashboard show exactly how many runs each course uses.

How it works

Running a learner’s exercise from your backend (Node.js)

const API = 'https://api.tatvastack.com';
const headers = { Authorization: `Bearer ${process.env.CODEFORGE_API_KEY}`, 'Content-Type': 'application/json' };

export async function runExercise(language, source, stdin = '') {
  const res = await fetch(`${API}/v1/executions`, {
    method: 'POST',
    headers: { ...headers, 'Idempotency-Key': crypto.randomUUID() },
    body: JSON.stringify({ language, source, stdin }),
  });
  const { executionId } = await res.json();
  for (;;) {
    const r = await (await fetch(`${API}/v1/executions/${executionId}`, { headers })).json();
    if (!['QUEUED', 'RUNNING'].includes(r.status)) return r; // show r.stdout, r.stderr or r.compileOutput
    await new Promise((s) => setTimeout(s, 500));
  }
}

Works the same for Python, JavaScript, Java and C++: change the language field. Full reference in the API docs.

FAQ

Questions from edtech and coding courses teams

Can students call the API directly from the browser?

Keep your API key on your server: the browser calls your backend, which calls CodeForge. This also lets you apply your own per-student limits.

What happens when a student writes an infinite loop?

The run is stopped at its time limit and returns TIMED_OUT, without affecting anyone else.

How much does a class use?

Each run counts once against your monthly allowance; the usage dashboard breaks runs down by day and language.

Built for edtech and coding courses

500 free runs a month during the beta. No servers to manage.

Read the quickstart Request beta access