Internal Documentation
Welcome to the internal engineering documentation for Client Portal -- the market intelligence platform powering 1 Hour Recruitment.
This documentation is intended for the 1HR engineering team. It covers system architecture, database schema, edge functions, integrations, operational procedures, and development workflows.
What's Covered
| Section | Description |
|---|---|
| Architecture | System overview, data flow patterns, auth model, project structure, deployment |
| Database | Full schema reference for all tables, RLS policies, migration guide |
| Edge Functions | All 39 Deno edge functions -- calendar, booking, GHL, enrichment, AI, notifications |
| Integrations | GoHighLevel, Blitz API, Calendar OAuth, Close CRM, Apollo, Resend, Anthropic |
| Operations | Enrichment pipeline, GHL import workflow, client onboarding, call ingestion |
| Development | Local setup, deployment, code conventions, scripts reference |
| Troubleshooting | Common issues and debugging guides for GHL, calendar, and enrichment |
How to Navigate
- Use the sidebar to browse by section.
- Use search (top bar) to find specific tables, functions, or concepts.
- Architecture pages include Mermaid diagrams for visual system understanding.
- Database pages include full column listings with types and descriptions.
- Edge function pages document inputs, outputs, and side effects for each function.
Tech Stack at a Glance
| Layer | Technology |
|---|---|
| Frontend | React 18 + TypeScript + Vite, shadcn/ui, Tailwind CSS |
| State | TanStack React Query 5 |
| Routing | React Router v6 |
| Backend | Supabase Cloud (PostgreSQL 14.1 + Auth + Real-time + Storage) |
| Edge Functions | Deno (39 functions) |
| Deployment | Netlify (frontend) + Supabase Cloud (backend) |
Key Principle
There is no custom API layer. The React client communicates directly with Supabase using the @supabase/supabase-js client library. Row Level Security (RLS) policies enforce authorization at the database level. Edge functions handle integrations with external services (GHL, Blitz, Calendar APIs, Claude AI).