Regional Business Operating System
Railway: set each service Root Directory to apps/web or apps/api (not the repo root). See DEPLOYMENT.md.
Autonomous business management platform for a North West England exterior surface restoration company (headquarters: Burscough, Lancashire).
Phase 1 (this repository state) delivers the foundation: monorepo architecture, PostgreSQL/PostGIS-ready API, configurable territories, CRM, pricing engine, instant quotations, public website shell, and private dashboard shell.
| Path | Purpose |
|---|---|
apps/api |
Python FastAPI backend, SQLAlchemy models, pricing engine, seeds |
apps/web |
Next.js public site + business dashboard |
docker-compose.yml |
PostGIS + Redis for local development |
docs/*.md |
Architecture, roadmap, implementation status |
docker compose up -d db
cp .env.example .envcd apps/api
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000On first start the API creates tables and seeds territories A–I, services, default pricing profile, and an owner account from environment variables.
Default admin (override in .env):
- Email:
admin@revivemydrive.co.uk - Password: see
DEFAULT_ADMIN_PASSWORDin.env.example
cd apps/web
npm install
export NEXT_PUBLIC_API_URL=http://localhost:8000
npm run devOpen http://localhost:3000 for the public site and http://localhost:3000/dashboard/login for the control centre.
cd apps/api && source .venv/bin/activate && pytest -q
cd apps/web && npm run buildCI runs both on GitHub Actions (.github/workflows/ci.yml).
- Territories: Nine configurable regions with towns and postcode districts (API + dashboard view).
- CRM: Customers, properties, enquiries, pipeline stages, email deduplication.
- Pricing: Versioned profile and rules; deterministic quotation engine with minimum job, travel, VAT, margin checks.
- Quotations: Public instant quote API with section areas and stored calculation JSON.
- Auth: JWT login for owner/admin dashboard routes.
- Website: Homepage, services, regional landing pages, instant quote, legal placeholders, gallery empty state.
See IMPLEMENTATION_STATUS.md for Phase 2+ (scheduling, weather, AI agents, FreeAgent, marketing APIs, mobile field ops, etc.). No live integrations are connected or claimed as complete.
ARCHITECTURE.md— system designROADMAP.md— phased deliveryBUSINESS_RULES.md— operational rules (two-stage restoration, margins)TERRITORIES.md— territory modelINTEGRATIONS.md— planned vs verified integrationsSECURITY.md— Phase 1 security notesDEPLOYMENT.md— Railway/Docker notesTESTING.md— test strategyIMPLEMENTATION_STATUS.md— honest completion trackerDECISIONS.md— architecture decisions log