A Val Town application for managing and viewing Notion-based demo content with webhook integration.
This application follows a strict layered architecture:
/backend/services/
) - Pure API calls to external systems/backend/controllers/
) - Business logic and orchestration/backend/routes/
) - HTTP request/response handlingGET /
- Dashboard with system health and demo linksGET /api/health
- System health status (public)GET /views/glimpse/:id
- Notion page data with related content as JSON (filtered for data consumption)GET /glimpse/:id
- Same as above, alternative endpointAll webhook endpoints require X-API-KEY
header with NOTION_WEBHOOK_SECRET
value.
POST /tasks/test
- Test webhook authenticationPOST /tasks/url
- Update Notion page with glimpse URL (requires X-API-KEY
header)POST /tasks/notion-webhook
- General Notion webhook handler (requires X-API-KEY
header)GET /tasks/debug-webhook
- Check webhook configuration (requires X-API-KEY
header)Required environment variables (add to vars.env
):
NOTION_API_KEY
- Notion integration API keyNOTION_WEBHOOK_SECRET
- Secret for webhook authenticationGLANCE_DEMOS_DB_ID
- Notion database ID for demosGLANCE_CONTENT_DB_ID
- Notion database ID for contentGLANCE_INTERACTIONS_DB_ID
- Notion database ID for interactionsThe application uses: