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 2. Logger: Request/response logging 3. Recovery: Panic recovery 4. Auth: Firebase token validation
- Rate Limiter: API rate limiting 6. Compression: Response compression
Data Flow
Data Flow
Storage Layer (S3)
Amazon S3 serves as the registry backend, storing server metadata, code bundles, and security reports.Registry Structure
Metadata Schema
Execution Layer (AWS Lambda)
MCP servers run in isolated AWS Lambda functions, providing secure sandboxed execution with automatic scaling.Lambda Architecture
Lambda Architecture
Container Image Approach:
- Server code is packaged into a container image
- Image is stored in Amazon ECR (Elastic Container Registry)
- Lambda function uses the container image
- Each execution runs in an isolated environment
- 15-minute execution timeout
- Up to 10GB memory allocation
- Automatic scaling and load balancing
- VPC isolation for enhanced security
- CloudWatch logging and monitoring
Security Layer
SuperBox implements a comprehensive security pipeline with multiple scanning tools.1
SonarCloud Analysis
- Code quality metrics - Bug detection - Vulnerability scanning - Code smell identification - Maintainability rating
2
GitGuardian Secrets Detection
- API key detection - Password scanning - Token identification - Certificate detection
3
Bandit Security Audit (Python)
- Python-specific vulnerability detection - CWE (Common Weakness Enumeration) mapping - Severity and confidence ratings - Detailed issue reports
Data 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
Scalability & Performance
Frontend Optimization
- Next.js ISR (Incremental Static Regeneration) - Image optimization with next/image - Code splitting and lazy loading - CDN distribution via Vercel - Aggressive caching strategies
Backend Optimization
- Go’s concurrent processing - Connection pooling - Response caching - Gzip compression - Efficient JSON serialization
Storage Optimization
- S3 intelligent tiering - CloudFront CDN - Transfer acceleration - Multipart uploads - Lifecycle policies
Execution Optimization
- Lambda provisioned concurrency - Container image caching - Warm start optimization - Auto-scaling policies - Cost optimization
Monitoring & Observability
- Logging
- Metrics
- Alerting
- CloudWatch Logs: Lambda execution logs - API Logs: Request/response logging - Error Tracking: Centralized error monitoring
- Audit Logs: Security and compliance tracking
Infrastructure as Code
SuperBox infrastructure is managed with Terraform using a modular architecture.- S3 Module: Creates and configures the MCP registry bucket with versioning
- IAM Module: Manages roles and policies for Lambda execution
- Lambda Module: Provisions containerized Lambda functions for MCP server execution
- Region: Deployed in ap-south-1 (Mumbai) by default
Deployment Pipeline
1
Development
Local development with hot reload - Frontend:
npm run dev - Backend: go run main.go2
Testing
Automated testing and validation - Unit tests - Integration tests - E2E tests
with Playwright
3
Staging
Deploy to staging environment - Preview deployments on Vercel - Backend
staging on AWS - Smoke tests
4
Production
Production deployment - Blue-green deployment - Canary releases - Rollback
capability - Health checks
This architecture is designed for high availability, security, and
scalability, ensuring SuperBox can handle thousands of concurrent users and
server executions.