This commit introduces a comprehensive Kanban board customization system and improves CSRF token configuration for Docker deployments. ## Major Features ### 1. Customizable Kanban Board Columns Add complete kanban column customization system allowing users to define custom workflow states beyond the default columns. **New Components:** - Add KanbanColumn model with full CRUD operations (app/models/kanban_column.py) - Add kanban routes blueprint with admin endpoints (app/routes/kanban.py) - Add kanban column management templates (app/templates/kanban/) - Add migration 019 for kanban_columns table (migrations/) **Features:** - Create unlimited custom columns with unique keys, labels, icons, and colors - Drag-and-drop column reordering with position persistence - Toggle column visibility without deletion - Protected system columns (todo, in_progress, done) prevent accidental deletion - Complete state marking for columns that should mark tasks as done - Real-time updates via SocketIO broadcasts when columns change - Font Awesome icon support (5000+ icons) - Bootstrap color scheme integration - Comprehensive validation and error handling **Integration:** - Update Task model to work with dynamic column statuses (app/models/task.py) - Update task routes to use kanban column API (app/routes/tasks.py) - Update project routes to fetch active columns (app/routes/projects.py) - Add kanban column management links to base template (app/templates/base.html) - Update kanban board templates to render dynamic columns (app/templates/tasks/) - Add cache prevention headers to force fresh column data **API Endpoints:** - GET /api/kanban/columns - Fetch all active columns - POST /api/kanban/columns/reorder - Reorder columns - GET /kanban/columns - Column management interface (admin only) - POST /kanban/columns/create - Create new column (admin only) - POST /kanban/columns/<id>/edit - Edit column (admin only) - POST /kanban/columns/<id>/delete - Delete column (admin only) - POST /kanban/columns/<id>/toggle - Toggle column visibility (admin only) ### 2. Enhanced CSRF Configuration Improve CSRF token configuration and documentation for Docker deployments. **Configuration Updates:** - Add WTF_CSRF_ENABLED environment variable to all docker-compose files - Add WTF_CSRF_TIME_LIMIT environment variable with 1-hour default - Update app/config.py to read CSRF settings from environment - Add SECRET_KEY validation in app/__init__.py to prevent production deployment with default keys **Docker Compose Updates:** - docker-compose.yml: CSRF enabled by default for security testing - docker-compose.remote.yml: CSRF always enabled in production - docker-compose.remote-dev.yml: CSRF enabled with production-like settings - docker-compose.local-test.yml: CSRF can be disabled for local testing - Add helpful comments explaining each CSRF-related environment variable - Update env.example with CSRF configuration examples **Verification Scripts:** - Add scripts/verify_csrf_config.sh for Unix systems - Add scripts/verify_csrf_config.bat for Windows systems - Scripts check SECRET_KEY, CSRF_ENABLED, and CSRF_TIME_LIMIT settings ### 3. Database Initialization Improvements - Update app/__init__.py to run pending migrations on startup - Add automatic kanban column initialization after migrations - Improve error handling and logging during database setup ### 4. Configuration Management - Update app/config.py with new CSRF and kanban-related settings - Add environment variable parsing with sensible defaults - Improve configuration validation and error messages ## Documentation ### New Documentation Files - CUSTOM_KANBAN_README.md: Quick start guide for kanban customization - KANBAN_CUSTOMIZATION.md: Detailed technical documentation - IMPLEMENTATION_SUMMARY.md: Implementation details and architecture - KANBAN_AUTO_REFRESH_COMPLETE.md: Real-time update system documentation - KANBAN_REFRESH_FINAL_FIX.md: Cache and refresh troubleshooting - KANBAN_REFRESH_SOLUTION.md: Technical solution for data freshness - docs/CSRF_CONFIGURATION.md: Comprehensive CSRF setup guide - CSRF_DOCKER_CONFIGURATION_SUMMARY.md: Docker-specific CSRF setup - CSRF_TROUBLESHOOTING.md: Common CSRF issues and solutions - APPLY_KANBAN_MIGRATION.md: Migration application guide - APPLY_FIXES_NOW.md: Quick fix reference - DEBUG_KANBAN_COLUMNS.md: Debugging guide - DIAGNOSIS_STEPS.md: System diagnosis procedures - BROWSER_CACHE_FIX.md: Browser cache troubleshooting - FORCE_NO_CACHE_FIX.md: Cache prevention solutions - SESSION_CLOSE_ERROR_FIX.md: Session handling fixes - QUICK_FIX.md: Quick reference for common fixes ### Updated Documentation - README.md: Add kanban customization feature description - Update project documentation with new features ## Testing ### New Test Files - test_kanban_refresh.py: Test kanban column refresh functionality ## Technical Details **Database Changes:** - New table: kanban_columns with 11 columns - Indexes on: key, position - Default data: 4 system columns (todo, in_progress, review, done) - Support for both SQLite (development) and PostgreSQL (production) **Real-Time Updates:** - SocketIO events: 'kanban_columns_updated' with action type - Automatic page refresh when columns are created/updated/deleted/reordered - Prevents stale data by expiring SQLAlchemy caches after changes **Security:** - Admin-only access to column management - CSRF protection on all column mutation endpoints - API endpoints exempt from CSRF (use JSON and other auth mechanisms) - System column protection prevents data integrity issues - Validation prevents deletion of columns with active tasks **Performance:** - Efficient querying with position-based ordering - Cached column data with cache invalidation on changes - No-cache headers on API responses to prevent stale data - Optimized database indexes for fast lookups ## Breaking Changes None. This is a fully backward-compatible addition. Existing workflows continue to work with the default columns. Custom columns are opt-in via the admin interface. ## Migration Notes 1. Run migration 019 to create kanban_columns table 2. Default columns are initialized automatically on first run 3. No data migration needed for existing tasks 4. Existing task statuses map to new column keys ## Environment Variables New environment variables (all optional with defaults): - WTF_CSRF_ENABLED: Enable/disable CSRF protection (default: true) - WTF_CSRF_TIME_LIMIT: CSRF token expiration in seconds (default: 3600) - SECRET_KEY: Required in production, must be cryptographically secure See env.example for complete configuration reference. ## Deployment Notes
TimeTracker
Professional Time Tracking & Project Management for Teams
Track time. Manage projects. Generate invoices. All in one place.
🚀 Quick Start • ✨ Features • 📸 Screenshots • 📖 Getting Started • 📚 Documentation • 🐳 Deploy
🎯 What is TimeTracker?
TimeTracker is a self-hosted, web-based time tracking application designed for freelancers, teams, and businesses who need professional time management with complete control over their data.
Perfect for:
- 💼 Freelancers tracking billable hours across multiple clients
- 👥 Small Teams managing projects and tracking productivity
- 🏢 Agencies needing detailed reporting and client billing
- 🔒 Privacy-focused organizations wanting self-hosted solutions
✨ Features
⏱️ Smart Time Tracking
- One-Click Timers — Start tracking with a single click
- Persistent Timers — Timers keep running even after browser closes
- Idle Detection — Automatic pause after configurable idle time
- Manual Entry — Add historical time entries with notes and tags
- Real-time Updates — See live timer updates across all devices
📊 Project & Task Management
- Unlimited Projects & Tasks — Organize work your way
- Client Management — Store client details and billing rates
- Task Board — Visual task management with priorities and assignments
- Status Tracking — Monitor progress from to-do to completion
- Estimates vs Actuals — Track project budgets and burn rates
🧾 Professional Invoicing
- Generate from Time — Convert tracked hours to invoices automatically
- Custom Line Items — Add manual items for expenses or services
- Tax Calculation — Automatic tax calculations with configurable rates
- PDF Export — Professional invoice templates (coming soon)
- Status Tracking — Track draft, sent, paid, and overdue invoices
📈 Analytics & Reporting
- Visual Dashboards — Charts and graphs for quick insights
- Detailed Reports — Time breakdown by project, user, or date range
- CSV Export — Export data for external analysis
- Billable vs Non-billable — Separate tracking for accurate billing
- Custom Date Ranges — Flexible reporting periods
🔐 Multi-User & Security
- Role-Based Access — Admin and user roles with appropriate permissions
- User Management — Add team members and manage access
- Self-Hosted — Complete control over your data
- Username-Only Login — Simple authentication for internal use
- Session Management — Secure cookies and session handling
🛠️ Technical Excellence
- Docker Ready — Deploy in minutes with Docker Compose
- Database Flexibility — PostgreSQL for production, SQLite for testing
- Responsive Design — Works perfectly on desktop, tablet, and mobile
- Real-time Sync — WebSocket support for live updates
- Automatic Backups — Scheduled database backups (configurable)
📸 Screenshots
Dashboard — Your Command Center
Start timers, view recent entries, and see your productivity at a glance
Projects & Tasks — Stay Organized
Manage multiple projects and break them down into actionable tasks
Time Tracking — Flexible & Powerful
Manual time entry and visual calendar view for better planning
Invoicing & Clients — Professional Billing
Generate invoices from tracked time and manage client relationships
Reports & Analytics — Data-Driven Insights
Comprehensive reporting and user analytics for informed decisions
Easy Creation — Streamlined Workflows
Simple, intuitive forms for creating projects, tasks, and clients
🚀 Quick Start
Docker (Recommended)
Get TimeTracker running in under 2 minutes:
# Clone the repository
git clone https://github.com/drytrix/TimeTracker.git
cd TimeTracker
# Start with Docker Compose
docker-compose up -d
# Access at http://localhost:8080
First login creates the admin account — just enter your username!
Quick Test with SQLite
Want to try it out without setting up a database?
docker-compose -f docker-compose.local-test.yml up --build
No configuration needed — perfect for testing!
💡 Use Cases
For Freelancers
Track time across multiple client projects, generate professional invoices, and understand where your time goes. TimeTracker helps you bill accurately and identify your most profitable clients.
For Teams
Assign tasks, track team productivity, and generate reports for stakeholders. See who's working on what, identify bottlenecks, and optimize team performance.
For Agencies
Manage multiple clients and projects simultaneously. Track billable hours, generate client invoices, and analyze project profitability — all in one place.
For Personal Projects
Even if you're not billing anyone, understanding where your time goes is valuable. Track personal projects, hobbies, and learning activities to optimize your time.
🌟 Why TimeTracker?
| Feature | TimeTracker | Traditional Time Trackers |
|---|---|---|
| Self-Hosted | ✅ Complete data control | ❌ Cloud-only, subscription fees |
| Open Source | ✅ Free to use & modify | ❌ Proprietary, locked features |
| Persistent Timers | ✅ Runs server-side | ❌ Browser-dependent |
| Docker Ready | ✅ Deploy anywhere | ⚠️ Complex setup |
| Invoicing Built-in | ✅ Track to bill workflow | ❌ Requires integration |
| No User Limits | ✅ Unlimited users | ❌ Per-user pricing |
📚 Documentation
Comprehensive documentation is available in the docs/ directory:
Getting Started
- 📖 Getting Started Guide — Complete beginner's guide (⭐ Start here!)
- Installation Guide — Detailed setup instructions
- Requirements — System requirements and dependencies
- Troubleshooting — Common issues and solutions
- CSRF Token Issues — Fix "CSRF token missing or invalid" errors
Features
- Task Management — Break projects into manageable tasks
- Invoice System — Generate professional invoices
- Client Management — Manage client relationships
- Calendar Features — Calendar and bulk entry features
- Command Palette — Keyboard shortcuts for power users
Technical Documentation
- Project Structure — Codebase architecture
- Database Migrations — Database schema management
- Version Management — Release and versioning
- CSRF Configuration — Security and CSRF token setup for Docker
- CI/CD Documentation — Continuous integration setup
Contributing
- Contributing Guidelines — How to contribute
- Code of Conduct — Community standards
🐳 Deployment
Local Development
docker-compose up -d
Production with PostgreSQL
# Configure your .env file
cp env.example .env
# Edit .env with production settings
# IMPORTANT: Set a secure SECRET_KEY for CSRF tokens and sessions
# Generate one with: python -c "import secrets; print(secrets.token_hex(32))"
# Start with production compose
docker-compose -f docker-compose.remote.yml up -d
⚠️ Security Note: Always set a unique
SECRET_KEYin production! See CSRF Configuration for details.
Raspberry Pi
TimeTracker runs perfectly on Raspberry Pi 4 (2GB+):
# Same commands work on ARM architecture
docker-compose up -d
📖 See Deployment Guide for detailed instructions
🔧 Configuration
TimeTracker is highly configurable through environment variables:
# Timezone and locale
TZ=America/New_York
CURRENCY=USD
# Timer behavior
SINGLE_ACTIVE_TIMER=true
IDLE_TIMEOUT_MINUTES=30
ROUNDING_MINUTES=1
# User management
ADMIN_USERNAMES=admin,manager
ALLOW_SELF_REGISTER=false
# Security (production)
SECRET_KEY=your-secure-random-key
SESSION_COOKIE_SECURE=true
📖 See Configuration Guide for all options
🛣️ Roadmap
Planned Features
- 📄 PDF Invoice Templates — Professional PDF generation
- 📧 Email Integration — Send invoices to clients
- 📱 Progressive Web App — Install as mobile app
- 🔄 Recurring Invoices — Automate recurring billing
- 🎨 Custom Themes — Personalize your interface
- 🔌 API Extensions — RESTful API for integrations
- 📊 Advanced Analytics — More charts and insights
Recently Added
- ✅ Invoice Generation — Complete invoicing system
- ✅ Task Management — Full task tracking and management
- ✅ Command Palette — Keyboard-driven navigation
- ✅ Calendar View — Visual time entry calendar
- ✅ Bulk Operations — Bulk time entry creation
🤝 Contributing
We welcome contributions! Whether it's:
- 🐛 Bug Reports — Help us identify issues
- 💡 Feature Requests — Share your ideas
- 📝 Documentation — Improve our docs
- 💻 Code Contributions — Submit pull requests
📖 See Contributing Guidelines to get started
📄 License
TimeTracker is licensed under the GNU General Public License v3.0.
This means you can:
- ✅ Use it commercially
- ✅ Modify and adapt it
- ✅ Distribute it
- ✅ Use it privately
See LICENSE for full details
🆘 Support
- 📖 Documentation: Check the
docs/directory - 🐛 Bug Reports: Open an issue
- 💬 Discussions: GitHub Discussions
- 📧 Contact: Create an issue for support
⭐ Star Us!
If TimeTracker helps you track your time better, consider giving us a star on GitHub! It helps others discover the project.