Inspiration
Ever wake up hours before your alarm, waiting in bed trying to squeeze in that extra rest time? Ever end up super sleep deprived and groggy from an intense hackathon weekend? Somnus is here to help!
- Problem: Sleep matters, but quality sleep is hard to maintain. Waking up too early can cut off valuable rest.
- Solution: Somnus detects early wake-up risk and responds with calming audio in real time. It learns from user feedback to personalize intervention methods and plans.
How we came up with Somnus: When we were brainstorming project ideas, we wanted something technically challenging, visually beautiful, and something that the average person would look at and think "I want to try that". We wanted to make something that tackled a problem that every person deals with, and in the midst of struggling to stay awake we thought "Eureka! Sleep!". After further brainstorming, getting deeper and deeper into the niche of sleep troubles, we realized there was something we all had recently experienced: we pulled an all-nighter to finish schoolwork, but somehow barely slept a full night the night after that! Even though we had planned to oversleep, our body had other ideas. From there, the core idea of Somnus was born: to have more control over your sleep!
Product Summary: Somnus -- Control your sleep!
Somnus is a personalized AI sleep strategist that learns from biometrics, environmental data, and sleep journals to intervene in real time, helping users sleep better and wake more smoothly.
Instead of only analyzing sleep after it happens, the system actively watches biometric signals and environmental noise while the user is asleep, predicts disturbances, and adjusts conditions to improve sleep quality. For example, if Somnus detects that the user is at risk of waking up before their target alarm time, it can generate interventions such as calming music or brown, white, or pink noise, as well as rain, waterfall, or wave soundscapes. It can also make waking up smoother by gradually introducing sound instead of using an abrupt alarm, easing the transition out of deep sleep. After sleep, Somnus prompts the user to complete a Sleep Journal, where they rate and review their experience. This feedback helps the model update and improve according to the user’s personalized preferences. Over time, Somnus generates increasingly effective sleep plans tailored to the individual.
Tech Stack
Core stack used in Somnus:
- Frontend: web app deployed on Vercel
- Backend: FastAPI
- Data validation / shared models: Pydantic
- Persistence / session state: SQLite
- AI logic: deterministic sleep-intervention pipeline plus GPT-assisted planning / reflection mode with safe fallback
- Deployed model:
openai/gpt-oss-120bvia an OpenAI-compatible endpoint - Deployment: Vercel (frontend) + Render (backend API)
Workflow
Workload was divided as follows:
- Boris: Sleep intelligence, deployment, front end logic, and documentation
- Jessica: Agentic backend, orchestration, APIs, and persistence
- Nicole: Front end design, branding, demos, presentation, and documentation
Boris
- Built the Sleep Intelligence system in
app/agents/intelligence/ - Implemented personalization, inference, disturbance detection, intervention, planning, and reflection logic
- Developed front end logic and connected the UI to the backend
- Deployed the frontend on Vercel and backend API on Render
- Contributed to README, Devpost, and other project documentation
Jessica
- Developed the full agentic backend architecture and core runtime orchestration
- Built the FastAPI service in
app/main.pyand API routes - Implemented intake, validation, session handling, and shared-state coordination
- Built persistence in
app/store.pywith SQLite and Pydantic models - Supported pre-sleep planning, overnight ticks, and morning reflection flows
Nicole
- Created the front end design concept and overall product direction
- Designed the logo, branding, and visual assets in
assets-and-branding/ - Made the Canva presentation and directed the demo video
- Shaped submission polish across demos, visuals, and written descriptions
- Contributed to README, Devpost, and other project documentation
Future Improvements
- Scale from web app to native
- Integrate physical interventions (e.g. smart watch vibration) to be more accessible
Challenges
The biggest challenge was definitely time-management. Our only hackathon experience was one where a project proposal was needed to apply, so this weekend we definitely struggled with coming up with a good project idea and proof of concept during the limited hacking-time. We spent most of Friday researching various ideas to see if they were realistic, which was a huge time sink. However, as pro-procrastinators of our schoolwork, once we decided on Somnus we became keyboard warriors typing away at almost every moment possible to get the project done. We were also very efficient with splitting workload effectively, and trusting each other to get it done. Overall, with the power of friendship, ChatGPT, and last-minute hardcore grinding experience, Somnus became something we are all proud of :-)
Log in or sign up for Devpost to join the conversation.