Skip to content

Conversation

@devdumpling
Copy link
Owner

Summary

Completes M1 milestone by adding session-based authentication and analytics visualizations to the dashboard.

Authentication (Lucia v3)

  • Server hooks validate sessions on each request via hooks.server.ts
  • Login/register pages with argon2 password hashing (@node-rs/argon2)
  • Protected routes redirect unauthenticated users to /login
  • Auth-gated layout displays user email and sign out button
  • Zero client initialization tied to user session ID
  • New migration 002_dashboard_auth.sql adds dashboard_users and dashboard_sessions tables

Analytics Visualizations (LayerChart)

  • EventsOverTimeChart: Area chart with spline showing event counts over time
  • SessionsTrendChart: Spline chart for session trends
  • TopEventsChart: Horizontal bar chart for event frequency
  • OverviewDashboard with reactive Zero queries and date range picker (7/30/90 days)
  • Rose Pine themed axis and tooltip styling

Other

  • SVG favicon with "B" logo
  • TypeScript config for dashboard
  • Updated quickstart docs with registration instructions

Implement session-based auth with Lucia v3 and postgres adapter:
- Server hooks validate sessions on each request
- Login/register pages with argon2 password hashing
- Protected routes redirect to /login when unauthenticated
- Auth-gated layout with user email display and sign out
- Zero client initialization tied to user session
- Get-queries endpoint extracts user context from session
Add time-series and bar charts for dashboard overview:
- EventsOverTimeChart: area chart with spline for event counts
- SessionsTrendChart: spline chart for session trends
- TopEventsChart: horizontal bar chart for event frequency
- OverviewDashboard updated with reactive Zero queries
- Rose Pine themed axis and tooltip styling in app.css
- Added d3-scale, d3-shape, and layerchart dependencies
- Add SVG favicon with Rose Pine iris "B" logo
- Update app.html to reference SVG favicon
- Add tsconfig.json for dashboard type checking
Update roadmap to reflect completed M1 items:
- Dashboard authentication (Lucia + session cookies)
- Basic analytics visualizations (LayerChart)

Update quickstart with registration instructions.
@devdumpling devdumpling self-assigned this Dec 1, 2025
- Update useQuery/useQueryOne to accept getter functions for reactive params
- Refactor OverviewDashboard to use useQuery instead of manual materialize/run
- Fix all components to use getter pattern for prop-based query params

This ensures queries properly re-run when their parameters (projectId,
sessionId, days) change, following Zero's synced query best practices.
@devdumpling devdumpling merged commit b2bdd58 into main Dec 1, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants