How lucifer-kj/personal-os-edge works
Personal OS Edge is a Cloudflare Workers API for lead management, voice capture, MCP tools, and n8n automation. Clients enter through the Hono worker/router; authenticated requests pass through token authorization before domain handlers process them. Leads are validated, scored, deduplicated and stored; voice is transcribed, recorded in the inbox and optionally forwarded; MCP exposes CRM and Personal OS tools; n8n dispatch triggers workflows. The handlers use a shared Supabase REST/RPC client. README capabilities not visible in sampled handlers are retained where documented; no implementation detail is inferred for them.
Main entry points: supabase.ts Supabase REST client · index.ts Hono worker · voice.ts Voice transcription · auth.ts Token middleware
Components 15
Worker entry
- Hono worker
src/index.ts - Health probe
src/routes/health.ts
Authorization
- Token middleware
src/lib/auth.ts
Lead management
- Lead API
src/routes/leads.ts - Lead ingestion
src/routes/leads.ts
Voice capture
- Voice transcription
src/routes/voice.ts - Workers AI Whisper
- Voice inbox items
Agent integrations
- MCP server
src/routes/mcp.ts - Workflow dispatch
src/routes/n8n.ts
Persistence
- Supabase REST client
src/lib/supabase.ts - Supabase data
Other components
- API clients
- n8n agents
- Lead sources
Connections 25
- API clients → Hono worker: send requests
src/index.ts - Hono worker → Health probe: routes to
src/index.ts - Hono worker → Lead API: routes to
src/index.ts - Hono worker → Lead ingestion: routes to
src/index.ts - Hono worker → Voice transcription: routes to
src/index.ts - Hono worker → MCP server: routes to
src/index.ts - Hono worker → Workflow dispatch: routes to
src/index.ts - Lead API → Token middleware: checks scope
src/routes/leads.ts - Voice transcription → Token middleware: checks scope
src/routes/voice.ts - MCP server → Token middleware: checks scope
src/routes/mcp.ts - Workflow dispatch → Token middleware: checks scope
src/routes/n8n.ts - Health probe → Supabase REST client: queries status
src/routes/health.ts - Token middleware → Supabase REST client: resolves tokens
src/lib/auth.ts - Lead API → Supabase REST client: reads and converts
src/routes/leads.ts - Lead ingestion → Supabase REST client: deduplicates and stores
src/routes/leads.ts - MCP server → Supabase REST client: executes tools
src/routes/mcp.ts - Supabase REST client → Supabase data: REST and RPC
src/lib/supabase.ts - Voice transcription → Workers AI Whisper: transcribes audio
src/routes/voice.ts - Voice transcription → Supabase REST client: records transcript
src/routes/voice.ts - Supabase REST client → Voice inbox items: stores memo
- Lead sources → Lead ingestion: submit leads
README.md - n8n agents → MCP server: uses MCP tools
README.md - Voice transcription → n8n agents: forwards transcript
src/routes/voice.ts - Lead ingestion → n8n agents: notifies ingestion
src/routes/leads.ts - Workflow dispatch → n8n agents: dispatches workflow
src/routes/n8n.ts