Skip to main content

Architecture

OrbitCubs CRM is a single React codebase that runs on the web and ships to Android, built deliberately to cost nothing to operate.

Stack

LayerTechnology
UIReact 19, Radix UI Themes, lucide-react icons
LanguageTypeScript 5.9
BuildVite 7 (@vitejs/plugin-react-swc)
Routingreact-router 7
StateZustand
FormsReact Hook Form + Zod
BackendFirebase (Auth + Firestore), free Spark tier
FilesFilesHub (not paid object storage)
MobileCapacitor 8 (Android)
ChartsD3
AnalyticsFirebase Analytics, Amplitude, Microsoft Clarity
ErrorsSentry

Domain-driven modules

The src/ tree is organized by domaincontacts, leads, opportunities, accounts, cases, products, quotes, orders, activities, attachments, knowledge, dashboards, reports, campaigns, automation, collaboration, email, forecasting, orgs, users, and more. Each domain owns its types, services, stores, and pages. Cross-cutting services (auth, notifications, observability) live alongside them.

Zero-cost constraint

A hard rule shapes the whole design: everything must run client-side on free services.

  • No Firebase Functions and no Firebase Storage — the app talks to Firestore directly and uploads files through FilesHub.
  • No paid AI tiers — predictive scoring, churn prediction, and NLP run with client-side libraries.
  • No per-seat pricing — the product is free to operate.

Multi-tenant security

All data is scoped under an organization, with membership, roles, and permission sets enforced by Firestore security rules (firestore.rules). Sensitive admin actions are recorded in an audit log.

Three surfaces

The same backend powers three surfaces: the web app, the Android app (via Capacitor), and the browser extension (extension/). See the Browser Extension and Offline & Mobile pages.