Skip to content

Tech Stack

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

File attachments (images, documents, etc.) are stored in Cloudflare R2, an S3-compatible object store with zero egress fees.

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 with the @cf/baai/bge-m3 model to generate vector embeddings for ideas. This runs on Cloudflare’s GPU infrastructure with no external API calls.

AI Gateway

BYOK AI requests (specs, digest summaries) are routed through Cloudflare AI Gateway, which provides logging, caching, rate limiting, and fallback handling for external AI provider calls.

The web dashboard is a React SPA built with Vite:

TechnologyPurpose
React 19UI framework
ViteBuild tool and dev server
TanStack RouterFile-based routing
TanStack QueryData fetching and caching
Tailwind CSSStyling
RechartsAnalytics charts
React FlowMind map visualization

The SPA is deployed to Cloudflare Pages and communicates with the Workers API.

The @neuralconfig/nrepo CLI is built with:

TechnologyPurpose
Commander.jsCommand parsing and help generation
ChalkTerminal styling
OraSpinner animations
ConfLocal 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:

  • Zod schemas for all request/response types
  • TypeScript types generated from the Zod schemas
  • Constants for statuses, relation types, and limits
  • Validation helpers used by both client and server

This ensures type safety and validation consistency across all three surfaces.

NeuralRepo chose the Cloudflare platform for three reasons:

  1. 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.

  2. Unified billing. All services (compute, storage, vectors, AI, queues) are under one account with predictable pricing. No cross-provider networking costs.

  3. 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) │
└───────┘ └───────────┘