glimpse2-runbook-scaffold-auth
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.
main.tsx
https://lightweight--01988c288c2576cc86012dda3d3edae1.web.val.run
A Val Town application for managing and viewing demos with authentication.
- 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
This application uses LastLogin for authentication:
- Login: Users sign in with their Google account
- Protected Routes: All routes require authentication except public endpoints
- Logout: Users can logout via
/auth/logout
(handled automatically by LastLogin) - Session Management: Automatic session validation and renewal
The following routes are accessible without authentication:
/api/health
- System health status
All other routes require authentication:
/
- Main dashboard (shows user info and system status)/api/*
- API endpoints (except health)/tasks/*
- Task management routes/views/*
- View routes
āāā backend/
ā āāā controllers/ # Business logic controllers
ā āāā routes/ # Route definitions
ā ā āāā api/ # API endpoints
ā ā āāā tasks/ # Task-related routes
ā ā āāā views/ # User-facing views
ā ā āāā authCheck.ts # Authentication middleware
ā āāā services/ # External service integrations
āāā frontend/ # Frontend assets
āāā shared/ # Shared utilities
āāā main.tsx # Application entry point
The application is built with:
- Hono: Web framework for routing and middleware
- LastLogin: Authentication service
- TypeScript: Type-safe development
- Val Town: Hosting platform
Configure these environment variables for full functionality:
GLANCE_DEMOS_DB_ID
- Notion database ID for demosGLANCE_CONTENT_DB_ID
- Notion database ID for contentGLANCE_INTERACTIONS_DB_ID
- Notion database ID for interactionsNOTION_API_KEY
- Notion API key for database access