This document provides a comprehensive overview of the technologies, frameworks, and libraries that power the Sim platform. It covers the core runtime environment, database systems, UI frameworks, AI integrations, deployment infrastructure, and development tooling.
For information about database schema and ORM usage, see 2.2 Database Schema For deployment configurations, see 1.2 Deployment Options For environment configuration details, see 9.1 Environment Variables
Sim is built on Next.js 16 with React 19, using Bun as both the primary package manager and runtime environment. TypeScript provides type safety across the entire codebase.
| Component | Version | Purpose |
|---|---|---|
| Next.js | 16.1.6 | Full-stack framework with App Router |
| React | 19.2.4 | UI library |
| React DOM | 19.2.4 | DOM rendering |
| Bun | 1.3.11 | Package manager and runtime |
| TypeScript | 5.8.2 | Type system |
| Node.js | 22.x | Runtime compatibility (Docker/CI) |
Diagram: Core Framework Architecture
Sources: package.json3-4 apps/sim/package.json7-9 apps/sim/package.json145-162 apps/sim/next.config.ts1-11 apps/docs/package.json29-34 docker/app.Dockerfile4-12
The application uses advanced Next.js features configured in next.config.ts:
standalone for optimized Docker builds when DOCKER_BUILD is truthy apps/sim/next.config.ts77isolated-vm, ffmpeg-static, and pino apps/sim/next.config.ts81-91optimizeCss, turbopackFileSystemCacheForDev, and optimized package imports for libraries like lucide-react and framer-motion apps/sim/next.config.ts96-119Sources: apps/sim/next.config.ts1-120
Sim utilizes PostgreSQL 17 with the pgvector extension to handle both relational data and high-dimensional vector embeddings for AI knowledge bases.
Diagram: Database Stack
Sources: apps/sim/package.json112 apps/sim/package.json155 docker-compose.prod.yml118-119 package.json33-34
Sim implements better-auth for secure, multi-tenant authentication.
Diagram: Natural Language to Code (Auth Space)
| System Concept | Code Entity | File Path |
|---|---|---|
| Auth Client | client | apps/sim/app/(auth)/login/login-form.tsx17 |
| Login Logic | onSubmit | apps/sim/app/(auth)/login/login-form.tsx134 |
| Signup Logic | onSubmit | apps/sim/app/(auth)/signup/signup-form.tsx195 |
| Email Validation | quickValidateEmail | apps/sim/lib/messaging/email/validation.ts1 |
| Session Hook | useSession | apps/sim/app/(auth)/signup/signup-form.tsx10 |
Sources: apps/sim/app/(auth)/login/login-form.tsx17-173 apps/sim/app/(auth)/signup/signup-form.tsx1-210 apps/sim/package.json116
The platform provides real-time multi-user collaboration using Socket.io, with a dedicated server and Redis-backed scaling.
@socket.io/redis-adapter for multi-node synchronization apps/sim/package.json89apps/sim/socket/index.ts and deployed as a separate container apps/sim/package.json13 docker-compose.prod.yml80-81Sources: apps/sim/package.json13-14 apps/sim/package.json179-180 docker-compose.prod.yml80-105
The UI is built on Tailwind CSS 4.0 and Radix UI primitives, ensuring high accessibility and rapid styling.
| Component | Package | Version |
|---|---|---|
| Canvas | reactflow | ^11.11.4 |
| Animations | framer-motion | ^12.5.0 |
| Icons | lucide-react | ^0.479.0 |
| Form Handling | react-hook-form | ^7.54.2 |
Sources: apps/sim/package.json118 apps/sim/package.json137 apps/sim/package.json163 apps/sim/package.json168
Sim integrates with a vast array of AI providers using native SDKs to support advanced features like tool calling and streaming.
Diagram: AI Provider Mapping
| Provider | SDK Package | Version |
|---|---|---|
| OpenAI | openai | ^4.91.1 |
| Anthropic | @anthropic-ai/sdk | 0.71.2 |
| Google Gemini | @google/genai | 1.34.0 |
| Groq | groq-sdk | ^0.15.0 |
| Cerebras | @cerebras/cerebras_cloud_sdk | ^1.23.0 |
| Ollama | OLLAMA_URL (Env) | docker-compose.prod.yml23 |
Sources: apps/sim/package.json38 apps/sim/package.json51 apps/sim/package.json53 apps/sim/package.json122 apps/sim/package.json152
The project is a monorepo managed by Turborepo and Bun Workspaces.
Diagram: Natural Language to Code (Monorepo Space)
Sources: package.json7-10 package.json12-13 apps/sim/package.json88 apps/docs/package.json18
Sources: apps/sim/package.json1-186
Refresh this wiki