-
Notifications
You must be signed in to change notification settings - Fork 9
25 API and Route Handlers
Vicky Patel edited this page Sep 14, 2026
·
1 revision
Complete API endpoint directory, authentication protocols, and request/response contracts for PACT OS.
All route handlers are located in src/app/api/:
| Endpoint Route | HTTP Method | Auth Requirement | Purpose |
|---|---|---|---|
/api/cron/sweep-deadlines |
GET / POST
|
Bearer CRON_SECRET |
Automated deadline sweeper cron job |
/api/health |
GET |
Public | System status check & basic database ping |
/api/health/deep |
GET |
Authenticated | Deep diagnostics (migrations, RLS policies, tables) |
/api/user/export |
GET |
Session Cookie | Generates sanitized account data ZIP export |
/api/notifications/dispatch |
POST |
Service Role / Auth | Dispatches queued notifications to user channels |
/api/sync/delta |
POST |
Session Cookie | Offline multi-device sync replication delta handler |
/api/finance/webhook |
POST |
Webhook Signature | External financial transaction webhook ingestion |
/auth/callback |
GET |
OAuth Code | Supabase Auth PKCE code exchange handler |
-
Timing-Safe Auth: Expects
Authorization: Bearer <CRON_SECRET>header. - Constant-Time Comparison: Header token is compared using timing-safe string comparison to prevent side-channel timing attacks.
-
Execution Log: Sweeper updates expired task states to
missedand returns JSON summary (sweptCommitmentsCount,activatedConsequencesCount).
| 🏛️ Project Hub | 🛠️ Developer Docs | 💬 Community & Support |
|---|---|---|
| GitHub Repository | System Architecture | GitHub Discussions |
| Beginner Issue Catalog | Design System | Open Issues |
| Production Deployment | API Reference | Pull Requests |
| Project Roadmap | Testing & QA Matrix | Maintainer Governance |
- Codebase Tour
- Domain Model
- Database Architecture
- Security Model
- Financial System
- Consequence System
- External Integrations
- Discipline Intelligence
- Data Portability & Sync