Skip to main content

System Overview

Client Portal is a legal recruitment intelligence platform built on a serverless architecture. The frontend is a React single-page application served from Netlify's CDN. All backend logic runs on Supabase Cloud -- PostgreSQL for data, Supabase Auth for identity, Edge Functions (Deno) for integrations, and Storage for call recordings.

Architecture Diagram

Tech Stack

Frontend

TechnologyVersionPurpose
React18UI framework
TypeScript5.xType safety
Vite7.3Build tool and dev server
shadcn/ui--Component library (49 components, built on Radix)
Tailwind CSS3.4Utility-first styling
TanStack React Query5Server state management and caching
React Routerv6Client-side routing
React Hook Form--Form handling
Zod--Runtime validation

Backend (Supabase Cloud)

ServicePurpose
PostgreSQL 14.1Primary database with RLS
Supabase AuthEmail/password authentication, JWT tokens
Supabase Real-timeLive data subscriptions via WebSocket
Supabase StorageFile storage for call recordings (call-recordings bucket)
Edge Functions39 Deno functions for external integrations

External Services

ServicePurpose
GoHighLevel (GHL)Outbound calling execution, contact management
Blitz API v2Attorney enrichment (email, phone, LinkedIn data)
Google CalendarOAuth calendar integration for scheduling
Microsoft OutlookOAuth calendar integration for scheduling
Anthropic ClaudeAI call transcript summarization
ResendTransactional email (booking confirmations, reminders)
Close CRMLead management for sales pipeline
ApolloCompany and sales prospect enrichment

Deployment

LayerPlatform
FrontendNetlify (static site, auto-deploy on push to main)
BackendSupabase Cloud (managed PostgreSQL + Edge Functions)
DNSCustom domain: app.1hourrecruitment.com

Key Architectural Decisions

No API Layer

The React client talks directly to Supabase. There is no Express, Next.js API routes, or custom REST/GraphQL layer. This means:

  • Authorization is enforced by RLS -- PostgreSQL Row Level Security policies check the user's JWT on every query.
  • Data fetching uses the Supabase client -- supabase.from('table').select() directly from React components.
  • Edge functions are only for external integrations -- They handle webhook ingestion, OAuth callbacks, API calls to third-party services, and AI processing.

Edge Functions for Side Effects

Edge functions are invoked for operations that cannot be performed client-side:

  • Webhook endpoints -- GHL call webhooks, Fathom meeting webhooks, Close CRM webhooks
  • OAuth flows -- Google/Outlook calendar token exchange
  • External API calls -- Blitz enrichment, GHL sync, Close lead creation, Apollo search
  • AI processing -- Claude transcript summarization
  • Email sending -- Resend API for booking notifications and reminders

React Query as State Manager

All server state is managed through TanStack React Query. There is no Redux, Zustand, or other client-side state management library. React Query provides:

  • Automatic caching and cache invalidation
  • Background refetching
  • Optimistic updates for mutations
  • Loading and error states