Files
TimeTracker/docs/PROJECT_STRUCTURE.md
T
Dries Peeters d230a41e8a feat: enhance web interface layout and fix logo import circular dependency
- Improve web interface layout for better user-friendliness and mobile responsiveness
  * Update CSS variables for consistent spacing and component sizing
  * Enhance card layouts with improved padding, borders, and shadows
  * Optimize button and form element dimensions for better touch targets
  * Add hover effects and animations for improved user interaction
  * Implement responsive grid system with mobile-first approach

- Refactor mobile JavaScript to prevent duplicate initialization
  * Consolidate mobile enhancements into dedicated utility classes
  * Add initialization guards to prevent double loading
  * Implement MobileUtils and MobileNavigation classes
  * Remove duplicate event listeners and mobile enhancements

- Fix circular import issue in logo handling
  * Replace problematic 'from app import app' with Flask's current_app
  * Add error handling for cases where current_app is unavailable
  * Improve logo path resolution with fallback mechanisms
  * Fix settings model to use proper Flask context

- Clean up template code and remove duplication
  * Remove duplicate mobile enhancements from base template
  * Clean up dashboard template JavaScript
  * Centralize all mobile functionality in mobile.js
  * Add proper error handling and debugging

- Update CSS variables and spacing system
  * Introduce --section-spacing and --card-spacing variables
  * Add mobile-specific spacing variables
  * Improve border-radius and shadow consistency
  * Enhance typography and visual hierarchy

This commit resolves the double loading issue and logo import errors while
significantly improving the overall user experience and mobile responsiveness
of the web interface.
2025-08-30 10:09:06 +02:00

6.7 KiB

TimeTracker Project Structure

This document provides an overview of the cleaned up TimeTracker project structure after removing unnecessary files and consolidating the codebase.

📁 Root Directory Structure

TimeTracker/
├── 📁 app/                    # Main Flask application
├── 📁 assets/                 # Static assets (images, screenshots)
├── 📁 docker/                 # Docker configuration files
├── 📁 templates/              # Additional template files
├── 📁 tests/                  # Test suite
├── 📁 .github/                # GitHub workflows and configurations
├── 📁 logs/                   # Application logs (with .gitkeep)
├── 🐳 Dockerfile              # Main Dockerfile
├── 🐳 Dockerfile.simple       # Simple container Dockerfile
├── 📄 docker-compose.simple.yml    # Simple container setup
├── 📄 docker-compose.public.yml    # Public container setup
├── 📄 requirements.txt         # Python dependencies
├── 📄 app.py                  # Application entry point
├── 📄 env.example             # Environment variables template
├── 📄 README.md               # Main project documentation
├── 📄 PROJECT_STRUCTURE.md    # This file
├── 📄 CONTRIBUTING.md         # Contribution guidelines
├── 📄 CODE_OF_CONDUCT.md      # Community code of conduct
├── 📄 LICENSE                 # GPL v3 license
├── 📄 GITHUB_WORKFLOW_IMAGES.md  # Docker image workflow docs
├── 📄 DOCKER_PUBLIC_SETUP.md     # Public container setup docs
├── 📄 REQUIREMENTS.md         # Detailed requirements documentation
├── 📄 deploy-public.bat       # Windows deployment script
└── 📄 deploy-public.sh        # Linux/Mac deployment script

🧹 Cleanup Summary

Files Removed

  • DATABASE_INIT_FIX_FINAL_README.md - Database fix documentation (resolved)
  • DATABASE_INIT_FIX_README.md - Database fix documentation (resolved)
  • TIMEZONE_FIX_README.md - Timezone fix documentation (resolved)
  • Dockerfile.test - Test Dockerfile (not needed)
  • Dockerfile.combined - Combined Dockerfile (consolidated)
  • docker-compose.yml - Old compose file (replaced)
  • deploy.sh - Old deployment script (replaced)
  • index.html - Unused HTML file
  • _config.yml - Unused config file
  • logs/timetracker.log - Large log file (not in version control)
  • .pytest_cache/ - Python test cache directory

Files Consolidated

  • Dockerfiles: Now only Dockerfile and Dockerfile.simple
  • Docker Compose: Now only docker-compose.simple.yml and docker-compose.public.yml
  • Deployment: Now only deploy-public.bat and deploy-public.sh

🏗️ Core Components

Application (app/)

  • Models: Database models for users, projects, time entries, tasks, and settings
  • Routes: API endpoints and web routes including task management
  • Templates: Jinja2 HTML templates including task management views
  • Utils: Utility functions including timezone management
  • Config: Application configuration

Docker Configuration (docker/)

  • Startup scripts: Container initialization and database setup
  • Database scripts: SQL-based database initialization
  • Configuration files: Docker-specific configurations

Templates (templates/)

  • Admin templates: User management and system settings
  • Error templates: Error page templates
  • Main templates: Core application templates
  • Project templates: Project management templates
  • Report templates: Reporting and analytics templates
  • Timer templates: Time tracking interface templates

Assets (assets/)

  • Screenshots: Application screenshots for documentation
  • Images: Logo and other static images

🚀 Deployment Options

  • File: docker-compose.simple.yml
  • Dockerfile: Dockerfile.simple
  • Features: All-in-one with PostgreSQL database
  • Use case: Production deployment

2. Public Container

  • File: docker-compose.public.yml
  • Dockerfile: Dockerfile
  • Features: External database configuration
  • Use case: Development and testing

📚 Documentation Files

  • README.md: Main project documentation and quick start guide
  • PROJECT_STRUCTURE.md: This file - project structure overview
  • TASK_MANAGEMENT_README.md: Detailed Task Management feature documentation
  • CONTRIBUTING.md: How to contribute to the project
  • CODE_OF_CONDUCT.md: Community behavior guidelines

Task Management Feature

The Task Management feature is fully integrated into the application with automatic database migration:

Automatic Migration

  • No manual setup required: Database tables are created automatically on first startup
  • Integrated migration: Migration logic is built into the application initialization
  • Fallback support: Manual migration script available if needed

Components Added

  • Models: Task model with full relationship support
  • Routes: Complete CRUD operations for task management
  • Templates: Responsive task management interface
  • Integration: Tasks linked to projects and time tracking
  • GITHUB_WORKFLOW_IMAGES.md: Docker image build workflow
  • DOCKER_PUBLIC_SETUP.md: Public container setup guide
  • REQUIREMENTS.md: Detailed system requirements

🔧 Development Files

  • requirements.txt: Python package dependencies
  • app.py: Flask application entry point
  • env.example: Environment variables template
  • tests/: Test suite and test files

📝 Key Improvements Made

  1. Removed Duplicate Files: Eliminated redundant documentation and configuration files
  2. Consolidated Docker Setup: Streamlined to two main container types
  3. Updated Documentation: README now reflects current project state
  4. Timezone Support: Added comprehensive timezone management (100+ options)
  5. Clean Structure: Organized project for better maintainability

🎯 Getting Started

  1. Choose deployment type: Simple container (recommended) or public container
  2. Follow README.md: Complete setup instructions
  3. Use appropriate compose file: docker-compose.simple.yml or docker-compose.public.yml
  4. Configure timezone: Access admin settings to set your local timezone

🔍 File Purposes

  • .gitkeep files: Ensure empty directories are tracked in Git
  • .github/: GitHub Actions workflows for automated builds
  • logs/: Application log storage (cleaned up, only .gitkeep remains)
  • LICENSE: GPL v3 open source license
  • .gitignore: Git ignore patterns for temporary files

This cleaned up structure provides a more maintainable and focused codebase while preserving all essential functionality and documentation.