Workers + Hono
The API server runs on Cloudflare Workers using the Hono framework. Hono provides Express-like routing with middleware support, optimized for the Workers runtime. Every API endpoint, MCP handler, and OAuth flow runs here.
NeuralRepo is an edge-first application built entirely on the Cloudflare developer platform. Every request is handled at the edge, keeping latency low regardless of where you are in the world.
Workers + Hono
The API server runs on Cloudflare Workers using the Hono framework. Hono provides Express-like routing with middleware support, optimized for the Workers runtime. Every API endpoint, MCP handler, and OAuth flow runs here.
D1 (SQLite)
All structured data — users, ideas, tags, relations, sessions — lives in Cloudflare D1, a serverless SQLite database at the edge. Includes FTS5 virtual tables for full-text search.
Vectorize
Semantic search and duplicate detection are powered by Cloudflare Vectorize, a vector database that stores embeddings alongside metadata. Uses cosine similarity for nearest-neighbor queries.
R2
Object storage via Cloudflare R2, an S3-compatible store with zero egress fees. Reserved for future use.
Queues
Asynchronous processing — embedding generation, duplicate detection, auto-tagging — is handled by Cloudflare Queues. Ideas are processed in the background so API responses return immediately.
KV
Cloudflare KV handles rate limiting counters, feature flags, and cached configuration. Its global replication ensures consistent rate limiting across edge locations.
Workers AI
NeuralRepo uses Workers AI for embedding generation (@cf/baai/bge-m3) and for running AI agent sub-agent models (Qwen 30B, Llama 70B, Granite Micro, and others) without requiring a user API key.
AI Gateway
All AI requests — BYOK Anthropic calls and Workers AI agent calls — are routed through Cloudflare AI Gateway, providing logging, caching, rate limiting, and fallback handling.
Durable Objects
The AI agent (NeuralRepoAgent) runs as a Cloudflare Durable Object, giving each user a persistent, stateful WebSocket session. Conversation history is stored in the Durable Object’s storage.
The web dashboard is a React SPA built with Vite:
| Technology | Purpose |
|---|---|
| React 19 | UI framework |
| Vite | Build tool and dev server |
| TanStack Router | File-based routing |
| TanStack Query | Data fetching and caching |
| Tailwind CSS | Styling |
| Recharts | Analytics charts |
| Three.js + 3d-force-graph | 3D mind map visualization |
| D3.js | 2D force-directed mind map |
Vercel AI SDK (ai) | Streaming AI responses, tool call handling |
Agents SDK (agents/ai-chat-agent) | WebSocket-based agent session management |
| workers-ai-provider | Workers AI model integration via Vercel AI SDK |
The SPA is served via Cloudflare Workers static assets and communicates with the Workers API.
The @neuralconfig/nrepo CLI is built with:
| Technology | Purpose |
|---|---|
| Commander.js | Command parsing and help generation |
| Chalk | Terminal styling |
| Ora | Spinner animations |
| Conf | Local configuration storage |
The CLI is published to npm and communicates with the same REST API.
The @neuralrepo/shared package contains code shared between the API, frontend, and CLI:
This ensures type safety and validation consistency across all three surfaces.
NeuralRepo chose the Cloudflare platform for three reasons:
Edge latency. Every API call runs at the nearest Cloudflare edge location (300+ cities). Whether you are in Tokyo or Toronto, response times are consistently low.
Unified billing. All services (compute, storage, vectors, AI, queues) are under one account with predictable pricing. No cross-provider networking costs.
Integrated tooling. D1, Vectorize, Queues, and Workers AI are first-class bindings in the Workers runtime. No SDKs, no connection strings — just direct bindings with TypeScript types.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐│ Web App │ │ CLI │ │ Claude MCP ││ (React) │ │ (Node.js) │ │ (Remote) │└──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │ │ │ └────────────────┼────────────────┘ │ ┌─────▼─────┐ │ Workers │ │ (Hono) │ └─────┬─────┘ ┌────────────┼────────────────┐ ┌─────▼─────┐ ┌────▼────┐ ┌───────▼───────┐ │ D1 │ │ R2 │ │ Queues │ │ (SQLite) │ │ (Files) │ │ (Background) │ └───────────┘ └─────────┘ └───────┬───────┘ ┌────▼─────┐ ┌────▼──┐ ┌────▼──────┐ │Workers│ │ Vectorize │ │ AI │ │ (Vectors) │ └───────┘ └───────────┘