How a-abdelkarim/this-day-story-frontend works
This Day Story is a historical-events discovery web app. Visitors start on the daily-events home page or browse by date/category, then open an event detail page; the detail view also supports community contributions. Separate sign-in and registration pages are present, but authentication is a placeholder rather than a working account flow. The app uses an API helper for daily events and mock data for browsing, with shared event, navigation, and theme components. Some subsystem links reflect README-documented capabilities because their implementation excerpts were not provided.
Main entry points: [slug]/page.tsx Event Detail · app/page.tsx Daily Home · header.tsx Site Header · browse/page.tsx Browse Page
Components 18
Event Discovery
- Daily Home
app/page.tsx - Browse Page
app/browse/page.tsx - Date Filters
components/browse-client.tsx - Event API Helper
lib/api.ts - Mock Events
lib/mock-data.ts - Event Card
components/event-card.tsx
Event Details
- Event Detail
app/event/[slug]/page.tsx - Contribution Form
components/contribution-form.tsx - Contributions List
components/contributions-list.tsx
Shared UI
- Event Types
lib/types.ts - Event Utilities
lib/utils.ts - Root Layout
app/layout.tsx - Site Header
components/header.tsx - Theme Provider
lib/theme-provider.tsx - Animated Background
components/animated-background.tsx
Other components
- Visitor
Connections 25
- Visitor → Daily Home: opens
- Visitor → Browse Page: opens
- Visitor → Sign In: opens
- Visitor → Register: opens
- Daily Home → Event API Helper: fetches events
app/page.tsx - Event API Helper → Daily Home: returns events
app/page.tsx - Daily Home → Event Card: renders
app/page.tsx - Browse Page → Date Filters: renders
app/browse/page.tsx - Date Filters → Mock Events: reads events
components/browse-client.tsx - Date Filters → Event Card: renders
components/browse-client.tsx - Event Card → Event Utilities: formats event
components/event-card.tsx - Daily Home → Event Detail: links to details
- Event Detail → Event API Helper: fetches events
app/event/[slug]/page.tsx - Event Detail → Contribution Form: renders
app/event/[slug]/page.tsx - Event Detail → Contributions List: shows contributions
- Event Detail → Event Types: uses event type
app/event/[slug]/page.tsx - Event Detail → Event Utilities: maps category
app/event/[slug]/page.tsx - Daily Home → Event Types: uses response type
app/page.tsx - Root Layout → Theme Provider: provides theme
app/layout.tsx - Root Layout → Animated Background: renders
app/layout.tsx - Daily Home → Site Header: renders
app/page.tsx - Browse Page → Site Header: renders
app/browse/page.tsx - Event Detail → Site Header: renders
app/event/[slug]/page.tsx - Sign In → Site Header: renders
app/signin/page.tsx - Register → Site Header: renders
app/register/page.tsx