Inspiration
Most sleep apps gave us charts but not decisions. We built Vigil to turn nightly sleep into a practical game plan for the next day, so one quick log can guide when to focus, recover, and shut down.
What it does
Vigil lets users log sleep (in-bed time, wake time, latency, morning rating), then generates actionable analytics: readiness, sleep debt, consistency, and productivity windows.
Recent features now include:
- A dedicated timing row with Deep Work Time, Recovery Slump, Wind-Down Time, and Optimal Bedtime.
- A calendar subscription flow that exports personal timing windows as a private tokenized
.icsfeed. - A one-click copy button for the calendar URL, so users can immediately subscribe in Apple Calendar or Google Calendar.
- Editable and deletable sleep history in Logs, plus Insights and Calendar views for trend review.
How we built it
We built Vigil with Next.js 16 (App Router) and TypeScript, using Supabase Auth + Postgres for user-scoped data persistence. Server Actions handle sleep logs, while an analytics layer normalizes backend sleep-analysis responses into dashboard-ready metrics.
For scheduling workflows, we added:
- Daily timing-window persistence with same-day upsert semantics.
- Tokenized calendar subscriptions and an API route that emits
text/calendar(.ics) events. - A resilient data-access strategy for calendar feed reads across local and deployed environments.
Challenges we ran into
The hardest challenge was balancing depth and clarity in the UI while shipping quickly. We also hit:
- Server and client boundary and hydration edge cases while iterating component behavior.
- Chart rendering and runtime sizing issues under rapid layout changes.
- Calendar feed reliability issues across deployment environments, which required updating token-based feed access.
Accomplishments that we're proud of
We are proud that Vigil is now a real end-to-end product, not just a prototype:
- Authenticated users can log, edit, and delete sleep entries.
- Analytics are reflected across Dashboard, Insights, and Calendar in near real time.
- Timing windows are exportable to external calendars through a private subscription link.
- The dashboard now surfaces explicit Optimal Bedtime guidance based on API-driven analytics.
What we learned
We learned that wellness products are most useful when they recommend actions, not just report numbers. We also learned how important data normalization, server/client boundaries, and deployment-safe backend patterns are for a polished experience.
What's next for Vigil
Next, we want to expand from reactive insights to proactive support:
- Personalized reminders for focus blocks and bedtime targets.
- Longer-term trend intelligence and anomaly detection.
- More robust automated testing and observability around analytics and calendar sync quality.
- Team benchmarking features for communities that want shared accountability.
Built With
- next.js
- python
- supabase
- tailwind
Log in or sign up for Devpost to join the conversation.