Component Architecture
Frontend (Next.js 16)
The frontend is built with Next.js 16 and React 19, providing a modern, performant user interface with server-side rendering and optimal loading times.Core Technologies
Core Technologies
- Next.js 16: App Router with Server Components
- React 19: Latest features including Actions and improved Suspense
- TypeScript: Type-safe development
- Tailwind CSS 4: Utility-first styling with JIT compilation
- Framer Motion: Smooth animations and transitions
Key Components
Key Components
- ServerCard: Displays server information in grid/list views
- ServerDetail: Full server information with tabs
- AuthModal: Firebase authentication integration
- PublishModal: Server publishing workflow
- PaywallModal: Razorpay payment integration
- SecurityReport: Visualizes security scan results
Backend (Go + Gin)
The backend API is built with Go and the Gin web framework, providing high-performance REST endpoints with minimal latency.API Server
API Server
Middleware Stack
Middleware Stack
- CORS: Cross-origin resource sharing
- Logger: Request/response logging
- Recovery: Panic recovery
- Auth: Firebase token validation
- Rate Limiter: API rate limiting
- Compression: Response compression
Data Flow
Data Flow
Storage Layer (Cloudflare R2)
Cloudflare R2 serves as the registry backend, storing server metadata and security reports via an S3-compatible API.Registry Structure
Metadata Schema
Execution Layer (Cloudflare Workers + Durable Objects)
MCP servers run insideMcpSession Durable Objects - one per session, keyed on the Mcp-Session-Id header. Sessions auto-evict after 30 minutes of inactivity. No local proxy process is needed; AI clients connect directly via HTTP.
Execution Architecture
Execution Architecture
Streamable HTTP Approach (MCP rev 2025-11-25):
- AI client sends
POST /mcp?name=<server>to the Cloudflare Worker - Worker routes the request to (or creates) the session’s Durable Object
- DO fetches server metadata from R2 to locate the entrypoint
- The embedded TypeScript interpreter executes the Python entrypoint in-process
- JSON-RPC response streams back over HTTP
DELETE /mcp?name=<server>tears down the session
requests-based HTTP calls- JSON parsing and serialisation
- Common control flow and string manipulation
httpx,aiohttp,async def- C extensions, binary wheels
- Class definitions, file I/O
Security Layer
SuperBox implements a five-stage security pipeline before any server enters the registry.SonarCloud Analysis
Code quality metrics, bug detection, vulnerability scanning, maintainability rating
Tool Discovery
Clones the repository and validates reported MCP tools exist via regex scan for
@*.tool() decoratorsData Flow
Server Creation Flow
Server Execution Flow
Authentication Flow
SuperBox uses Firebase Authentication with JWT token validation.Payment Integration
Razorpay handles all payment processing for paid MCP servers.Payment Flow
Payment Flow
- User selects a paid server 2. Frontend creates Razorpay order 3. User completes payment 4. Webhook validates payment 5. Server access is granted
- Transaction recorded in database
Security Measures
Security Measures
- PCI-DSS compliant payment processing - Webhook signature verification - Idempotency keys for duplicate prevention - Encrypted payment data - Secure refund handling