Skip to main content

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

SectionDescription
ArchitectureSystem overview, data flow patterns, auth model, project structure, deployment
DatabaseFull schema reference for all tables, RLS policies, migration guide
Edge FunctionsAll 39 Deno edge functions -- calendar, booking, GHL, enrichment, AI, notifications
IntegrationsGoHighLevel, Blitz API, Calendar OAuth, Close CRM, Apollo, Resend, Anthropic
OperationsEnrichment pipeline, GHL import workflow, client onboarding, call ingestion
DevelopmentLocal setup, deployment, code conventions, scripts reference
TroubleshootingCommon 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

LayerTechnology
FrontendReact 18 + TypeScript + Vite, shadcn/ui, Tailwind CSS
StateTanStack React Query 5
RoutingReact Router v6
BackendSupabase Cloud (PostgreSQL 14.1 + Auth + Real-time + Storage)
Edge FunctionsDeno (39 functions)
DeploymentNetlify (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).