DocsGetting StartedArchitecture
Getting Started

Architecture

How the frontend, backend, sandboxes and preview proxy fit together.

Neuron Runner is a React single-page app talking to a Django ASGI backend. The backend stores state in PostgreSQL and Redis and runs one Docker container per workspace.

text
React 19 + Vite web app
  Chat | Files | Editor | Terminal | Git & PRs | Browser
        │  HTTP (REST / SSE) + WebSocket
        ▼
Django 5.2 ASGI API (Daphne + Channels)
  chat | sandbox | mcp | model | authentication | user
   │              │                 │
   ▼              ▼                 ▼
PostgreSQL     Redis             Docker Engine ──► Preview proxy (:8090)
+ pgvector     channels, cache,  one container
               WS tickets,       per workspace
               preview tokens

Backend apps

AppResponsibility
authenticationJWT auth, email one-time codes, Google and GitHub OAuth, optional Turnstile
chatStreaming LLM chat, tool calling, memory, notes, attachments
sandboxDocker runtime, PTY terminal, port previews, Git, BYOK keys, secrets
mcpModel Context Protocol client, OAuth and tool execution
modelModel catalog and reasoning settings
userUser model, profiles, API keys
coreExtension registry (see Extensions)

Request flow

  1. The browser sends a chat message over HTTP; the reply streams back with Server-Sent Events.
  2. The chat agent calls tools (read file, run command, Git, MCP tools...). Sandbox tools execute inside the workspace container through the Docker API.
  3. The terminal is a WebSocket served by Django Channels. Each connection uses a one-time signed ticket stored in Redis.
  4. Port previews go through the separate preview proxy so sandbox apps never share an origin, cookies or storage with Neuron Runner itself.

Isolation

  • Each workspace container runs with CPU, memory and PID limits (--pids-limit 256) and no-new-privileges.
  • Files live in a persistent volume mounted at /workspace; stopping a container does not delete them.
  • Workspace secrets are encrypted at rest and injected into the container as environment variables.

Was this documentation page helpful?

Your feedback helps us continuously refine and improve our developer guides.