A full-stack monorepo platform providing video sessions, messaging, and user management. Built with Bun runtime for 3x faster performance than Node.js.
Monobase is a modern application platform designed to streamline user management and business workflows. The platform provides:
- Account App - Self-service account management and video sessions
- API Service - Backend with core business modules
- Video Sessions - Real-time video calls and secure messaging (WebRTC)
- User Management - Comprehensive user profiles and role management
- Enterprise Compliance - Audit trails, consent management, and secure data handling
- Real-time Notifications - Multi-channel delivery (email, push via OneSignal)
- File Storage - Secure file upload and download (S3/MinIO)
monobase/
├── apps/ # Frontend applications
│ └── account/ # Account app (Vite + TanStack Router)
├── packages/ # Shared libraries
│ ├── typescript-config/ # Shared TypeScript configurations
│ └── ui/ # Shared UI components
├── services/ # Backend services
│ └── api/ # Main API service (Hono + Bun)
├── specs/ # API specifications
│ └── api/ # TypeSpec source definitions
├── CLAUDE.md # AI assistant project guide
└── package.json # Monorepo workspace configuration
- Bun >= 1.2.21 (installation guide)
- PostgreSQL >= 14
- Node.js >= 18 (for some tooling compatibility)
- Git for version control
- AWS S3 or MinIO for file storage
- SMTP server or Postmark for email delivery
- OneSignal for push notifications
git clone <repository-url>
cd monobase
bun install# Create PostgreSQL database
createdb monobase
# Generate database schema
cd services/api
bun run db:generateCreate .env files in each service/app directory (see individual READMEs for required variables):
# services/api/.env
DATABASE_URL=postgresql://user:password@localhost:5432/monobase
PORT=7213
AUTH_SECRET=your-secret-key-here# Terminal 1 - API Service
cd services/api
bun dev
# Terminal 2 - Account App
cd apps/account
bun dev- Define API - Create/modify TypeSpec definitions in
specs/api/src/modules/ - Generate - Run
cd specs/api && bun run build - Implement - Build Hono handlers in
services/api/src/handlers/ - Test - Write tests and run
cd services/api && bun test - Integrate - Use generated TypeScript types in frontend apps
# Install dependencies across all workspaces
bun install
# Build all packages
bun run --filter '*' build
# Clean build artifacts
bun run clean
# Run specific workspace command
cd apps/account && bun devbun install # Install all workspace dependencies
bun run --filter '*' build # Build all packages
bun run clean # Clean build artifactsbun dev # Start development server (port 7213)
bun run build # Build production bundle
bun run generate # Generate routes, validators, handlers from OpenAPI
bun test # Run test suite
bun run typecheck # TypeScript type checking
bun run db:generate # Generate Drizzle migrations
bun run db:studio # Open Drizzle Studiobun run build # Generate both OpenAPI and types
bun run build:openapi # Generate OpenAPI specs only
bun run build:types # Generate TypeScript types onlybun dev # Start dev server (port 3002)
bun run build # Build production bundle
bun run typecheck # TypeScript type checking
bun run test:e2e # Run Playwright E2E testsTechnology: Vite + TanStack Router + React 19
User-facing application for:
- Account management and profile
- Video sessions and messaging
- File access and management
Development: cd apps/account && bun dev
Port: 3002
The API service is organized into domain-specific modules:
- Person - User profile management and PII safeguard
- Booking - Professional booking and scheduling system
- Billing - Invoice-based payments (Stripe integration)
- Audit - Compliance logging and activity tracking
- Comms - Video/chat sessions (WebRTC) and messaging
- Notifs - Multi-channel notifications (email, push via OneSignal)
- Storage - File upload/download (S3/MinIO)
- Email - Transactional email delivery
- Reviews - NPS review system
Authentication is handled by Better-Auth (integrated, not a separate module).
Person-Centric Design: The Person module serves as the central PII safeguard for user data.
Consent Management: Consent is managed via JSONB fields on the Person model:
- marketing_consent: Marketing communications
- data_sharing_consent: Data sharing preferences
- sms_consent: SMS notifications
- email_consent: Email communications
- OpenAPI Spec:
specs/api/dist/openapi/openapi.json - TypeScript Types: Generated to
@monobase/api-specpackage - Interactive Docs: Scalar UI available at
/docsendpoint
- Bun 1.2.21+ - Fast JavaScript runtime and package manager
- TypeScript 5.9.2 - Type-safe development
- ESM - Modern module system
- React 19 - UI library
- TanStack Router - Type-safe routing
- Radix UI - Accessible component primitives
- Tailwind CSS - Utility-first styling
- shadcn/ui - Component library
- Framer Motion - Animations
- React Hook Form + Zod - Form validation
- Hono - Fast web framework
- Drizzle ORM - Type-safe database queries
- PostgreSQL - Primary database
- Better-Auth - Authentication (no external service)
- Pino - Structured JSON logging
- Zod - Runtime validation
- TypeSpec - API-first specification language
- OpenAPI - REST API documentation
- Type Generation - Automatic TypeScript types from specs
- AWS S3 / MinIO - Object storage
- Postmark / SMTP - Email delivery
- OneSignal - Push notifications
cd services/api
bun test# Account app E2E tests
cd apps/account
bun run test:e2e# Check all TypeScript types
cd services/api && bun run typecheck
cd apps/account && bun run typecheck- CLAUDE.md - Comprehensive project guide for AI assistants and developers
- CONTRIBUTING.md - Developer contribution guidelines
- Audit Trails - All data access includes comprehensive audit logging
- Consent - Granular consent management for all data operations
- Security - TLS 1.3, field-level encryption, role-based access
- Audit - Structured logging with correlation IDs
- Data Integrity - ACID-compliant PostgreSQL transactions
- 3x Faster Startup - Bun vs Node.js
- Native TypeScript - No transpilation overhead
- Connection Pooling - Optimized database queries
- JSONB Indexing - Fast consent and config queries
[Add your license here - e.g., MIT, Apache 2.0, Proprietary]
For detailed development guidelines, see CONTRIBUTING.md.
For AI assistant integration, see CLAUDE.md.