FMCG DatabaseMulti-tenant CRMOffline-first roadmap

Foundation Slice

FMCG by Alex CRM is scaffolded for shared master data, tenant overlays, and a Cloudflare-first delivery path.

The repository now has a real monorepo shape, a typed Worker API, a company database MVP, explicit tenant-context handling, and documented sync contracts.

Architecture Guardrails

Shared master records stay global. Notes, tasks, pipeline state, and saved views remain tenant-private.

The Worker owns auth and tenant resolution. The UI does not decide effective tenant scope.

Demo data and development-header auth are explicit bootstrap modes, not hidden production fallbacks.

Master Dataset
6
Seeded FMCG company profiles across manufacturers, distributors, importers, retailers, and service providers.
Runtime Target
Workers
Web and API paths aligned on Cloudflare Workers for D1, R2, KV, and queue integration.
Sync Strategy
Idempotent
Operation-based desktop sync contracts are scaffolded before persistence is wired.

What Exists

Initial build outputs

  • Typed monorepo foundation with pnpm and Turbo workspace boundaries
  • Worker API for `/health`, `/me`, `/companies`, and `/companies/:slug`
  • Shared validation, permissions, search rules, and D1 migration draft
  • Next.js company browser with explicit demo or API-backed data modes
  • Tauri desktop shell scaffold prepared for phase-three offline work

Next Milestones

Priority delivery path

  • Managed auth adapter and tenant membership persistence
  • Tenant-private notes, tasks, lists, and pipeline records
  • Admin master-data moderation tools and import review queues
  • Billing integration and plan enforcement
  • Local SQLite mirror plus sync push/pull endpoints for desktop