How fourier-tech/galla works
Galla is a multi-tenant salon-management SaaS. Its main workflow is owner/staff sign-in into a tenant-scoped dashboard, where staff manage orders, inventory, customers, services, suppliers, and expenses; dashboard actions persist domain changes and can broadcast updates. Analytics is a separate read-oriented capability, with rollups supporting reporting. The graph reflects documented product scope and indexed module references; several implementation details are unsampled, so their connections are omitted or cited to the README rather than inferred.
Main entry points: dashboard-client.tsx Dashboard client · actions.ts Domain actions · models Domain records · route.ts Workspace registration
Components 24
Access & tenancy
- Sign-in
src/components/auth/login-form.tsx - Auth service
src/lib/auth/auth.ts - Workspace registration
src/app/api/auth/register/route.ts - Access-code service
src/lib/auth/code-service.ts - Tenant records
src/lib/db/models/tenant.model.ts
Salon operations
- Dashboard page
src/app/dashboard/page.tsx - Dashboard client
src/components/dashboard/dashboard-client.tsx - Order workspace
src/components/dashboard/tabs/orders-tab.tsx - New order form
src/components/dashboard/modals/new-order-modal.tsx - Inventory workspace
src/components/dashboard/tabs/inventory-tab.tsx - Services workspace
src/components/dashboard/tabs/services-tab.tsx - Domain actions
src/app/dashboard/actions.ts - Orders API
src/app/api/orders/route.ts - Expenses API
src/app/api/expenses/route.ts - Products API
src/app/api/products/route.ts
Analytics
- Analytics endpoint
src/app/api/analytics/route.ts - Analytics rollups
src/lib/analytics/rollup-service.ts - Analytics views
src/components/dashboard/analytics
Persistence & integrations
- Domain records
src/lib/db/models - MongoDB connection
src/lib/db/mongodb.ts - Tenant realtime
src/lib/realtime/pusher-server.ts - Email service
src/lib/email/email-service.ts
Other components
- Owner / staff
- Pusher Channels
Connections 26
- Owner / staff → Sign-in: signs in
README.md - Sign-in → Auth service: authenticates
README.md - Owner / staff → Workspace registration: creates workspace
README.md - Workspace registration → Tenant records: creates tenant
src/app/api/auth/register/route.ts - Workspace registration → Access-code service: requests codes
src/app/api/auth/register/route.ts - Access-code service → MongoDB connection: connects to
src/lib/auth/code-service.ts - Access-code service → Email service: sends codes
src/lib/auth/code-service.ts - Auth service → Dashboard page: protects access
README.md - Dashboard page → Dashboard client: renders
src/app/dashboard/page.tsx - Dashboard client → Order workspace: shows tab
src/components/dashboard/dashboard-client.tsx - Dashboard client → Inventory workspace: shows tab
src/components/dashboard/dashboard-client.tsx - Dashboard client → Services workspace: shows tab
src/components/dashboard/dashboard-client.tsx - Order workspace → New order form: opens form
src/components/dashboard/tabs/orders-tab.tsx - Dashboard client → Domain actions: invokes actions
src/components/dashboard/dashboard-client.tsx - Services workspace → Domain actions: invokes actions
src/components/dashboard/tabs/services-tab.tsx - Domain actions → MongoDB connection: connects to
src/app/dashboard/actions.ts - Domain actions → Domain records: reads and writes
src/app/dashboard/actions.ts - Domain actions → Tenant realtime: broadcasts updates
src/app/dashboard/actions.ts - Orders API → Domain records: queries orders
src/app/api/orders/route.ts - Orders API → MongoDB connection: connects to
src/app/api/orders/route.ts - Expenses API → Domain records: queries expenses
src/app/api/expenses/route.ts - Products API → Domain records: queries products
src/app/api/products/route.ts - Analytics endpoint → Domain records: queries domain data
src/app/api/analytics/route.ts - Analytics endpoint → Analytics rollups: uses rollups
src/app/api/analytics/route.ts - Dashboard client → Analytics views: shows analytics
src/components/dashboard/dashboard-client.tsx - Tenant realtime → Pusher Channels: publishes events
README.md