glimpse2-runbook-test
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v51View latest version
A Val Town application for managing and viewing Notion-based demo content with webhook integration.
This application follows a strict layered architecture:
- Services (
/backend/services/
) - Pure API calls to external systems - Controllers (
/backend/controllers/
) - Business logic and orchestration - Routes (
/backend/routes/
) - HTTP request/response handling
GET /
- 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 endpoint
All 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 (requiresX-API-KEY
header)POST /tasks/notion-webhook
- General Notion webhook handler (requiresX-API-KEY
header)GET /tasks/debug-webhook
- Check webhook configuration (requiresX-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 interactions
- Google OAuth Authentication - Secure user authentication via LastLogin
- Notion Integration - Read and update Notion pages and databases
- Webhook Support - Automated URL updates from Notion
- Health Monitoring - System status and database connectivity checks
- Interactive Dashboard - Test endpoints and view demo links
The application uses:
- Hono - Web framework for API routes
- LastLogin - Authentication service
- Notion API - Database and page management
- TypeScript - Type safety and development experience