# Architecture

## Stack decision

Laravel 11 + Livewire 3, single codebase. React + separate API was considered and dropped — for a solo/two-person team building an unvalidated MVP, running two codebases adds auth-token handling, CORS, and duplicate build tooling for no current benefit.

## Multi-tenancy

Single database, tenant-scoped by tenant_id on every tenant-owned table.

## Auth

- No public self-registration in MVP.
- Login via mobile number OR email.
- Roles: owner and supervisor.

## Structure

app/
Models/
Livewire/
Dashboard/
Projects/
Inventory/
Finance/
Policies/

## PWA

Add a manifest + service worker for installability and caching of static assets. Do NOT attempt offline write support in MVP.
