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.
- π Flexible Time Entry - Record multiple clock in/out entries per day
 - ποΈ 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.py- Run the application:
 
flask run- Access the application at http://localhost:5000
 
- Navigate to "Manual Entry" to record your work hours
 - Select a date and whether it's a regular work day or absence
 - For work days, enter your clock-in and clock-out times
 - You can add multiple time entries per day (e.g., for lunch breaks)
 
View a monthly summary of your work hours, including:
- Required hours based on working days
 - Actual hours worked
 - Balance (overtime or deficit)
 - Daily breakdown with detailed information
 
Access a chronological log of all your time entries, including:
- Regular work days with specific times
 - Absences and holidays
 - Daily totals
 
TimeTrack/
βββ app/
β   βββ config/        # Configuration settings
β   βββ db/            # Database management
β   βββ models/        # Data models
β   βββ routes/        # Route handlers
β   βββ 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
βββ app.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