How mouredev/code-history-day-web works
Code History Day is a daily programming-and-technology history web app. A visitor opens the terminal-style page; it gets the visitor’s local date, requests that date’s ephemeris through the Next.js API, and displays a formatted event that can be shared on X. The API reads persistent records from Supabase. Separately, the documented daily generation process uses OpenAI and writes generated entries to Supabase. Source excerpts support the display/API flow; the generator’s integrations are documented in the README, not verified from its implementation here.
Main entry points: page.tsx Terminal page · generate-daily-ephemeris.js Daily generator · sidebar.tsx Responsive sidebar · ephemerides.ts Date and display logic
Components 15
Daily experience
- Terminal page
app/page.tsx - X sharing
- Browser utilities
lib/browser-utils.ts
Ephemeris service
- Date and display logic
lib/ephemerides.ts - Ephemeris API
app/api/ephemerides/route.ts - Supabase records
Content generation
- Daily generator
scripts/generate-daily-ephemeris.js - OpenAI
UI foundations
- Reusable UI components
components/ui - Responsive sidebar
components/ui/sidebar.tsx - Mobile detection
hooks/use-mobile.tsx - Toast state
hooks/use-toast.ts - Toast presentation
components/ui/toast.tsx - Theme provider
components/theme-provider.tsx
Other components
- Visitor
Connections 12
- Visitor → Terminal page: opens
- Terminal page → Date and display logic: requests date
app/page.tsx - Date and display logic → Ephemeris API: fetches date
lib/ephemerides.ts - Ephemeris API → Supabase records: reads records
app/api/ephemerides/route.ts - Terminal page → X sharing: shares event
app/page.tsx - Daily generator → OpenAI: generates content
- Daily generator → Supabase records: stores entries
- Terminal page → Browser utilities: gets OS info
app/page.tsx - Responsive sidebar → Mobile detection: detects device
components/ui/sidebar.tsx - Responsive sidebar → Reusable UI components: uses sheet and tooltip
components/ui/sidebar.tsx - Toast state → Toast presentation: uses toast types
hooks/use-toast.ts - Terminal page → Reusable UI components: renders interface
app/page.tsx