Architecture
BATCH IQ follows a modular architecture where each frontend app connects to a shared Convex backend for data persistence, authentication, and business logic.
System Overview
Section titled “System Overview”┌─────────────────────────────────────────────────────────────┐│ 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 │ └───────────────────────────────┘Tech Stack
Section titled “Tech Stack”| Layer | Technology |
|---|---|
| Frontend | React 19, Vite 7, TanStack Router/Form |
| Backend | Convex Functions |
| Auth | Better Auth (cross-origin sessions) |
| Data | Convex Storage with JSON seed data |
Repository Structure
Section titled “Repository Structure”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 flowchartsKey Design Decisions
Section titled “Key Design Decisions”Shared Backend
Section titled “Shared Backend”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
Multi-Origin Auth
Section titled “Multi-Origin Auth”Better Auth integration keeps sessions synchronized across all app origins. Each app connects to the shared Convex backend with cross-origin session support.
AI-Powered Automation
Section titled “AI-Powered Automation”The Agent Console provides intelligent scheduling and notifications, leveraging the shared data to make context-aware decisions about quality workflows.