Introduction
Workshop app
The Workshop mobile app (apps/workshop-app) is an Expo / React Native client for Car Warranty workshop staff. It complements the staff CRM embedded in sites/car-warranty and uses the same platform gateway contracts documented here.
Authentication
Sign-in is Directory email and password (POST /directory/v1/auth/login). The account must include a garage-crm service membership—the same gate as the Car Warranty /staff area. Native builds do not use Cloudflare Turnstile.
JWTs are sent as Authorization: Bearer on every CRM service call. Refresh uses POST /directory/v1/auth/refresh with the stored refresh token.
Gateway
Production base URL: https://api.mayawealth.co.uk
Local development: http://localhost:8789 after ./scripts/platform/dev.sh --product garage.
Unlike marketing sites, the app does not use a site /api/* proxy. It calls gateway paths directly:
| Service | Path prefix | Used for |
|---|---|---|
| Directory | /directory/v1 | Login, /auth/me, org profile |
| Customers | /customers/v1 | Customers and vehicles |
| Bookings | /bookings/v1 | Diary and appointments |
| Quotes | /quotes/v1 | Jobs, quotes, evidence (jobs in app v1) |
| Billing | /billing/v1 | Invoices (web CRM today) |
| Communications | /communications/v1 | Messages (web CRM today) |
| Enquiry | /enquiry/v1 | Staff marketing inbox (GET /enquiries) |
| Expense | /expense/v1 | Optional cross-product expense (Directory membership) |
OpenAPI references: Customers API, Bookings API, Quotes API, Enquiry API, Directory API.
Product scope (v1)
The first mobile release focuses on read-heavy operational views:
- Dashboard counts (customers, vehicles, bookings, jobs, enquiries)
- Bookings list
- Customers list
- Jobs list
- Enquiry inbox for site
car-warranty
Write flows, quotes, invoices, evidence capture, and admin Directory screens remain on the web staff CRM until parity is needed on mobile.
Run locally
cd apps/workshop-app
pnpm install
cp .env.example .env # optional
pnpm start # Metro on :8813, web on :8812See the app README for USB/LAN gateway hints.