Turn time into meaningful action.
Days on Purpose is a single-page application designed to help you frame your life around purposeful action. By entering your birth date, country, and gender, you can estimate your remaining "purpose days" in days, weeks, months, and years using life expectancy data. Focus on clarity, momentum, and investment—not fear or countdowns.
- No Build or Runtime Dependencies: Plain HTML, CSS, and JavaScript modules served as static files.
- Private: No data leaves your browser. No accounts, tracking, or third-party requests.
- Life Expectancy Estimates: Uses UN World Population Prospects 2024 life expectancy at birth (2023 estimates) for 237 countries and areas.
- User-Friendly Interface: Accessible and responsive UI designed for clarity and ease of use on any device.
- Persistent Input: Remembers your inputs for a seamless experience, ensuring you can return at any time.
- Celebratory Messaging: Provides uplifting messages when users exceed average life expectancy, reinforcing a positive outlook on life.
- Gender-Specific Calculations: Offers tailored calculations based on gender for more accurate results.
- Mobile-First Design: Responsive layout ensures a great experience on smartphones and tablets.
- Access the App: Visit our live demo to try it out directly in your browser.
- Input Your Details: Enter your birth date, select your country, and choose your gender.
- Calculate: Click the "Calculate" button to see your estimated remaining purpose days.
To run the application locally:
- Clone the repository:
git clone https://github.com/ChiefInnovator/daysonpurpose.git
- Navigate to the project directory:
cd daysonpurpose - Serve the folder (ES modules do not load from
file://): use VS Code Live Server (port 5501, configured in.vscode/settings.json) or runpython3 -m http.serverand open http://localhost:8000.
A static page with no build step. index.html holds the markup and CSS and loads src/main.js as an ES module.
src/config.js: shared constants (365.2425 days per year, storage keys, data path).src/calculator.js: computes each unit from remaining years (pure).src/provider.js: loads and parsesdata/lifeexpectancy.csvand looks up a country (pure apart fromfetch).src/countries.js: country aliases, browser-language country suggestion, and saved-form restore (pure).src/ui.js: form, result card, and live journey display (DOM).src/main.js: entry point.
- Frontend: HTML, CSS, JavaScript ES modules; no build
- Data:
data/lifeexpectancy.csvfrom UN World Population Prospects 2024 - Tests: Node's built-in test runner
Requires Node 22 or later:
npm testRegenerate the dataset from the UN source (Python 3, standard library only):
python3 scripts/build_dataset.pyWork on feature/<name> branches and open PRs into develop. Promote with a develop → main PR; merging to main publishes to GitHub Pages.
We welcome contributions! Feel free to submit issues, suggestions, or pull requests to enhance the project.
This project is licensed under the PolyForm Strict License 1.0.0. See LICENSE.
- Developer: Richard Crane
- Email: rich@mill5.com
- MILL5 - An AI innovation company.
- Microsoft MVP - Rich has been a Microsoft Most Valued Professional for several years in AI, Azure, Developer Technologies, and DevOps — building with Visual Studio Code and shipping on GitHub every day.
- Visual Studio Code - The editor behind this project.
- GitHub - Source, releases, and issues.
- Inventing Fire with AI - The website for the Inventing Fire with AI podcast.
Discover your remaining purpose-days and frame your life around clarity, focus, and momentum with Days on Purpose. ⏳
Powered by MILL5 Built in Visual Studio Code and shipped on GitHub Explore Richard Crane on Microsoft MVP Listen to the Inventing Fire with AI podcast for insights on technology and innovation. For support, contact: rich@mill5.com
Powered by RepoBeacon