# MUZE Architecture & Technical Documentation - [Architecture overview](https://system.muzemus.online/overview/architecture-overview.md): High-level architecture of the MUZE Uniform Entitlement & Ordering System - [System context](https://system.muzemus.online/overview/system-context.md): People, external systems, and trust boundaries around the MUZE platform - [Technology Stack](https://system.muzemus.online/overview/technology-stack.md): Complete inventory of every library, tool, and service used in MUZE - [Repository structure](https://system.muzemus.online/overview/repository-structure.md): How the MUZE monorepo is organized - [Core concepts](https://system.muzemus.online/overview/core-concepts.md): The domain concepts that shape every part of MUZE - [System overview](https://system.muzemus.online/system-architecture/system-overview.md): How the frontend, backend, and database layers connect - [Backend architecture](https://system.muzemus.online/system-architecture/backend-architecture.md): NestJS bootstrap, middleware, filters, and request processing - [API design](https://system.muzemus.online/system-architecture/api-design.md): REST conventions, request/response patterns, and endpoint structure - [External services](https://system.muzemus.online/system-architecture/external-services.md): Third-party integrations and how MUZE connects to them - [Data flow](https://system.muzemus.online/system-architecture/data-flow.md): How data moves through the system from user action to database and back - [Authentication](https://system.muzemus.online/security/authentication.md): How staff members authenticate into MUZE using better-auth - [Authorization](https://system.muzemus.online/security/authorization.md): Capability-based authorization system using roles, permissions, and scope guards - [Roles and permissions](https://system.muzemus.online/security/roles-permissions.md): Complete reference for all roles, their scopes, and permission mappings - [Client isolation](https://system.muzemus.online/security/client-isolation.md): How MUZE isolates data between retail clients in a shared database - [Data scoping](https://system.muzemus.online/security/data-scoping.md): How the ScopeGuard and service-layer filtering enforce data boundaries - [Validation](https://system.muzemus.online/security/validation.md): Input validation patterns, DTO design, and sanitization - [Security boundaries](https://system.muzemus.online/security/security-boundaries.md): Trust boundaries, attack surface, and security measures in MUZE - [Entitlement engine](https://system.muzemus.online/business-engines/entitlement-engine.md): Core evaluation logic that determines what each employee is entitled to and when - [Replacement system](https://system.muzemus.online/business-engines/replacement-system.md): How MUZE determines when employees are due for uniform replacement - [Order lifecycle](https://system.muzemus.online/business-engines/order-lifecycle.md): Status flow, transitions, numbering, and production stages - [Order approval](https://system.muzemus.online/business-engines/order-approval.md): The approval workflow for store-submitted uniform orders - [Notifications](https://system.muzemus.online/notifications-reports/notifications.md): In-app and email notification system for order lifecycle events - [Reporting](https://system.muzemus.online/notifications-reports/reporting.md): Report generation for store spend, replacement tracking, and production - [Import system](https://system.muzemus.online/notifications-reports/import-system.md): Bulk CSV import for employees and entitlement rule sets - [Data model overview](https://system.muzemus.online/data/data-model-overview.md): High-level overview of the database schema and entity groups - [Core entities](https://system.muzemus.online/data/core-entities.md): Reference for the core database models - [Entity relationships](https://system.muzemus.online/data/entity-relationships.md): ER diagram, cascade behaviour, and unique constraints - [Prisma schema](https://system.muzemus.online/data/prisma-schema.md): How the Prisma schema is organized and the conventions it follows - [Transactions and migrations](https://system.muzemus.online/data/transactions-migrations.md): How database transactions and schema migrations are managed - [Development setup](https://system.muzemus.online/operations/development-setup.md): How to set up the MUZE development environment locally - [Configuration](https://system.muzemus.online/operations/configuration.md): How MUZE is configured across backend, frontend, and deployment - [Environment variables](https://system.muzemus.online/operations/environment-variables.md): Reference for all environment variables across backend and frontend - [Deployment](https://system.muzemus.online/operations/deployment.md): How MUZE is deployed to Render, Firebase Hosting, and Neon - [Backups and recovery](https://system.muzemus.online/operations/backups-recovery.md): Database backup strategy and disaster recovery procedures - [Monitoring and health checks](https://system.muzemus.online/operations/monitoring.md): Application monitoring, logging, and the health endpoint - [Frontend architecture](https://system.muzemus.online/engineering/frontend-architecture.md): React SPA structure, routing, state management, and component patterns - [React Query](https://system.muzemus.online/engineering/react-query.md): How the frontend uses TanStack React Query for server state management - [Testing Strategy](https://system.muzemus.online/engineering/testing-strategy.md): Overview of MUZE's testing approach across unit, integration, and E2E - [Unit & Integration Tests](https://system.muzemus.online/engineering/unit-integration-tests.md): How backend unit and integration tests are structured - [E2E testing](https://system.muzemus.online/engineering/e2e-testing.md): Browser end-to-end testing with Playwright - [Type safety](https://system.muzemus.online/engineering/type-safety.md): TypeScript patterns, Prisma-generated types, and Zod schemas - [Coding Conventions](https://system.muzemus.online/engineering/coding-conventions.md): Code style, patterns, and conventions used throughout MUZE - [Architecture decisions](https://system.muzemus.online/engineering/architecture-decisions.md): Key architectural decisions and their rationale - [Known limitations](https://system.muzemus.online/engineering/known-limitations.md): Current system limitations, technical debt, and known gaps - [Future architecture](https://system.muzemus.online/engineering/future-architecture.md): Planned improvements and their priority order