TimeTrack is a simple yet powerful time tracking application designed for managing work hours, leaves, and holidays. Built with Flask and compatible with PostgreSQL or SQLite, it provides a user-friendly interface for tracking your time and analyzing your work patterns.
- ποΈ Interactive Calendar Log - Manage your schedule with a drag-and-drop monthly calendar view
- π Flexible Time Entry - Record multiple clock in/out entries per day
- βοΈ Customizable Absence Codes - Create, edit, and delete your own absence types
- ποΈ Absence Management - Track leaves, holidays and other time off
- π Time Analytics - View daily, weekly and monthly work summaries
- π Automatic Calculations - Track work hour balances and overtime
- π¦π· Argentina Holidays Integration - Automatic holiday tracking for Argentina
- π± Responsive Design - Works on desktop and mobile devices
- π Flexible Database Support - Works with SQLite or PostgreSQL
- π§ͺ Well-tested Code - Comprehensive test suite ensures reliability
- Python 3.9+
- pip (Python package installer)
- PostgreSQL (optional, SQLite works out of the box)
- Clone the repository:
git clone https://github.com/PPeitsch/TimeTrack.git
cd TimeTrack- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit .env with your preferred settings- Initialize the database:
python init_db.pyNote: This script is interactive and may prompt you to import data, such as public holidays.
- Run the application:
flask run- Access the application at http://localhost:5000
The application is organized into several key sections accessible from the main navigation bar.
This is the main interface for managing your schedule.
- View an entire month at a glance with color-coded day types.
- Click and drag to select one or more days to change their type (e.g., assign a week of vacation).
- Quickly override weekends or holidays to log work on non-standard days.
For detailed time logging on a specific day:
- Select a date and specify whether it's a workday or an absence.
- For workdays, enter multiple clock-in and clock-out times to account for breaks.
Get a detailed overview of your logged time for any given month:
- See a summary of required hours, completed hours, and the resulting balance.
- View a day-by-day breakdown of hours worked versus required hours.
Customize the application to fit your needs:
- Manage absence codes by adding, editing, or deleting types (e.g., "Vacation", "Sick Leave").
TimeTrack/
βββ app/
β βββ config/ # Configuration settings
β βββ db/ # Database management
β βββ models/ # Data models
β βββ routes/ # Route handlers (Blueprints)
β βββ services/ # Business logic (e.g., holiday providers)
β βββ static/ # Static assets (JS, CSS)
β βββ templates/ # HTML templates
β βββ utils/ # Utility functions
βββ scripts/ # Helper scripts
βββ tests/ # Test suite
βββ .env # Environment configuration
βββ .env.example # Example environment configuration
βββ run.py # Application entry point
βββ init_db.py # Database initialization script
βββ requirements.txt # Python dependencies
- Install development dependencies:
pip install -r requirements-dev.txt- Set up pre-commit hooks:
pre-commit installpytest tests/We use Black and isort for code formatting:
# Format code with Black
python -m black .
# Sort imports with isort
python -m isort --profile black .
# Run both with our helper script
python scripts/run-formatters.ps1 # Windows
./scripts/run-formatters.sh # Linux/MacContributions are welcome! Please feel free to submit a Pull Request or open an Issue.
Please read our Contributing Guidelines and follow our Code of Conduct.
This project is licensed under the MIT License - see the LICENSE file for details.
- Flask - The web framework used
- SQLAlchemy - ORM for database operations
- Bootstrap - Frontend framework