About Soja
A circadian rhythm recovery tool built on published sleep science. Not generic bedtime advice.
What Soja does
Soja takes four inputs: what disrupted your sleep, your normal schedule, what actually happened last night, and when you need to function next. It returns a day-by-day plan with exact timing for light exposure, caffeine, melatonin, and your sleep window.
The plan is different for every person and every disruption type. Flying east requires a different protocol than flying west. An all-nighter requires a different approach than a gradual schedule drift. A night owl recovering from jet lag needs different timing than an early bird. Soja generates the right plan for the specific situation.
The science behind it
The circadian clock is not a simple sleep-wake toggle. It is a ~24-hour timing system embedded in virtually every cell, coordinated by the suprachiasmatic nucleus (SCN) in the hypothalamus. The SCN receives direct light input from the retina and broadcasts phase signals to peripheral clocks throughout the body.
The key variable in any recovery protocol is your DLMO — dim-light melatonin onset, the point roughly two hours before your natural sleep time when the pineal gland begins releasing melatonin. DLMO is the most reliable marker of circadian phase. The timing of light exposure, melatonin supplements, and other interventions is calculated relative to DLMO — not to clock time or to when you feel tired.
The circadian clock can advance (shift earlier) at a maximum rate of roughly 1 hour per day under optimal conditions, and can delay (shift later) slightly faster. Any protocol that tries to shift faster than this produces fragmented sleep and poor recovery. Soja’s plans are rate-limited accordingly.
How the algorithm works
The algorithm runs three stages for every plan:
- 1
DLMO estimation
Your DLMO is estimated from your normal sleep schedule. Chronotype (early bird, moderate, night owl) applies a calibration offset — night owls have a delayed DLMO relative to their stated bedtime; early birds have an earlier one. The estimate is anchored 120 minutes before your typical sleep onset.
- 2
Phase shift calculation
The algorithm calculates the total phase shift required to reach your target wake time, then distributes it across recovery days at a physiologically realistic rate: up to 60 minutes of advance per day, up to 90 minutes of delay per day. A deadzone of 15 minutes prevents unnecessary interventions for trivial misalignments. Sleep debt (actual vs. normal sleep time) is factored in to determine whether extra recovery sleep is warranted on day one.
- 3
Practicality filtering
The raw plan is run through a practicality filter that removes or adjusts interventions that conflict with the user’s preferences (caffeine-free, no melatonin) or that fall outside reasonable hours. Melatonin timing is validated against the estimated DLMO to ensure it produces a phase advance rather than a neutral or counterproductive signal.
Try it
Answer 4 questions about your sleep disruption. Get your personalised day-by-day recovery plan.
Build my plan↗Free · No account needed · Takes 2 minutes