Skip to content

Latest commit

 

History

History
256 lines (201 loc) · 5.99 KB

File metadata and controls

256 lines (201 loc) · 5.99 KB

🌟 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.