https://github.com/belphemur/night-routine
A Go application that manages night routine scheduling between two parents, with Google Calendar integration for automated event creation.
https://github.com/belphemur/night-routine
calendar go toddler
Last synced: 20 days ago
JSON representation
A Go application that manages night routine scheduling between two parents, with Google Calendar integration for automated event creation.
- Host: GitHub
- URL: https://github.com/belphemur/night-routine
- Owner: Belphemur
- License: agpl-3.0
- Created: 2025-03-27T05:25:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-06-15T11:48:50.000Z (22 days ago)
- Last Synced: 2026-06-16T10:35:33.848Z (21 days ago)
- Topics: calendar, go, toddler
- Language: Go
- Homepage:
- Size: 4.62 MB
- Stars: 15
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
Night Routine Scheduler
A Go application that manages night routine scheduling between two parents, with Google Calendar integration for automated event creation and optional babysitter assignment support.
## Why?
Managing night routine duties between parents can be challenging. This application automates the scheduling process with a sophisticated fairness algorithm that considers multiple factors:
- **Fair distribution** - Balances total assignments and recent patterns
- **Availability awareness** - Respects each parent's unavailable days
- **Transparency** - Every assignment includes a clear decision reason
- **Flexibility** - Supports manual overrides when life happens
- **Babysitter support** - Assign specific dates to named babysitters, tracked separately from parent fairness
- **Google Calendar integration** - Seamlessly syncs with your existing calendar workflow
The application ensures both parents share night routine duties fairly while maintaining flexibility for real-world scheduling needs.
## Key Features
### Configuration Management
- **Web-Based Settings UI** - Intuitive interface for managing all runtime configuration
- Configure parent names that appear in calendar events
- Set availability constraints for each parent
- Adjust schedule frequency and planning horizon
- Changes take effect immediately without application restart
- **Database-Backed Configuration** - Settings stored in SQLite database
- Persistent across application restarts
- Atomic transactions ensure consistency
- Database constraints validate data integrity
- Automatic backup and migration support
- **Automatic Sync** - Settings changes trigger immediate calendar synchronization
- Schedule recalculates based on new constraints
- Calendar events updated automatically
- Fairness algorithm adjusts to new availability patterns
- **Smart Initialization** - First-run setup made easy
- Initial configuration from TOML file seeds database
- Automatic migration from file-based to database configuration
- Seamless upgrade path preserves existing settings
### Scheduling Intelligence
- **Fair Distribution** - Sophisticated algorithm balances assignments between parents
- **Availability Awareness** - Respects each parent's unavailable days
- **Transparency** - Every assignment includes a clear decision reason with detailed fairness calculations
- **Assignment Details** - Click any assignment to view the fairness algorithm calculations that determined the assignment
- **Flexibility** - Supports manual overrides when life happens
- **Babysitter Assignments** - Assign named babysitters to specific dates, excluded from parent fairness calculations
- **Google Calendar Integration** - Seamlessly syncs with your existing calendar workflow
## Screenshots
### Calendar Dashboard
The home page displays a monthly calendar grid with all night routine assignments. Each cell shows the assigned caregiver, the decision reason, and uses color coding for quick identification:
- **Blue** — Parent A assignments
- **Amber** — Parent B assignments
- **Gray** — Babysitter assignments
- **Lock icon** — Manually overridden (locked) assignments

_Calendar dashboard with equal-width columns and uniform row heights. Decision reasons (Total Count, Alternating, Double Consecutive Swap, etc.) wrap naturally within cells. The "Sync Now" button triggers schedule regeneration — the home page is read-only by default._
### Assignment Details Feature
Click on any assignment in the calendar to view detailed information about how the fairness algorithm made its decision:

_Desktop view: Click any assignment to see the calculation date and both parents' statistics (total assignments and last 30 days count) at the time the assignment was made._

_Mobile view: The assignment details modal is fully responsive and provides the same transparency on mobile devices._
The assignment details modal shows:
- **Calculation Date** - When the fairness algorithm evaluated this assignment
- **Parent Statistics** - Total assignments and last 30-day counts for both parents at decision time
- **Decision Explanation** - How the algorithm used these statistics to ensure balanced distribution
This feature provides complete transparency into the scheduling logic, helping families understand and trust the automated assignment process.
## Quick Start with Docker
Pre-built multi-architecture Docker images (supporting both amd64 and arm64) are available in the GitHub Container Registry:
```bash
# Pull the latest release
docker pull ghcr.io/belphemur/night-routine:latest
# Run the container
docker run \
-e NR_OAUTH__CLIENT_ID=your-client-id \
-e NR_OAUTH__CLIENT_SECRET=your-client-secret \
-e CONFIG_FILE=/app/config/routine.toml \
-v /path/to/config:/app/config \
-v /path/to/data:/app/data \
-p 8080:8080 \
ghcr.io/belphemur/night-routine:latest
```
For easier setup with Docker Compose, see the [installation documentation](https://belphemur.github.io/night-routine/installation/docker-compose/).
_Note: These images are signed using Sigstore Cosign and include SBOM attestations for enhanced security._
## Documentation
For comprehensive documentation including configuration, features, and development guides, visit the [**Night Routine Scheduler Documentation**](https://belphemur.github.io/night-routine/).
**Quick Links:**
- [Features Overview](https://belphemur.github.io/night-routine/features/)
- [Installation Guide](https://belphemur.github.io/night-routine/installation/docker/)
- [Configuration](https://belphemur.github.io/night-routine/configuration/toml/)
- [First-Time Setup](https://belphemur.github.io/night-routine/user-guide/setup/)
- [Architecture & Design](https://belphemur.github.io/night-routine/architecture/overview/)
## License
This project is open source and available under the [AGPLv3 License](LICENSE).