Skip to content

About

A beautiful, interactive visualization of your entire life displayed as tiny squares

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Your Life in Days

A beautiful, interactive visualization of your entire life displayed as tiny squares — where each square represents one single day. Inspired by Tim Urban's famous Your Life in Weeks post from Wait But Why.

Life in Days SQLite Python

✨ Features

📅 Daily Visualization

  • Each tiny square = 1 day of your life
  • 365 days per row = 1 year
  • See your entire life (up to 90+ years) at a glance

🎨 Mark Important Days

  • Click any day to add a note
  • Choose from 8 beautiful colors
  • Record birthdays, milestones, memories, or goals

🔍 Zoom & Navigation

  • Zoom slider (1x to 10x) to see details
  • Go to Date - Jump to any specific date
  • Go to Age - Jump to a specific age
  • Today button - Instantly find today
  • Keyboard shortcuts: +/- to zoom, T for today
  • Ctrl + Scroll to zoom with mouse

💾 SQLite Database Storage

  • Data saved permanently to life_in_days.sqlite
  • Real-time saving on every edit
  • Export your database anytime
  • Import to restore or transfer data

📊 Statistics Dashboard

  • Days lived
  • Days remaining
  • Life progress percentage
  • Number of marked days

🚀 Quick Start

Prerequisites

  • Python 3.x

Installation

# Clone or download the project
cd life-in-days

# Start the server
python3 server.py

Usage

  1. Open http://localhost:8080 in your browser
  2. Enter your Date of Birth
  3. Set your Life Expectancy (default: 90 years)
  4. Click "Generate My Life"
  5. Start marking important days!

📁 Project Structure

life-in-days/
├── index.html          # Main HTML page
├── styles.css          # Styling (dark theme)
├── app.js              # Frontend JavaScript
├── server.py           # Python backend server
├── life_in_days.sqlite # Your data (auto-created)
└── README.md           # This file

🎮 Keyboard Shortcuts

Key Action
T Jump to today
+ / = Zoom in
- Zoom out
Esc Close modal
Ctrl + Scroll Zoom with mouse

🗄️ Database Schema

The SQLite database contains two tables:

settings

Column Type Description
key TEXT Setting name
value TEXT Setting value

marked_days

Column Type Description
date TEXT Date (YYYY-MM-DD)
note TEXT Your note
color TEXT Hex color code
created_at TEXT Creation timestamp
updated_at TEXT Last update timestamp

🔧 API Endpoints

Method Endpoint Description
GET /api/settings Get all settings
POST /api/settings Save settings
GET /api/marked-days Get all marked days
POST /api/marked-day Save a marked day
DELETE /api/marked-day/:date Delete a marked day
GET /api/database Export database file
POST /api/import Import database file

🎨 Color Legend

Color Meaning
🟢 Teal Days you've lived
🔴 Red (pulsing) Today
⬛ Dark Future days
🎨 Custom Your marked days

💡 Tips

  • Mark milestones: First day of school, graduation, first job, etc.
  • Track habits: Mark days you exercised, meditated, or learned something new
  • Set future goals: Mark target dates for your dreams
  • Review regularly: See patterns in your life journey
  • Export backups: Regularly export your database for safekeeping

🔒 Privacy

All data is stored locally on your computer in the life_in_days.sqlite file. Nothing is sent to any external server.

🙏 Credits

📄 License

MIT License - Feel free to use, modify, and share!


Every day counts. Make them memorable. ✨

About

A beautiful, interactive visualization of your entire life displayed as tiny squares

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages