1.3 KiB
1.3 KiB
API & Routing Endpoints
API Endpoints
1. Clerk Webhook
- Path:
/api/webhooks/clerk - Method:
POST - Purpose: Handles Clerk webhook events (authentication, user sync, etc.)
2. File Upload (UploadThing)
- Path:
/api/uploadthing - Methods:
GET,POST - Purpose: Handles file uploads (contracts, images) with authentication
Protected App Routes (Require Login)
Defined in middleware (proxy.ts):
/dashboardand all sub-pages/contractsand all sub-pages/chatand all sub-pages/claimsand all sub-pages/blockchainand all sub-pages/settingsand all sub-pages/api/contractsand all sub-pages/api/chat/api/claims
Feature API Actions (Server Actions)
These are called from the frontend, not as REST endpoints:
/features/contracts/api/contract.action.ts(contract CRUD, AI analysis)/features/analytics/api/stats.action.ts(dashboard stats)/features/notifications/api/notification.action.ts(notifications)/features/auth/api/user.action.ts(user sync)
Note:
- All
/dashboard,/contracts,/chat,/claims,/blockchain,/settingsroutes are protected and require authentication. - API endpoints under
/api/may also be protected by middleware. - For more details, see the middleware configuration in proxy.ts.