Skip to main content

Tech Stack

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​

TechnologyPurpose
React 19UI framework
TypeScriptType-safe development
ViteBuild tool with fast HMR
ZustandLightweight state management
React RouterClient-side routing
React Hook FormForm handling
RechartsData visualization and analytics charts
MotionUI animations
React FlowMindmap graph visualization
Lucide ReactIcon library
React MarkdownMarkdown rendering for AI responses

Progressive Web App​

StratBrain is a PWA powered by vite-plugin-pwa, enabling installable app experiences with offline support.

Backend​

TechnologyPurpose
Node.js 20Runtime
ExpressHTTP server and REST API
TypeScriptType-safe development
PrismaDatabase ORM with migrations
RedisSession 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​

LibraryPurpose
pdf-parseExtract text from uploaded PDFs
PDFKitGenerate assessment and transcript PDFs
MammothConvert DOCX to HTML
xlsxParse Excel spreadsheets
MulterHandle file uploads

AI & Machine Learning​

LLM Providers​

StratBrain supports multiple AI providers through an admin-configurable abstraction layer:

ProviderSDKUse Cases
Anthropic Claude@anthropic-ai/sdkPrimary LLM for coaching, assessment, and panel dialogue
OpenAI GPTopenaiAlternative LLM provider
NEAR AInearaiThird provider option

Administrators can switch providers and models from the admin dashboard without code changes.

Agent Framework​

TechnologyPurpose
LangChain CoreFoundation for agent pipelines
LangGraphState 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​

TechnologyPurpose
Hugging Face TransformersLocal embedding model (all-MiniLM-L6-v2)
384-dimensional vectorsSemantic 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​

TechnologyPurpose
WhisperSpeech-to-text (GPU-accelerated with CUDA)
Coqui XTTS v2Text-to-speech with voice cloning
Piper TTSLightweight alternative TTS
Rhubarb Lip SyncAutomated lip-sync data for avatar animations

Voice services run on a separate GPU instance for hardware-accelerated inference.

Authentication & Security​

TechnologyPurpose
WebAuthn / PasskeysPrimary passwordless authentication (@simplewebauthn)
Google OAuthFederated sign-in with account linking
Magic LinksEmail-based passwordless login
Passport.jsAuthentication middleware
HelmetSecurity headers
AES-256-GCMEncryption for stored API keys (BYOK support)

StratBrain uses a four-tier role-based access control system: Student, Faculty, Admin, and Super Admin.

Payments​

TechnologyPurpose
StripePayment processing and credit purchases

The platform supports both paid and donation-based funding models with an admin-managed credit system.

Notifications​

TechnologyPurpose
Web Push APIBrowser push notifications with VAPID keys
AWS SESEmail 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:

ContainerBase ImagePurpose
Clientnginx:alpineServes static assets, reverse proxy
Servernode:20-slimAPI server
Redisredis:7-alpineSessions and caching
Whisper GPUnvidia/cuda:12.1.0Speech-to-text
XTTScoqui-ai/xtts-streaming-serverText-to-speech

Cloud (AWS)​

ServicePurpose
EC2 (t3.medium)Web application tier
EC2 (g4dn.xlarge)GPU services (TTS, STT)
EBSPersistent storage for database and uploads
SESTransactional email
Let's EncryptTLS certificates

CI/CD​

ToolPurpose
GitHub ActionsBuild, test, and deploy pipelines
GitHub Container RegistryDocker image hosting

The deployment pipeline builds Docker images, pushes to GHCR, and deploys to production with health checks and rollback support.

Documentation​

TechnologyPurpose
Docusaurus 3This documentation site
GitHub PagesDocumentation hosting