FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
lightweight
lightweightglimpse2-runbook-webhooks2
Remix of lightweight/glimpse2-runbook-auth
Public
Like
glimpse2-runbook-webhooks2
Home
Code
8
_townie
13
backend
7
frontend
1
shared
1
.vtignore
README.md
deno.json
H
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
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.
Sign up now
Code
/
Code
/
Search
main.tsx
https://lightweight--01988e9dbeb77378ab87710114810b44.web.val.run
README.md

Glance Demos

A Val Town application for managing and viewing demos with authentication.

Features

  • Authentication: Google OAuth via LastLogin
  • Dashboard: User-friendly interface showing system status
  • Health Monitoring: Real-time system health checks
  • Modular Architecture: Clean separation of concerns

Authentication

This application uses LastLogin for user authentication and implements webhook authentication for external integrations:

User Authentication

  • Login: Users sign in with their Google account
  • Protected Routes: Most routes require user authentication
  • Logout: Users can logout via /auth/logout (handled automatically by LastLogin)
  • Session Management: Automatic session validation and renewal

Webhook Authentication

  • Webhook Routes: /tasks/* routes use API key authentication
  • X-API-KEY Header: Required for all webhook endpoints
  • Secret Validation: Uses NOTION_WEBHOOK_SECRET environment variable
  • Security: Implements constant-time comparison to prevent timing attacks

Public Routes

The following routes are accessible without authentication:

  • /api/health - System health status

Protected Routes

User Authentication Required:

  • / - Main dashboard (shows user info and system status)
  • /api/* - API endpoints (except health)
  • /views/* - View routes

Webhook Authentication Required:

  • /tasks/test - Webhook authentication test endpoint
  • /tasks/notion-webhook - Main Notion webhook endpoint
  • /tasks/debug-webhook - Webhook configuration debug endpoint (GET only, bypasses auth)

Project Structure

├── backend/
│   ├── controllers/         # Business logic controllers
│   ├── routes/             # Route definitions
│   │   ├── api/            # API endpoints
│   │   ├── tasks/          # Task-related routes
│   │   ├── views/          # User-facing views
│   │   └── authCheck.ts    # User authentication middleware
│   │   └── webhookAuthCheck.ts # Webhook authentication middleware
│   └── services/           # External service integrations
├── frontend/               # Frontend assets
├── shared/                 # Shared utilities
└── main.tsx               # Application entry point

Development

The application is built with:

  • Hono: Web framework for routing and middleware
  • LastLogin: Authentication service
  • TypeScript: Type-safe development
  • Val Town: Hosting platform

Environment Variables

Configure these environment variables for full functionality:

Notion Integration

  • GLANCE_DEMOS_DB_ID - Notion database ID for demos
  • GLANCE_CONTENT_DB_ID - Notion database ID for content
  • GLANCE_INTERACTIONS_DB_ID - Notion database ID for interactions
  • NOTION_API_KEY - Notion API key for database access

Webhook Authentication

  • NOTION_WEBHOOK_SECRET - Secret key for webhook authentication (required for /tasks/* endpoints)
HTTP
  • main.tsx
    lightweight--01…44.web.val.run
Code
_towniebackendfrontendshared.vtignoreREADME.mddeno.json
H
main.tsx
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.