Skip to content

Foot Factory

Foot Factory is a multi-tenant SaaS platform for factory operations management. It handles job tracking, worker wage calculation, article management, and dynamic per-tenant schemas — all with strict tenant isolation.

Components

Component URL Description
Client App foot-factory.dotevolve.net Factory floor app for workers and admins
Admin Dashboard foot-factory-admin.dotevolve.net Super Admin dashboard for tenant and schema management
API foot-factory-api.dotevolve.net REST backend (Node.js/Express/MongoDB)

Platform Integration

Foot Factory is part of the DotEvolve platform. Authentication, tenant management, billing, and subdomain provisioning are all handled by the Central Portal — not by Foot Factory itself.

graph LR
    A[User] -->|Login| B[Supabase Auth]
    B -->|JWT with app_metadata| C[Foot Factory Client]
    C -->|Bearer JWT| D[Foot Factory API]
    D -->|activeTenantId from JWT| E[MongoDB Atlas]
    D -->|plan limits| F[Portal API]
    B -->|app_metadata| G[Admin Portal]
    G -->|manage tenants/users| F

Key Concepts

Concept Description
TenantConfig Per-tenant schema: job steps, article attributes, size range. Managed in the admin dashboard.
Job A production batch with line items (article + sizes + attributes) and sequential steps.
Worker A factory worker assigned to job steps; earnings tracked via ledger entries.
Article A product type with per-step wage rates (stepRates).
Plan Limits Fetched from Portal API at request time (Redis-cached). Controls max users, workers, job steps, article attributes.
Tenant Isolation Every MongoDB query is automatically scoped to activeTenantId from the JWT.