A production-grade, open-source video conferencing platform built with modern web technologies. Surf combines a powerful WebRTC SFU (Selective Forwarding Unit) with AI-powered features to deliver a scalable, real-time communication solution.
Surf is a complete video conferencing solution consisting of:
- Surf-Media: High-performance WebRTC SFU written in Rust for real-time audio/video streaming
- Surf-Service: Modern TypeScript/Node.js backend API built with Hono
- Surf-AI: AI-powered transcription and processing service
- Surf-Bench: Performance benchmarking tools
- Surf-Utils: Shared utilities and documentation
ββββββββββββββββββββββββ
β Web Client β
β (Next.js App) β
ββββββββββββ¬ββββββββββββ
β HTTP/WebSocket
βΌ
ββββββββββββββββββββββββ WebRTC Media ββββββββββββββββββββββββ
β API Server βββββββββββββββββββββΊβ Media Server β
β (Hono + Node.js) β β (Rust SFU) β
ββββββββββββ¬ββββββββββββ ββββββββββββ¬ββββββββββββ
β β
β βββββββββββββββββββββββββββββββββββΌβββββββββββ
β β β β
βΌ βΌ βΌ βΌ
ββββββββββ ββββββββ ββββββββββ ββββββββββ
β Redis β β NATS β β AI β β R2 β
β Cache β β Msg β βService β βStorage β
ββββββββββ ββββββββ ββββββββββ ββββββββββ
- Real-time Video/Audio: WebRTC-based SFU for efficient media routing
- AI Transcription: Real-time transcription and AI-powered features
- Recording: Server-side recording with cloud storage (R2/S3)
- Scalable Architecture: Redis caching, NATS messaging for horizontal scaling
- Modern Stack: Rust for performance-critical media handling, TypeScript for business logic
- Production-Ready: Monitoring, metrics, rate limiting, and security built-in
- Rust (1.75+) - Install Rust
- Bun (1.1.0+) - Install Bun
- Node.js (20+)
- Docker & Docker Compose (for infrastructure)
- Clone the repository
git clone https://github.com/bas3line/Surf.git
cd Surf- Start infrastructure services
# Start Redis, NATS, PostgreSQL, and other dependencies
bun run dev:infra- Set up environment variables
# Surf-Service
cd Surf-Service
cp .env.example .env
# Edit .env with your configuration
# Surf-Media
cd ../Surf-Media
cp .env.example .env
# Edit .env with your configuration- Install dependencies
# Surf-Service (monorepo with workspaces)
cd Surf-Service
bun install
# Surf-AI
cd ../Surf-AI
bun install- Run the development servers
# Option 1: Use the convenience script (runs both Media and Service)
./dev.sh
# Option 2: Run services individually
# Terminal 1 - Surf-Media (Rust SFU)
cd Surf-Media
cargo run
# Terminal 2 - Surf-Service (API + Web)
cd Surf-Service
bun run dev
# Terminal 3 - Surf-AI (Optional)
cd Surf-AI
bun run dev- Web App: http://localhost:3000
- API Server: http://localhost:1284
- Media Server: http://localhost:9091
- AI Service: http://localhost:3001
Surf/
βββ Surf-Media/ # Rust WebRTC SFU (media server)
β βββ src/
β β βββ media/ # WebRTC peer connections
β β βββ audio/ # Audio processing & codecs
β β βββ cache/ # Redis session management
β β βββ recording/ # Server-side recording
β β βββ api/ # HTTP/WebSocket API
β βββ Cargo.toml
β
βββ Surf-Service/ # TypeScript monorepo (API + Web)
β βββ apps/
β β βββ api/ # Hono backend API
β β βββ web/ # Next.js web client
β β βββ docs/ # Documentation site
β βββ packages/
β β βββ db/ # Database (Drizzle ORM)
β β βββ auth/ # Authentication (Better Auth)
β β βββ cache/ # Redis cache layer
β β βββ nats/ # NATS messaging
β β βββ types/ # Shared TypeScript types
β βββ package.json
β
βββ Surf-AI/ # AI transcription service
β βββ src/
β
βββ Surf-Bench/ # Performance benchmarks
β
βββ Surf-Utils/ # Utilities and docs
β
βββ dev.sh # Development launcher script
- Rust - High-performance media server (WebRTC, SFU)
- TypeScript - Business logic and API
- Hono - Fast, lightweight web framework
- Drizzle ORM - Type-safe database access
- Better Auth - Modern authentication
- Next.js 16 - React framework with App Router
- React 19 - UI library
- TailwindCSS - Styling
- Radix UI - Accessible components
- Zustand - State management
- PostgreSQL - Primary database
- Redis - Caching and session storage
- NATS - Message broker
- R2/S3 - Object storage for recordings
- Docker - Containerization
- mediasoup-client - WebRTC client library
- Opus - Audio codec
- WebRTC (Rust) - Native WebRTC implementation
# Surf-Service
bun run dev # Start web + API
bun run dev:all # Start all services
bun run dev:docs # Start documentation site
bun run build # Build all packages
bun run lint # Lint code
bun run format # Check code formatting
bun run format:fix # Fix code formatting
# Database
bun run db:generate # Generate migrations
bun run db:migrate # Run migrations
bun run db:push # Push schema changes
bun run db:studio # Open Drizzle Studio
# Infrastructure
bun run dev:infra # Start Docker services
bun run dev:infra:down # Stop Docker services
bun run docker:clean # Clean Docker volumes# Surf-Media (Rust)
cd Surf-Media
cargo build --release
# Surf-Service (TypeScript)
cd Surf-Service
bun run build
# Run production builds
cd Surf-Media
./target/release/surf-media
cd Surf-Service
bun run start- Prometheus-compatible metrics endpoint
- Built-in logging with Pino
- Performance monitoring
- Rate limiting and security features
We welcome contributions! Please see:
- CONTRIBUTING.md - Contribution guidelines
- CODE_OF_CONDUCT.md - Code of conduct
Found a security vulnerability? Please read SECURITY.md for responsible disclosure guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
- Email: hi@ykira.com
- Discord: https://discord.gg/meets
Built with modern open-source technologies and powered by the amazing Rust and TypeScript communities.
Note: This is an active development project. APIs and features may change. Check individual component READMEs for more detailed documentation: