A kid-friendly quit-smoking timer web application that helps users track their progress in staying smoke-free.
- β± 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
- Python 3.7 or higher
- pip package manager
- Clone the repository:
git clone https://github.com/yourusername/victorytimer.git
cd victorytimer- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install fastapi uvicorn- Run the application:
python main.py- Open your browser and navigate to
http://localhost:8000
The application can be run as a systemd service:
- 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- Enable and start the service:
sudo systemctl enable victorytimer
sudo systemctl start victorytimer- Check status:
sudo systemctl status victorytimervictorytimer/
βββ 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
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
- 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
- Start the timer when you quit smoking
- The app tracks how long it's been since your last cigarette
- View your progress in the timer and chart
- Receive motivational messages as you reach milestones
- If you slip up, reset the timer and keep trying!
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- 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