Home & Today Dashboard View
Relevant source files
The following files were used as context for generating this wiki page:
The Home and Today Dashboard views provide the primary entry point and at-a-glance status for a GoCasa household. The Home view confirms the dashboard is running and links to major modules, while the Today view serves as the operational dashboard for daily activities.
The dashboard displays real-time information including household events, chores, and to-dos. It is designed for use on various devices, specifically optimized for Wall displays—devices running in an always-on "dashboard mode" that use features like Night mode and camera-based wake triggers.
Sources: GLOSSARY.md:126-130, internal/web/home_templ.go:88-95
View Architecture and Routing
GoCasa uses server-side rendering with Go templ components. The application routes HTTP requests to specific handlers that fetch data from the SQLite database and render the appropriate view components.
The diagram above shows the request flow from the user to the rendered dashboard views, including the live update mechanism.
Sources: internal/app/app.go:94-100, internal/web/home_templ.go:73-100
Core Components
| Component | Function | File Path |
|---|---|---|
Home() | Renders the initial landing page. | internal/web/home_templ.go |
Calendar() | Renders the main dashboard interface including the Today view. | internal/web/calendar_templ.go |
liveUpdates() | Provides a client-side script for real-time DOM replacement via SSE. | internal/web/calendar_templ.go |
getCalendar() | Server-side logic to aggregate events, members, and calendar info. | internal/app/calendar.go |
Today Dashboard Logic
The Today view is a specialized configuration of the calendar system. It aggregates various household data points into a single "at-a-glance" page.
Dashboard Data Aggregation
The dashboard logic processes different types of entries to provide a comprehensive view of the household's current state:
- Today's Events: Displays occurrences of one-off or recurring series scheduled for the current date.
- Household Events: Events assigned to no specific member that show for everyone regardless of filters.
- Member-Specific Data: Filters views based on selected
Members(people or pets).
Sources: GLOSSARY.md:4-22, GLOSSARY.md:126-130, internal/app/calendar.go:97-120
View Parameters and Filters
The dashboard view is controlled via URL query parameters, allowing users to pivot between different temporal scopes and member filters.
| Parameter | Type | Description |
|---|---|---|
view | string | Supports month, week, day, or agenda. |
date | string | The reference date in YYYY-MM-DD format. |
users | csv | Comma-separated list of Member IDs to filter the view. |
Sources: internal/app/calendar.go:97-108
Real-time Updates
The dashboard maintains technical currency through a Server-Sent Events (SSE) stream. When a change occurs in the backend (e.g., an event is added or a chore completed), the application publishes an event to the Bus.
The sequence diagram illustrates the live update cycle where the UI automatically refreshes specific fragments without a full page reload.
The liveUpdates() component injects a script that listens to /events/stream. Upon receiving a message or on a successful connection/reconnection, the script fetches the current page HTML, parses it, and replaces the #live element in the DOM.
Sources: internal/web/calendar_templ.go:215-243, internal/app/app.go:88, internal/app/calendar.go:167-170
Device Modes and Wall Display
GoCasa distinguishes between standard browsers and Wall displays. A Wall display is a device configured into an always-on dashboard mode.
- Default View: Each device can set its own default page (e.g., the Today view) which the wall display returns to upon waking.
- Night Mode: During set household hours, the Wall display suppresses the screensaver to show a black screen or dim clock.
- Screensaver: When idle, the dashboard transitions to a photo screensaver, pulling images from Immich or a fallback folder.
Sources: GLOSSARY.md:132-155, README.md:52-56
Summary
The Home and Today Dashboard views integrate the various modules of GoCasa—Calendar, Members, and Integrations—into a functional household hub. By utilizing server-rendered components paired with SSE-driven live updates, the dashboard provides a responsive, real-time experience suitable for both desktop browsing and dedicated wall-mounted hardware.