StratBrain is a full-stack TypeScript application with AI-powered features, real-time voice interaction, and containerized deployment. Here's what it's built with.
Frontend
| Technology | Purpose |
|---|
| React 19 | UI framework |
| TypeScript | Type-safe development |
| Vite | Build tool with fast HMR |
| Zustand | Lightweight state management |
| React Router | Client-side routing |
| React Hook Form | Form handling |
| Recharts | Data visualization and analytics charts |
| Motion | UI animations |
| React Flow | Mindmap graph visualization |
| Lucide React | Icon library |
| React Markdown | Markdown rendering for AI responses |
Progressive Web App
StratBrain is a PWA powered by vite-plugin-pwa, enabling installable app experiences with offline support.
Backend
| Technology | Purpose |
|---|
| Node.js 20 | Runtime |
| Express | HTTP server and REST API |
| TypeScript | Type-safe development |
| Prisma | Database ORM with migrations |
| Redis | Session store, caching, and rate limiting |
Database
StratBrain uses SQLite via Prisma with the LibSQL adapter. The database is file-based and mounted on persistent EBS storage in production.
File Processing
| Library | Purpose |
|---|
| pdf-parse | Extract text from uploaded PDFs |
| PDFKit | Generate assessment and transcript PDFs |
| Mammoth | Convert DOCX to HTML |
| xlsx | Parse Excel spreadsheets |
| Multer | Handle file uploads |
AI & Machine Learning
LLM Providers
StratBrain supports multiple AI providers through an admin-configurable abstraction layer:
| Provider | SDK | Use Cases |
|---|
| Anthropic Claude | @anthropic-ai/sdk | Primary LLM for coaching, assessment, and panel dialogue |
| OpenAI GPT | openai | Alternative LLM provider |
| NEAR AI | nearai | Third provider option |
Administrators can switch providers and models from the admin dashboard without code changes.
Agent Framework
| Technology | Purpose |
|---|
| LangChain Core | Foundation for agent pipelines |
| LangGraph | State machine orchestration for multi-turn panel simulations |
Panel sessions use a supervisor agent architecture where a coordinator manages individual panelist agents, each with distinct personality profiles and questioning strategies.
RAG & Embeddings
| Technology | Purpose |
|---|
| Hugging Face Transformers | Local embedding model (all-MiniLM-L6-v2) |
| 384-dimensional vectors | Semantic similarity for knowledge retrieval |
The knowledge base pipeline processes uploaded documents (PDF, DOCX, TXT, Markdown) into chunks, generates vector embeddings, and retrieves relevant content during coaching sessions and answer preparation.
Speech & Voice
| Technology | Purpose |
|---|
| Whisper | Speech-to-text (GPU-accelerated with CUDA) |
| Coqui XTTS v2 | Text-to-speech with voice cloning |
| Piper TTS | Lightweight alternative TTS |
| Rhubarb Lip Sync | Automated lip-sync data for avatar animations |
Voice services run on a separate GPU instance for hardware-accelerated inference.
Authentication & Security
| Technology | Purpose |
|---|
| WebAuthn / Passkeys | Primary passwordless authentication (@simplewebauthn) |
| Google OAuth | Federated sign-in with account linking |
| Magic Links | Email-based passwordless login |
| Passport.js | Authentication middleware |
| Helmet | Security headers |
| AES-256-GCM | Encryption for stored API keys (BYOK support) |
StratBrain uses a four-tier role-based access control system: Student, Faculty, Admin, and Super Admin.
Payments
| Technology | Purpose |
|---|
| Stripe | Payment processing and credit purchases |
The platform supports both paid and donation-based funding models with an admin-managed credit system.
Notifications
| Technology | Purpose |
|---|
| Web Push API | Browser push notifications with VAPID keys |
| AWS SES | Email delivery for notifications and magic links |
Users can configure notification preferences per event type with instant, daily, or weekly digest options.
Infrastructure & Deployment
Containers
StratBrain runs as a set of Docker containers orchestrated with Docker Compose:
| Container | Base Image | Purpose |
|---|
| Client | nginx:alpine | Serves static assets, reverse proxy |
| Server | node:20-slim | API server |
| Redis | redis:7-alpine | Sessions and caching |
| Whisper GPU | nvidia/cuda:12.1.0 | Speech-to-text |
| XTTS | coqui-ai/xtts-streaming-server | Text-to-speech |
Cloud (AWS)
| Service | Purpose |
|---|
| EC2 (t3.medium) | Web application tier |
| EC2 (g4dn.xlarge) | GPU services (TTS, STT) |
| EBS | Persistent storage for database and uploads |
| SES | Transactional email |
| Let's Encrypt | TLS certificates |
CI/CD
| Tool | Purpose |
|---|
| GitHub Actions | Build, test, and deploy pipelines |
| GitHub Container Registry | Docker image hosting |
The deployment pipeline builds Docker images, pushes to GHCR, and deploys to production with health checks and rollback support.
Documentation
| Technology | Purpose |
|---|
| Docusaurus 3 | This documentation site |
| GitHub Pages | Documentation hosting |