Calendar Events Display

A Val Town application that fetches and displays Google Calendar events with translation support.

Structure

├── backend/
│   └── index.ts             # Main Hono app with routes
├── shared/
│   └── calendar.ts          # Shared calendar parsing and HTML generation
├── index.ts                 # Entry point (redirects to backend)
└── README.md

Environment Variables

  • GOOGLE_CALENDAR_URL - The public iCal URL for your Google Calendar

Endpoints

Main Application

  • GET / - Displays formatted calendar events with translation support

Debug Endpoints

  • GET /debug/raw-calendar - Returns the raw iCal data from Google Calendar
  • GET /debug/parsed-events - Returns parsed events in JSON format

Features

  • Fetches events from yesterday to 2 months in the future
  • Displays events in Pacific Time
  • Google Translate integration with URL parameter support (?lang=es)
  • Responsive design matching Givebacks style
  • Debug endpoints for troubleshooting calendar data

Usage

  1. Set the GOOGLE_CALENDAR_URL environment variable to your public Google Calendar iCal URL
  2. Visit the main endpoint to see formatted events
  3. Use debug endpoints to troubleshoot calendar data issues
  4. Add ?lang=<language_code> to translate the page (e.g., ?lang=es for Spanish)