Skip to content

An interactive Django app that calculates fascinating life statistics - your age, pet age, milestones, and cosmic achievements with beautiful visualizations and viral sharing features.

Notifications You must be signed in to change notification settings

webKing021/Life-In-Numbers-Django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŸ Life in Numbers

A beautiful, interactive Django web application that calculates fascinating statistics about your life journey. Discover how many heartbeats you've lived, how many sunsets you've seen, and unlock achievements along the way!

Life in Numbers Python License

โœจ Features

๐Ÿง‘ Human Age Calculator

  • Calculate your exact age in years, months, days, hours, minutes, and seconds
  • Real-time live counters that update every second
  • Countdown to your next birthday
  • Milestone tracking (10,000 days, 100,000 hours, etc.)

๐Ÿถ Pet Age Calculator

Calculate your pet's age in human years with species-specific multipliers:

  • ๐Ÿ• Dogs
  • ๐Ÿˆ Cats
  • ๐Ÿฐ Rabbits
  • ๐Ÿน Hamsters
  • ๐Ÿฆœ Parrots

๐ŸŽฎ Gamification System

Unlock achievements based on your life milestones:

  • ๐ŸŽ“ Adult Unlocked (18 years)
  • ๐Ÿพ Coming of Age (21 years)
  • ๐Ÿ’ช The Thirty Club (30 years)
  • ๐Ÿ† 10,000 Days
  • ๐Ÿ‘‘ 20,000 Days
  • โฐ 100K Hours

๐Ÿ“Š Interactive Visualizations

  • Life Stages Timeline (Baby, Child, Teen, Adult, Elder)
  • Heartbeat Animation Chart
  • Time Distribution Pie Chart (Sleep, Work, Leisure)
  • Milestone Progress Chart

๐ŸŽฏ Viral Features

  • ๐Ÿ“ธ Download as Image - Share your stats on social media (Instagram, Twitter, Facebook)
  • ๐Ÿ”— URL Sharing - Share direct links: ?d=1995-06-15
  • ๐Ÿ‘ฅ Comparison Mode - Compare stats with friends/family
  • ๐Ÿ–จ๏ธ Print-Friendly - Professional printouts with QR codes
  • ๐ŸŽŠ Confetti Animations - Celebrate milestones with style

๐ŸŒ Cosmic Statistics

  • Heartbeats counter
  • Breaths taken
  • Steps walked
  • Words spoken
  • Hours slept
  • Meals eaten
  • And much more!

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+
  • pip (Python package manager)

Installation

  1. Clone the repository
git clone https://github.com/webKing021/Life-In-Numbers-Django.git
cd Life-In-Numbers-Django
  1. Create a virtual environment
python -m venv venv
  1. Activate virtual environment

Windows:

venv\Scripts\activate

macOS/Linux:

source venv/bin/activate
  1. Install dependencies
pip install django
  1. Navigate to project directory
cd LifeInNumbers
  1. Run migrations
python manage.py migrate
  1. Start the development server
python manage.py runserver
  1. Open your browser
http://127.0.0.1:8000/

๐Ÿ“ Project Structure

Life-In-Numbers-Django/
โ”œโ”€โ”€ LifeInNumbers/
โ”‚   โ”œโ”€โ”€ LifeInNumbers/          # Project settings
โ”‚   โ”‚   โ”œโ”€โ”€ settings.py
โ”‚   โ”‚   โ”œโ”€โ”€ urls.py
โ”‚   โ”‚   โ””โ”€โ”€ wsgi.py
โ”‚   โ”œโ”€โ”€ stats/                  # Main app
โ”‚   โ”‚   โ”œโ”€โ”€ calculations.py     # Age calculation logic
โ”‚   โ”‚   โ”œโ”€โ”€ views.py           # View handlers
โ”‚   โ”‚   โ”œโ”€โ”€ urls.py            # URL routing
โ”‚   โ”‚   โ””โ”€โ”€ static/
โ”‚   โ”‚       โ””โ”€โ”€ images/
โ”‚   โ”œโ”€โ”€ templates/
โ”‚   โ”‚   โ”œโ”€โ”€ index.html         # Main page
โ”‚   โ”‚   โ””โ”€โ”€ partials/
โ”‚   โ”‚       โ”œโ”€โ”€ stats_display.html
โ”‚   โ”‚       โ””โ”€โ”€ pet_stats_display.html
โ”‚   โ””โ”€โ”€ manage.py
โ”œโ”€โ”€ .gitignore
โ””โ”€โ”€ README.md

๐ŸŽจ Technologies Used

  • Backend: Django 5.0
  • Frontend: HTML5, TailwindCSS, JavaScript
  • Charts: Chart.js
  • Icons: Phosphor Icons
  • Animations: Canvas Confetti
  • Image Export: html2canvas
  • QR Codes: QRCode.js

๐Ÿ”ฅ Key Features Breakdown

No Database Required

All calculations are done in real-time. No user data is stored, ensuring 100% privacy.

Mobile Responsive

Fully responsive design that works perfectly on phones, tablets, and desktops.

Fast & Lightweight

Pure calculations with no external API calls. Lightning-fast performance.

SEO Optimized

Meta tags, Open Graph, and Twitter Cards ready for social sharing.

๐ŸŒ API Endpoints

Calculate Stats

POST /calculate/
Content-Type: application/x-www-form-urlencoded

birth_date=1995-06-15
calculation_type=human  # or 'pet'
pet_type=dog           # required if calculation_type='pet'

Response (JSON):

{
  "age": {
    "age_years": 29,
    "age_days": 10585,
    "age_hours": 254040
  },
  "cosmic": {
    "heartbeats": 1089072000,
    "breaths": 254040000
  },
  "achievements": [
    {
      "id": "adult",
      "title": "Adult Unlocked!",
      "icon": "๐ŸŽ“",
      "color": "blue"
    }
  ]
}

URL Parameters

GET /?d=1995-06-15

Auto-calculates stats on page load.

๐ŸŽฏ Use Cases

  • Personal: Track your life milestones
  • Pet Owners: Calculate pet age in human years
  • Parents: Track baby's growth
  • Educators: Teach time concepts
  • Social Media: Create shareable content
  • Birthdays: Unique gift calculator

๐Ÿ“ฑ Social Media Sharing

The app generates beautiful, shareable images perfect for:

  • Instagram Stories (1080x1920)
  • Twitter/X posts
  • Facebook sharing
  • WhatsApp status
  • LinkedIn posts

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘ค Author

webKing021

๐Ÿ™ Acknowledgments

  • Chart.js for beautiful visualizations
  • Phosphor Icons for clean iconography
  • TailwindCSS for rapid styling
  • Django community for excellent documentation

๐ŸŒŸ Star This Repo!

If you find this project useful, please give it a โญ๏ธ on GitHub!

๐Ÿ“ง Contact

For questions or feedback, please open an issue on GitHub.


Made with โค๏ธ by webKing021 aka Krutarth Raychura.

About

An interactive Django app that calculates fascinating life statistics - your age, pet age, milestones, and cosmic achievements with beautiful visualizations and viral sharing features.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors