Skip to content

Architecture

BATCH IQ follows a modular architecture where each frontend app connects to a shared Convex backend for data persistence, authentication, and business logic.

┌─────────────────────────────────────────────────────────────┐
│ Frontend Apps │
├───────────────────┬───────────────────┬─────────────────────┤
│ LIMS App │ MES App │ Agent Console │
│ (TanStack Router)│ (TanStack Form) │ (Automation UI) │
└─────────┬─────────┴─────────┬─────────┴──────────┬──────────┘
│ │ │
└───────────────────┼────────────────────┘
┌───────────────────────────────┐
│ Convex Functions │
│ (@qc/backend) │
├───────────────────────────────┤
│ • Auth (Better Auth) │
│ • Multi-origin filtering │
│ • Shared business logic │
└───────────────┬───────────────┘
┌───────────────────────────────┐
│ Convex Storage + Seeded │
│ Data │
└───────────────────────────────┘
LayerTechnology
FrontendReact 19, Vite 7, TanStack Router/Form
BackendConvex Functions
AuthBetter Auth (cross-origin sessions)
DataConvex Storage with JSON seed data
qc-test-agent/
├── apps/
│ ├── lims-app/ # Approvals-first LIMS UI
│ ├── mes-app/ # Manufacturing execution dashboards
│ ├── agent-console/ # AI-assisted scheduling control center
│ └── docs/ # This documentation site
├── packages/
│ └── backend/
│ └── convex/ # Schema, functions, auth, seed data
└── docs/ # Architecture notes and flowcharts

All three apps connect to the same Convex deployment, enabling:

  • Unified data model across LIMS, MES, and Agent Console
  • Cross-app workflows (e.g., batch approval in LIMS triggers MES readiness)
  • Single source of truth for quality data

Better Auth integration keeps sessions synchronized across all app origins. Each app connects to the shared Convex backend with cross-origin session support.

The Agent Console provides intelligent scheduling and notifications, leveraging the shared data to make context-aware decisions about quality workflows.