Project Documentation
Single source of truth for routes, deploy flow, runtime mode, and troubleshooting.
2) Runtime Mode
- Current CRM mode: auth-off (no magic-link login gate).
- Frontend writes call API endpoints directly with JSON actions.
- Auth should only be reintroduced when explicitly requested.
3) Deploy Flow
- Repository:
dkrumble/derrick-labs-web
- Branch:
main
- Each push to
main triggers Vercel deployment.
- Web and API are separate Vercel projects (API root:
api-service/).
4) Environment Variables (API project)
| Variable | Purpose |
SUPABASE_URL | Supabase project URL |
SUPABASE_SERVICE_ROLE_KEY | Server-side DB/API access (private) |
SUPABASE_ANON_KEY | Used for helper validation paths |
5) API Endpoints
GET /api/crm — contacts, deals, activities
GET /api/quotes — quotes + quote items
POST /api/crm-write — action-based writes:
create/update/delete_contact
create/update/delete_deal, update_deal_stage
create/delete_activity
create_quote, update_quote_status, delete_quote
6) Current CRM/Quote Notes
- CRM includes contact/deal CRUD + activity timeline.
- Quote workflow supports multi-line items, statuses, duplicate, and PDF export.
- If quote creation fails, check frontend for missing helper functions and API write endpoint errors.
7) Troubleshooting Quick Checks
- Check status page first: /status
- Verify API health JSON: /health.json
- Verify CRM API response: /api/crm
- If deploy fails on Vercel, confirm Git commit author email matches linked account.