Workers
Portal Worker
File:workers/worker.js
Main portal API worker providing:
- Portal updates: GET/PATCH endpoints for updates
- Goals management: Goal tracking and status
- Tool links: Quick-access tool URLs
- Search functionality: Portal-wide search
- SSO integration: Single sign-on initiation
- Linear integration: Task fetching
- Notion integration: Page fetching
- Organization matrix: Team overview
Endpoints
GET /api/portal/updates Returns array of portal updates. PATCH /api/portal/updates/:id Updates specific update fields. GET /api/portal/goals Returns project goals. GET /api/portal/tools Returns tool links. GET /api/portal/search Portal-wide search. GET /api/portal/status Portal status information.Authentication
Uses JWT authentication with secret verification:Storage
Uses Cloudflare Workers KV for data storage:- Namespace:
PORTAL_UPDATES - Key format:
update:{id},goal:{id}, etc.
Gateway Worker
File:workers/gateway.ts
Gateway worker for routing and proxying requests.
Lead Ingest Worker
File:workers/lead-ingest.ts
HubSpot lead ingestion worker:
- Lead capture: Form submissions
- HubSpot API: CRM integration
- Data transformation: Format conversion
Configuration
wrangler.toml
Deployment
Deploy workers:KV Setup
Create KV namespace:wrangler.toml with the namespace ID.
Related Documentation
- Frontend Services - Service layer
- Frontend Components - Components