Skip to content

A quit-smoking timer web app with dark theme. Track your progress, stay motivated, and celebrate your smoke-free journey! πŸ†

License

Notifications You must be signed in to change notification settings

oib/victorytimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ† VictoryTimer

A kid-friendly quit-smoking timer web application that helps users track their progress in staying smoke-free.

πŸ“‹ Features

  • ⏱ Real-time Timer: Tracks time elapsed since your last cigarette
  • πŸ“ˆ Progress Visualization: Interactive chart showing your quit attempts history
  • πŸ’¬ Motivational Messages: Time-based achievements and encouraging feedback
  • πŸ“± PWA Support: Install as a mobile app on your device
  • πŸŒ™ Dark Theme: Kid-friendly dark mode design
  • πŸ’Ύ Local Storage: Your progress is saved locally in your browser

πŸš€ Quick Start

Prerequisites

  • Python 3.7 or higher
  • pip package manager

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/victorytimer.git
cd victorytimer
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install fastapi uvicorn
  1. Run the application:
python main.py
  1. Open your browser and navigate to http://localhost:8000

πŸ–₯️ Systemd Service Setup

The application can be run as a systemd service:

  1. Create a service file at /etc/systemd/system/victorytimer.service:
[Unit]
Description=VictoryTimer Web App
After=network.target

[Service]
Type=simple
User=www-data
WorkingDirectory=/var/www/victorytimer
ExecStart=/var/www/victorytimer/venv/bin/python main.py
Restart=always

[Install]
WantedBy=multi-user.target
  1. Enable and start the service:
sudo systemctl enable victorytimer
sudo systemctl start victorytimer
  1. Check status:
sudo systemctl status victorytimer

πŸ“ Project Structure

victorytimer/
β”œβ”€β”€ main.py              # FastAPI backend server
β”œβ”€β”€ static/              # Frontend assets
β”‚   β”œβ”€β”€ index.html       # Main HTML page
β”‚   β”œβ”€β”€ style.css        # Stylesheets with dark theme
β”‚   β”œβ”€β”€ app.js           # Main application entry point
β”‚   β”œβ”€β”€ timer.js         # Timer functionality
β”‚   β”œβ”€β”€ button.js        # Button interactions
β”‚   β”œβ”€β”€ chart.js         # Chart visualization
β”‚   β”œβ”€β”€ message.js       # User messages and motivation
β”‚   β”œβ”€β”€ service-worker.js # PWA service worker
β”‚   β”œβ”€β”€ manifest.webmanifest # PWA manifest
β”‚   └── favicon.ico      # Favicon
β”œβ”€β”€ docs/                # Documentation
β”‚   └── structure.md     # Detailed project structure
β”œβ”€β”€ venv/                # Python virtual environment
β”œβ”€β”€ .gitignore           # Git ignore rules
β”œβ”€β”€ README.md            # This file
└── LICENSE              # MIT License

🎨 Dark Theme

The application features a kid-friendly dark theme with:

  • Soft, easy-on-the-eyes colors
  • High contrast for better readability
  • Fun emoji icons and smooth animations
  • Responsive design for all devices

πŸ”§ Technologies Used

  • Backend: Python 3.x, FastAPI
  • Frontend: Vanilla JavaScript, HTML5, CSS3
  • Charting: Chart.js for progress visualization
  • PWA: Service Worker and Web App Manifest
  • Icons: Emoji icons for universal compatibility

πŸ“Š How It Works

  1. Start the timer when you quit smoking
  2. The app tracks how long it's been since your last cigarette
  3. View your progress in the timer and chart
  4. Receive motivational messages as you reach milestones
  5. If you slip up, reset the timer and keep trying!

🀝 Contributing

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

πŸ“ License

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

πŸ™ Acknowledgments

  • Built for anyone looking to quit smoking
  • Kid-friendly design to help families support each other
  • Open source for the community

Made with ❀️ for a smoke-free future

About

A quit-smoking timer web app with dark theme. Track your progress, stay motivated, and celebrate your smoke-free journey! πŸ†

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published