docs: Reorganize documentation structure for better navigation

Complete reorganization of project documentation to improve discoverability,
navigation, and maintainability. All documentation has been restructured into
a clear, role-based hierarchy.

## Major Changes

### New Directory Structure
- Created `docs/api/` for API documentation
- Created `docs/admin/` with subdirectories:
  - `admin/configuration/` - Configuration guides
  - `admin/deployment/` - Deployment guides
  - `admin/security/` - Security documentation
  - `admin/monitoring/` - Monitoring and analytics
- Created `docs/development/` for developer documentation
- Created `docs/guides/` for user-facing guides
- Created `docs/reports/` for analysis reports and summaries
- Created `docs/changelog/` for detailed changelog entries (ready for future use)

### File Organization

#### Moved from Root Directory (40+ files)
- Implementation notes → `docs/implementation-notes/`
- Test reports → `docs/testing/`
- Analysis reports → `docs/reports/`
- User guides → `docs/guides/`

#### Reorganized within docs/
- API documentation → `docs/api/`
- Administrator documentation → `docs/admin/` (with subdirectories)
- Developer documentation → `docs/development/`
- Security documentation → `docs/admin/security/`
- Telemetry documentation → `docs/admin/monitoring/`

### Documentation Updates

#### docs/README.md
- Complete rewrite with improved navigation
- Added visual documentation map
- Organized by role (Users, Administrators, Developers)
- Better categorization and quick links
- Updated all internal links to new structure

#### README.md (root)
- Updated all documentation links to reflect new structure
- Fixed 8 broken links

#### app/templates/main/help.html
- Enhanced "Where can I get additional help?" section
- Added links to new documentation structure
- Added documentation index link
- Added admin documentation link for administrators
- Improved footer with organized documentation links
- Added "Complete Documentation" section with role-based links

### New Index Files
- Created README.md files for all new directories:
  - `docs/api/README.md`
  - `docs/guides/README.md`
  - `docs/reports/README.md`
  - `docs/development/README.md`
  - `docs/admin/README.md`

### Cleanup
- Removed empty `docs/security/` directory (moved to `admin/security/`)
- Removed empty `docs/telemetry/` directory (moved to `admin/monitoring/`)
- Root directory now only contains: README.md, CHANGELOG.md, LICENSE

## Results

**Before:**
- 45+ markdown files cluttering root directory
- Documentation scattered across root and docs/
- Difficult to find relevant documentation
- No clear organization structure

**After:**
- 3 files in root directory (README, CHANGELOG, LICENSE)
- Clear directory structure organized by purpose and audience
- Easy navigation with role-based organization
- All documentation properly categorized
- Improved discoverability

## Benefits

1. Better Organization - Documentation grouped by purpose and audience
2. Easier Navigation - Role-based sections (Users, Admins, Developers)
3. Improved Discoverability - Clear structure with README files in each directory
4. Cleaner Root - Only essential files at project root
5. Maintainability - Easier to add and organize new documentation

## Files Changed

- 40+ files moved from root to appropriate docs/ subdirectories
- 15+ files reorganized within docs/
- 3 major documentation files updated (docs/README.md, README.md, help.html)
- 5 new README index files created
- 2 empty directories removed

All internal links have been updated to reflect the new structure.
This commit is contained in:
Dries Peeters
2025-12-14 07:56:07 +01:00
parent 9291d5c705
commit 29f7186ee8
99 changed files with 845 additions and 1038 deletions

View File

@@ -1,149 +0,0 @@
# ✅ Feature Implementation Complete
**Date:** 2025-01-27
**Total Features:** 24
**Completed:** 17 (71%)
**Status:** 🎉 **MAJOR MILESTONE ACHIEVED**
---
## ✅ COMPLETED FEATURES (17/24)
### 🎯 Core Infrastructure (3)
1.**Offline Mode with Sync** - Complete IndexedDB implementation
2.**Automation Workflow Engine** - Full rule-based automation
3.**Activity Feed UI** - Real-time activity feed
### 🔌 Integrations (4)
4.**Google Calendar** - Two-way sync
5.**Asana** - Project/task sync
6.**Trello** - Board/card sync
7.**QuickBooks** - Invoice/expense sync
### 📋 Workflows & Approvals (3)
8.**Time Approval Workflow** - Manager approval system
9.**Client Approval Workflow** - Client-side approvals
10.**Recurring Tasks** - Automated task creation
### 💬 Team Collaboration (2)
11.**Team Chat** - Real-time messaging system
12.**@Mentions UI** - Autocomplete mentions component
### 🎨 Customization (1)
13.**Client Portal Customization** - Branding & theme options
### 📊 Reporting (3)
14.**PowerPoint Export** - Presentation generation
15.**Currency Auto-Conversion** - Real-time rate fetching
16.**Currency Historical Rates** - Rate history tracking
### 🔄 Automation (1)
17.**Recurring Tasks** - Task templates with auto-creation
---
## 📋 REMAINING FEATURES (7/24)
### High Priority (1)
1.**Custom Report Builder** - Drag-and-drop UI component
### Medium/Low Priority (6)
2.**Pomodoro Enhancements** - Better timer integration
3.**Expense OCR Enhancement** - Improve receipt scanning
4.**Expense GPS Tracking** - Mileage tracking with GPS
5.**AI Suggestions** - Smart time entry suggestions
6.**AI Categorization** - Automatic categorization
7.**Gamification** - Badges and leaderboards
---
## 📁 Implementation Summary
### Files Created (35+)
- **Models:** 8 files (workflows, approvals, chat, customization, recurring tasks)
- **Services:** 6 files (workflow engine, approval services, currency service)
- **Routes:** 8 files (workflows, approvals, chat, customization, activity feed)
- **Integrations:** 4 files (Google Calendar, Asana, Trello, QuickBooks)
- **Frontend:** 3 files (offline sync, activity feed, mentions)
- **Utilities:** 2 files (PowerPoint export, currency service)
- **Migrations:** 4 files
- **Documentation:** 4 files
### Database Tables Added
1. `workflow_rules` & `workflow_executions`
2. `time_entry_approvals` & `approval_policies`
3. `recurring_tasks`
4. `client_portal_customizations`
5. `chat_channels`, `chat_messages`, `chat_channel_members`, `chat_read_receipts`
6. `client_time_approvals` & `client_approval_policies`
---
## 🚀 Next Steps
### Immediate Actions
1. **Run Migrations:**
```bash
flask db upgrade
```
2. **Add Dependencies:**
```txt
python-pptx==0.6.23
```
3. **Register Routes:**
Add to `app/__init__.py`:
```python
from app.routes.workflows import workflows_bp
from app.routes.time_approvals import time_approvals_bp
from app.routes.activity_feed import activity_feed_bp
from app.routes.recurring_tasks import recurring_tasks_bp
from app.routes.team_chat import team_chat_bp
from app.routes.client_portal_customization import client_portal_customization_bp
app.register_blueprint(workflows_bp)
app.register_blueprint(time_approvals_bp)
app.register_blueprint(activity_feed_bp)
app.register_blueprint(recurring_tasks_bp)
app.register_blueprint(team_chat_bp)
app.register_blueprint(client_portal_customization_bp)
```
4. **Add Scripts to Templates:**
- `offline-sync.js` - Base template
- `activity-feed.js` - Dashboard
- `mentions.js` - Chat/comments
5. **Update Models:**
- Already updated in `app/models/__init__.py`
---
## 📊 Statistics
- **Completion Rate:** 71% (17/24)
- **Lines of Code:** ~8,000+
- **New Services:** 6
- **New Integrations:** 4
- **Database Tables:** 13 new tables
- **API Endpoints:** 70+ new endpoints
- **JavaScript Components:** 3 major components
---
## 🎯 Key Achievements
**Complete Integration Framework** - OAuth-ready connectors
**Full Workflow Automation** - Rule-based system
**Team Collaboration** - Chat with mentions
**Approval Systems** - Manager & client approvals
**Portal Customization** - Full branding support
**Export Enhancements** - PowerPoint support
**Currency Features** - Auto-conversion & history
---
**Status:****71% COMPLETE**
**Next Focus:** Custom Report Builder UI

View File

@@ -1,167 +0,0 @@
# Feature Implementation Summary
**Date:** 2025-01-27
**Status:** Foundation Complete, Ready for Continued Development
## ✅ Completed Implementations
### 1. Offline Mode with Sync ✅
**Status:** Complete
**Files:**
- `app/static/offline-sync.js` - Full offline sync manager
**Features Implemented:**
- ✅ IndexedDB storage for time entries, tasks, projects
- ✅ Sync queue management
- ✅ Automatic sync when connection restored
- ✅ Conflict resolution framework
- ✅ UI indicators for offline status
- ✅ Background sync via Service Worker
- ✅ Pending sync count tracking
**Integration Required:**
- Add `<script src="{{ url_for('static', filename='offline-sync.js') }}"></script>` to base template
- Add offline indicator UI element
- Integrate `offlineSyncManager.createTimeEntryOffline()` into time entry forms
### 2. Automation Workflow Engine ✅
**Status:** Complete (Backend)
**Files:**
- `app/models/workflow.py` - WorkflowRule and WorkflowExecution models
- `app/services/workflow_engine.py` - Complete workflow engine
- `app/routes/workflows.py` - Full CRUD API routes
- `migrations/versions/069_add_workflow_automation.py` - Database migration
**Features Implemented:**
- ✅ Rule-based automation system
- ✅ 8 trigger types (task status, time logged, deadlines, etc.)
- ✅ 8 action types (log time, notifications, status updates, etc.)
- ✅ Template variable resolution ({{task.name}})
- ✅ Execution logging and history
- ✅ Priority-based rule execution
- ✅ REST API endpoints
**Next Steps:**
1. Run migration: `flask db upgrade`
2. Register workflow routes in `app/__init__.py`
3. Create UI templates for workflow builder
4. Integrate workflow triggers into existing code:
- Call `WorkflowEngine.trigger_event()` when tasks change status
- Call `WorkflowEngine.trigger_event()` when time entries are created
- Add triggers for deadlines and budget thresholds
**Integration Points:**
```python
# In task status change handler:
from app.services.workflow_engine import WorkflowEngine
WorkflowEngine.trigger_event('task_status_change', {
'data': {
'task_id': task.id,
'old_status': old_status,
'new_status': task.status,
'task': task.to_dict(),
'user_id': current_user.id
}
})
```
### 3. Google Calendar Integration ✅
**Status:** Complete
**Files:**
- `app/integrations/google_calendar.py` - Full Google Calendar connector
- Updated `app/integrations/registry.py` - Registered connector
**Features Implemented:**
- ✅ OAuth 2.0 authentication
- ✅ Two-way calendar sync
- ✅ Time entry to calendar event conversion
- ✅ Calendar event updates
- ✅ Multiple calendar support
- ✅ Configurable sync direction
**Next Steps:**
1. Configure Google OAuth credentials in settings
2. Update calendar routes to use new connector
3. Add sync scheduling (background jobs)
4. Test OAuth flow
**Configuration Required:**
```env
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
```
## 📋 Remaining Features (Prioritized)
### High Priority
1. **Asana Integration** - Similar to Google Calendar connector
2. **Trello Integration** - Similar pattern
3. **QuickBooks Integration** - More complex, requires QuickBooks API
4. **Time Approval Workflow** - Manager approval system
5. **Client Approval Workflow** - Client-side approval
### Medium Priority
6. **Custom Report Builder** - Drag-and-drop UI component
7. **PowerPoint Export** - Use python-pptx library
8. **Team Chat** - Real-time messaging system
9. **Activity Feed UI** - Display Activity model data
10. **@Mentions UI** - Enhance existing comments
### Lower Priority
11. **AI Features** - Requires ML/AI service integration
12. **Gamification** - Badges and leaderboards
13. **Expense OCR Enhancement** - Improve pytesseract usage
14. **GPS Tracking** - Browser geolocation API
15. **Recurring Tasks** - Similar to recurring invoices
16. **Currency Auto-Conversion** - Exchange rate API integration
## 🚀 Quick Start Guide
### 1. Run Migrations
```bash
flask db upgrade
```
### 2. Register Workflow Routes
Add to `app/__init__.py`:
```python
from app.routes.workflows import workflows_bp
app.register_blueprint(workflows_bp)
```
### 3. Add Offline Sync to Templates
Add to `app/templates/base.html`:
```html
<script src="{{ url_for('static', filename='offline-sync.js') }}"></script>
<div id="offline-indicator" class="hidden"></div>
```
### 4. Integrate Workflow Triggers
Add workflow triggers to key events:
- Task status changes
- Time entry creation
- Invoice creation/payment
- Budget threshold reached
## 📝 Notes
- All implementations follow existing codebase patterns
- Database migrations are ready to run
- Integration framework is extensible
- Service layer pattern is maintained
- Error handling and logging included
## 🔄 Next Session Priorities
1. Complete UI templates for workflows
2. Integrate workflow triggers
3. Add Asana/Trello integrations
4. Implement time approval workflow
5. Create custom report builder
---
**Total Features Implemented:** 3/24
**Foundation Complete:**
**Ready for UI Development:**

View File

@@ -347,7 +347,7 @@ docker-compose up -d
**First login creates the admin account** — just enter your username!
**📖 See the complete setup guide:** [`docs/DOCKER_COMPOSE_SETUP.md`](docs/DOCKER_COMPOSE_SETUP.md)
**📖 See the complete setup guide:** [`docs/admin/configuration/DOCKER_COMPOSE_SETUP.md`](docs/admin/configuration/DOCKER_COMPOSE_SETUP.md)
### Option 2: Docker with Plain HTTP (Development/Testing)
@@ -421,13 +421,13 @@ Comprehensive documentation is available in the [`docs/`](docs/) directory:
### Getting Started
- **[📖 Getting Started Guide](docs/GETTING_STARTED.md)** — Complete beginner's guide (⭐ Start here!)
- **[Installation Guide](docs/DOCKER_PUBLIC_SETUP.md)** — Detailed setup instructions
- **[Installation Guide](docs/admin/configuration/DOCKER_PUBLIC_SETUP.md)** — Detailed setup instructions
- **[Requirements](docs/REQUIREMENTS.md)** — System requirements and dependencies
- **[Troubleshooting](docs/DOCKER_STARTUP_TROUBLESHOOTING.md)** — Common issues and solutions
- **[CSRF Token Issues](CSRF_TROUBLESHOOTING.md)** — Fix "CSRF token missing or invalid" errors
- **[CSRF IP Access Fix](CSRF_IP_ACCESS_FIX.md)** — 🔥 Fix cookies not working when accessing via IP address
- **[HTTPS Auto-Setup](README_HTTPS_AUTO.md)** — 🚀 Automatic HTTPS at startup (one command!)
- **[HTTPS Manual Setup (mkcert)](README_HTTPS.md)** — 🔒 Manual HTTPS with no certificate warnings
- **[Troubleshooting](docs/admin/configuration/DOCKER_STARTUP_TROUBLESHOOTING.md)** — Common issues and solutions
- **[CSRF Token Issues](docs/admin/security/CSRF_TROUBLESHOOTING.md)** — Fix "CSRF token missing or invalid" errors
- **[CSRF IP Access Fix](docs/admin/security/CSRF_IP_ACCESS_FIX.md)** — 🔥 Fix cookies not working when accessing via IP address
- **[HTTPS Auto-Setup](docs/admin/security/README_HTTPS_AUTO.md)** — 🚀 Automatic HTTPS at startup (one command!)
- **[HTTPS Manual Setup (mkcert)](docs/admin/security/README_HTTPS.md)** — 🔒 Manual HTTPS with no certificate warnings
### Features
- **[📋 Complete Features Overview](docs/FEATURES_COMPLETE.md)** — Comprehensive documentation of all 120+ features (⭐ Complete reference!)
@@ -444,15 +444,15 @@ Comprehensive documentation is available in the [`docs/`](docs/) directory:
- **[Role-Based Permissions](docs/ADVANCED_PERMISSIONS.md)** — Granular access control
### Technical Documentation
- **[Project Structure](docs/PROJECT_STRUCTURE.md)** — Codebase architecture
- **[Project Structure](docs/development/PROJECT_STRUCTURE.md)** — Codebase architecture
- **[Database Migrations](migrations/README.md)** — Database schema management
- **[Version Management](docs/VERSION_MANAGEMENT.md)** — Release and versioning
- **[CSRF Configuration](docs/CSRF_CONFIGURATION.md)** — Security and CSRF token setup for Docker
- **[Version Management](docs/admin/deployment/VERSION_MANAGEMENT.md)** — Release and versioning
- **[CSRF Configuration](docs/admin/security/CSRF_CONFIGURATION.md)** — Security and CSRF token setup for Docker
- **[CI/CD Documentation](docs/cicd/)** — Continuous integration setup
### Contributing
- **[Contributing Guidelines](docs/CONTRIBUTING.md)** — How to contribute
- **[Code of Conduct](docs/CODE_OF_CONDUCT.md)** — Community standards
- **[Contributing Guidelines](docs/development/CONTRIBUTING.md)** — How to contribute
- **[Code of Conduct](docs/development/CODE_OF_CONDUCT.md)** — Community standards
---
@@ -492,7 +492,7 @@ docker-compose up -d
docker-compose -f docker-compose.remote.yml up -d
```
> **⚠️ Security Note:** Always set a unique `SECRET_KEY` in production! See [CSRF Configuration](docs/CSRF_CONFIGURATION.md) for details.
> **⚠️ Security Note:** Always set a unique `SECRET_KEY` in production! See [CSRF Configuration](docs/admin/security/CSRF_CONFIGURATION.md) for details.
### Raspberry Pi Deployment
TimeTracker runs perfectly on Raspberry Pi 4 (2GB+ RAM):
@@ -525,8 +525,8 @@ docker-compose up -d
# Prometheus: http://localhost:9090
```
**📖 See [Deployment Guide](docs/DOCKER_PUBLIC_SETUP.md) for detailed instructions**
**📖 See [Docker Compose Setup](docs/DOCKER_COMPOSE_SETUP.md) for configuration options**
**📖 See [Deployment Guide](docs/admin/configuration/DOCKER_PUBLIC_SETUP.md) for detailed instructions**
**📖 See [Docker Compose Setup](docs/admin/configuration/DOCKER_COMPOSE_SETUP.md) for configuration options**
---
@@ -534,7 +534,7 @@ docker-compose up -d
TimeTracker is highly configurable through environment variables. For a comprehensive list and recommended values, see:
- [`docs/DOCKER_COMPOSE_SETUP.md`](docs/DOCKER_COMPOSE_SETUP.md)
- [`docs/admin/configuration/DOCKER_COMPOSE_SETUP.md`](docs/admin/configuration/DOCKER_COMPOSE_SETUP.md)
- [`env.example`](env.example)
Common settings:
@@ -733,7 +733,7 @@ We welcome contributions! Whether it's:
- 📝 **Documentation** — Improve our docs
- 💻 **Code Contributions** — Submit pull requests
**📖 See [Contributing Guidelines](docs/CONTRIBUTING.md) to get started**
**📖 See [Contributing Guidelines](docs/development/CONTRIBUTING.md) to get started**
---

View File

@@ -736,44 +736,78 @@
</details>
<details class="group border border-border-light dark:border-border-dark rounded p-4">
<summary class="font-semibold cursor-pointer flex items-center"><i class="fas fa-question-circle mr-2"></i>{{ _('Where can I get additional help?') }}</summary>
<div class="mt-2 grid grid-cols-1 md:grid-cols-2 gap-4 text-text-muted-light dark:text-text-muted-dark">
<div class="mt-2 space-y-4 text-text-muted-light dark:text-text-muted-dark">
<div>
<h4 class="font-semibold">{{ _('Documentation') }}</h4>
<p>{{ _('This help page covers most common questions and features.') }}</p>
<h4 class="font-semibold mb-2">{{ _('Documentation') }}</h4>
<p class="mb-2">{{ _('This help page covers most common questions and features. For complete documentation:') }}</p>
<ul class="list-disc ml-6 space-y-1">
<li><a class="text-primary hover:underline" href="https://github.com/drytrix/TimeTracker/blob/main/docs/README.md" target="_blank">{{ _('Complete Documentation Index') }}</a></li>
<li><a class="text-primary hover:underline" href="https://github.com/drytrix/TimeTracker/blob/main/docs/GETTING_STARTED.md" target="_blank">{{ _('Getting Started Guide') }}</a></li>
<li><a class="text-primary hover:underline" href="https://github.com/drytrix/TimeTracker/blob/main/README.md" target="_blank">{{ _('Product Overview & Features') }}</a></li>
<li><a class="text-primary hover:underline" href="https://github.com/drytrix/TimeTracker/blob/main/CHANGELOG.md" target="_blank">{{ _('Changelog') }}</a></li>
</ul>
</div>
<div>
<h4 class="font-semibold">{{ _('Community Support') }}</h4>
<p>{{ _('Report issues and request features on') }} <a class="text-primary" href="https://github.com/drytrix/TimeTracker/issues" target="_blank">GitHub Issues</a>.</p>
<h4 class="font-semibold mb-2">{{ _('Community Support') }}</h4>
<p>{{ _('Report issues and request features on') }} <a class="text-primary hover:underline" href="https://github.com/drytrix/TimeTracker/issues" target="_blank">GitHub Issues</a>.</p>
</div>
</div>
{% if current_user.is_admin %}
<div class="mt-3 p-3 rounded border border-sky-600/30 bg-sky-50 dark:bg-sky-900/20">
<i class="fas fa-info-circle mr-2"></i>{{ _('As an admin, you can access additional system information and diagnostics in the') }} <a class="text-primary" href="{{ url_for('admin.system_info') }}">{{ _('System Info') }}</a> {{ _('section.') }}
</div>
{% endif %}
<i class="fas fa-info-circle mr-2"></i>{{ _('As an admin, you can access additional system information and diagnostics in the') }} <a class="text-primary hover:underline" href="{{ url_for('admin.system_info') }}">{{ _('System Info') }}</a> {{ _('section.') }}
<div class="mt-2 text-sm">
{{ _('Admin documentation:') }} <a class="text-primary hover:underline" href="https://github.com/drytrix/TimeTracker/blob/main/docs/admin/README.md" target="_blank">{{ _('Administrator Guide') }}</a>
</div>
</div>
{% endif %}
</details>
</div>
</section>
<!-- Footer Help -->
<div class="bg-card-light dark:bg-card-dark border border-border-light dark:border-border-dark p-6 rounded-lg shadow text-center">
<h3 class="text-lg font-semibold">{{ _('Still Need Help?') }}</h3>
<p class="text-sm text-text-muted-light dark:text-text-muted-dark mb-4">{{ _('Can\'t find what you\'re looking for? Here are additional resources:') }}</p>
<div class="bg-card-light dark:bg-card-dark border border-border-light dark:border-border-dark p-6 rounded-lg shadow">
<h3 class="text-lg font-semibold text-center mb-4">{{ _('Still Need Help?') }}</h3>
<p class="text-sm text-text-muted-light dark:text-text-muted-dark mb-4 text-center">{{ _('Can\'t find what you\'re looking for? Here are additional resources:') }}</p>
<!-- Documentation Links -->
<div class="mb-4 p-4 rounded-lg bg-primary/5 border border-primary/20">
<h4 class="font-semibold mb-2 flex items-center">
<i class="fas fa-book mr-2 text-primary"></i>{{ _('Complete Documentation') }}
</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-2 text-sm">
<a href="https://github.com/drytrix/TimeTracker/blob/main/docs/README.md" target="_blank" rel="noopener" class="text-primary hover:underline flex items-center">
<i class="fas fa-list mr-1"></i>{{ _('Documentation Index') }}
</a>
<a href="https://github.com/drytrix/TimeTracker/blob/main/docs/GETTING_STARTED.md" target="_blank" rel="noopener" class="text-primary hover:underline flex items-center">
<i class="fas fa-rocket mr-1"></i>{{ _('Getting Started') }}
</a>
<a href="https://github.com/drytrix/TimeTracker/blob/main/docs/features/" target="_blank" rel="noopener" class="text-primary hover:underline flex items-center">
<i class="fas fa-star mr-1"></i>{{ _('Feature Guides') }}
</a>
{% if current_user.is_admin %}
<a href="https://github.com/drytrix/TimeTracker/blob/main/docs/admin/README.md" target="_blank" rel="noopener" class="text-primary hover:underline flex items-center">
<i class="fas fa-cog mr-1"></i>{{ _('Admin Documentation') }}
</a>
{% endif %}
</div>
</div>
<!-- Action Buttons -->
<div class="flex flex-wrap gap-3 justify-center">
{% if current_user.is_admin %}
{% if current_user.is_admin %}
<a href="{{ url_for('admin.system_info') }}" class="px-4 py-2 rounded-lg border border-primary text-primary hover:bg-primary/10">
<i class="fas fa-info-circle mr-1"></i>{{ _('System Info') }}
</a>
{% endif %}
</a>
{% endif %}
<a href="https://github.com/drytrix/TimeTracker" target="_blank" rel="noopener" class="px-4 py-2 rounded-lg border border-border-light dark:border-border-dark hover:bg-background-light dark:hover:bg-background-dark">
<i class="fab fa-github mr-1"></i>{{ _('GitHub Repository') }}
</a>
</a>
<a href="https://github.com/drytrix/TimeTracker/issues" target="_blank" rel="noopener" class="px-4 py-2 rounded-lg border border-amber-600 text-amber-600 hover:bg-amber-50 dark:hover:bg-amber-900/20">
<i class="fas fa-bug mr-1"></i>{{ _('Report Issue') }}
</a>
</a>
<a href="https://buymeacoffee.com/DryTrix" target="_blank" rel="noopener" class="px-4 py-2 rounded-lg border border-green-600 text-green-600 hover:bg-green-50 dark:hover:bg-green-900/20">
<i class="fas fa-mug-saucer mr-1"></i>{{ _('Support Development') }}
</a>
</a>
</div>
</div>
</section>

View File

@@ -0,0 +1,178 @@
# Documentation Reorganization Summary
## ✅ Completed Changes
All documentation has been reorganized to improve navigation and discoverability.
### 📁 New Directory Structure
Created the following new directories:
- `docs/api/` - API documentation
- `docs/admin/` - Administrator documentation
- `admin/configuration/` - Configuration guides
- `admin/deployment/` - Deployment guides
- `admin/security/` - Security documentation
- `admin/monitoring/` - Monitoring and analytics
- `docs/development/` - Developer documentation
- `docs/guides/` - User-facing guides
- `docs/reports/` - Analysis reports and summaries
- `docs/changelog/` - Detailed changelog entries (ready for future use)
### 📦 Files Moved
#### Root → `docs/implementation-notes/` (39 files)
All implementation notes, summaries, and historical documentation moved from root:
- Implementation summaries and checklists
- Architecture migration guides
- Bugfix documentation
- Feature implementation progress
- Integration guides
- Session summaries
#### Root → `docs/reports/` (3 files)
- `ALL_BUGFIXES_SUMMARY.md`
- `i18n_audit_report.md`
- `TRANSLATION_ANALYSIS_REPORT.md`
#### Root → `docs/testing/` (2 files)
- `TEST_REPORT.md`
- `TEST_RESULTS_AVATAR_PERSISTENCE.md`
#### Root → `docs/guides/` (4 files)
- `DEPLOYMENT_GUIDE.md`
- `QUICK_START_GUIDE.md`
- `QUICK_START_LOCAL_DEVELOPMENT.md`
- `IMPROVEMENTS_QUICK_REFERENCE.md`
#### `docs/` → `docs/api/` (4 files)
- `REST_API.md`
- `API_TOKEN_SCOPES.md`
- `API_VERSIONING.md`
- `API_ENHANCEMENTS.md`
#### `docs/` → `docs/admin/` (11 files)
**Configuration:**
- `DOCKER_COMPOSE_SETUP.md`
- `DOCKER_PUBLIC_SETUP.md`
- `DOCKER_STARTUP_TROUBLESHOOTING.md`
- `EMAIL_CONFIGURATION.md`
- `OIDC_SETUP.md`
**Deployment:**
- `VERSION_MANAGEMENT.md`
- `RELEASE_PROCESS.md`
- `OFFICIAL_BUILDS.md`
**Security:**
- All files from `docs/security/` moved to `docs/admin/security/`
**Monitoring:**
- All files from `docs/telemetry/` moved to `docs/admin/monitoring/`
#### `docs/` → `docs/development/` (5 files)
- `CONTRIBUTING.md`
- `CODE_OF_CONDUCT.md`
- `PROJECT_STRUCTURE.md`
- `LOCAL_TESTING_WITH_SQLITE.md`
- `LOCAL_DEVELOPMENT_WITH_ANALYTICS.md`
### 📝 Documentation Updated
#### `docs/README.md`
- Complete rewrite with improved navigation
- Added visual documentation map
- Organized by role (Users, Administrators, Developers)
- Better categorization and quick links
- Updated all internal links
#### `README.md` (root)
- Updated all documentation links to reflect new structure
- Fixed 8 broken links
#### `app/templates/main/help.html`
- Enhanced "Where can I get additional help?" section
- Added links to new documentation structure
- Added documentation index link
- Added admin documentation link for administrators
- Improved footer with organized documentation links
### 📚 New README Files Created
Created README files for new directories:
- `docs/api/README.md` - API documentation overview
- `docs/guides/README.md` - User guides index
- `docs/reports/README.md` - Reports index
- `docs/development/README.md` - Developer documentation index
- `docs/admin/README.md` - Administrator documentation index
### 🧹 Cleanup
- Removed empty `docs/security/` directory (files moved to `admin/security/`)
- Removed empty `docs/telemetry/` directory (files moved to `admin/monitoring/`)
- Verified root directory only contains: `README.md`, `CHANGELOG.md`, `LICENSE`
## 📊 Results
### Before
- **45+ markdown files** cluttering root directory
- Documentation scattered across root and `docs/`
- Difficult to find relevant documentation
- No clear organization structure
- Mixed file types and purposes
### After
- **3 files** in root directory (README, CHANGELOG, LICENSE)
- Clear directory structure organized by purpose and audience
- Easy navigation with role-based organization
- All documentation properly categorized
- Improved discoverability
## 🎯 Benefits
1. **Better Organization** - Documentation grouped by purpose and audience
2. **Easier Navigation** - Role-based sections (Users, Admins, Developers)
3. **Improved Discoverability** - Clear structure with README files in each directory
4. **Cleaner Root** - Only essential files at project root
5. **Maintainability** - Easier to add and organize new documentation
## 📖 Navigation Guide
### For End Users
- Start: `docs/GETTING_STARTED.md`
- Features: `docs/FEATURES_COMPLETE.md`
- Guides: `docs/guides/`
### For Administrators
- Start: `docs/admin/README.md`
- Configuration: `docs/admin/configuration/`
- Deployment: `docs/admin/deployment/`
- Security: `docs/admin/security/`
- Monitoring: `docs/admin/monitoring/`
### For Developers
- Start: `docs/development/README.md`
- Contributing: `docs/development/CONTRIBUTING.md`
- Architecture: `docs/development/PROJECT_STRUCTURE.md`
- API: `docs/api/`
### For Reference
- Complete Index: `docs/README.md`
- Implementation Notes: `docs/implementation-notes/`
- Reports: `docs/reports/`
- Testing: `docs/testing/`
## ✅ All Tasks Completed
- ✅ Created new directory structure
- ✅ Moved 40+ files from root to appropriate locations
- ✅ Moved and organized files within `docs/`
- ✅ Updated `docs/README.md` with improved navigation
- ✅ Updated root `README.md` with correct links
- ✅ Updated application help page (`help.html`)
- ✅ Created README files for new directories
- ✅ Cleaned up empty directories
- ✅ Verified all links work correctly
---
*Reorganization completed: 2025-12-14*

View File

@@ -8,80 +8,110 @@ Welcome to the comprehensive TimeTracker documentation. Everything you need to i
- **[🚀 Getting Started Guide](GETTING_STARTED.md)** — Complete beginner tutorial (⭐ Start here!)
- **[Main README](../README.md)** — Product overview and quick start
- **[Installation Guide](#-installation--deployment)** — Get TimeTracker running
- **[Installation & Deployment](#-installation--deployment)** — Get TimeTracker running
- **[Feature Guides](#-feature-documentation)** — Learn what TimeTracker can do
- **[Troubleshooting](#-troubleshooting)** — Solve common issues
---
## 🚀 Installation & Deployment
## 🗺️ Documentation Map
```
docs/
├── 👤 User Documentation
│ ├── Getting Started
│ ├── Feature Guides
│ └── User Guides
├── 🔧 Administrator Documentation
│ ├── Configuration
│ ├── Deployment
│ ├── Security
│ └── Monitoring
├── 👨‍💻 Developer Documentation
│ ├── Contributing
│ ├── Architecture
│ ├── Development Setup
│ └── Testing
└── 📚 Reference
├── API Documentation
├── Implementation Notes
└── Reports
```
---
## 👤 User Documentation
### Getting Started
- **[🚀 Getting Started Guide](GETTING_STARTED.md)** — Complete beginner tutorial (⭐ Start here!)
- **[Requirements](REQUIREMENTS.md)** — System requirements and dependencies
- **[Docker Public Setup](DOCKER_PUBLIC_SETUP.md)** — Production deployment with Docker
- **[Local Testing with SQLite](LOCAL_TESTING_WITH_SQLITE.md)** — Quick test without database setup
### Database & Migrations
- **[Database Migrations](../migrations/README.md)** — Database schema management with Flask-Migrate
- **[Migration Guide](../migrations/MIGRATION_GUIDE.md)** — Migrate existing databases
- **[Enhanced Database Startup](ENHANCED_DATABASE_STARTUP.md)** — Automatic database initialization
- **[Database Startup Fix](DATABASE_STARTUP_FIX_README.md)** — Database connection troubleshooting
### User Guides
- **[Deployment Guide](guides/DEPLOYMENT_GUIDE.md)** — How to deploy TimeTracker
- **[Quick Start Guide](guides/QUICK_START_GUIDE.md)** — Get started quickly
- **[Quick Start Local Development](guides/QUICK_START_LOCAL_DEVELOPMENT.md)** — Local development setup
### Docker & Containers
- **[Docker Startup Troubleshooting](DOCKER_STARTUP_TROUBLESHOOTING.md)** — Fix Docker issues
- **[Docker Startup Configuration](../docker/STARTUP_MIGRATION_CONFIG.md)** — Container startup behavior
- **[Docker Connection Troubleshooting](../docker/TROUBLESHOOTING_DB_CONNECTION.md)** — Database connection in Docker
---
## ✨ Feature Documentation
### Complete Features Reference
- **[📋 Complete Features Overview](FEATURES_COMPLETE.md)** — Comprehensive documentation of all 120+ features across 12 categories (⭐ Start here for complete feature list!)
### Core Features
### Feature Documentation
- **[📋 Complete Features Overview](FEATURES_COMPLETE.md)** — Comprehensive documentation of all 120+ features (⭐ Complete reference!)
- **[Task Management](TASK_MANAGEMENT_README.md)** — Complete task tracking system
- **[Task Management Overview](TASK_MANAGEMENT.md)** — Task management concepts
- **[Client Management](CLIENT_MANAGEMENT_README.md)** — Manage clients and relationships
- **[Client Notes](CLIENT_NOTES_FEATURE.md)** — Add internal notes about clients
- **[Invoice System](INVOICE_FEATURE_README.md)** — Generate and track invoices
- **[Enhanced Invoice System](ENHANCED_INVOICE_SYSTEM_README.md)** — Advanced invoicing features
- **[Calendar Features](CALENDAR_FEATURES_README.md)** — Calendar view and bulk entry
### Financial Features
- **[Expense Tracking](EXPENSE_TRACKING.md)** — Track business expenses
- **[Payment Tracking](PAYMENT_TRACKING.md)** — Track invoice payments
- **[Budget Alerts & Forecasting](BUDGET_ALERTS_AND_FORECASTING.md)** — Monitor project budgets
### Productivity Features
- **[Command Palette](COMMAND_PALETTE_USAGE.md)** — Keyboard shortcuts and quick actions
- **[Bulk Time Entry](BULK_TIME_ENTRY_README.md)** — Create multiple time entries at once
- **[Weekly Time Goals](WEEKLY_TIME_GOALS.md)** — Set and track weekly hour targets
- **[Toast Notification System](TOAST_NOTIFICATION_SYSTEM.md)** — User feedback and notifications
### Advanced Features
- **[Role-Based Permissions](ADVANCED_PERMISSIONS.md)** — Granular access control system
- **[Logo Upload System](LOGO_UPLOAD_SYSTEM_README.md)** — Brand your invoices
- **[Translation System](TRANSLATION_SYSTEM.md)** — Multi-language support
### Additional Documentation
- **[Mobile Improvements](MOBILE_IMPROVEMENTS.md)** — Mobile-optimized interface
- **[Invoice Interface Improvements](INVOICE_INTERFACE_IMPROVEMENTS.md)** — Invoice UI enhancements
- **[PDF Generation Troubleshooting](PDF_GENERATION_TROUBLESHOOTING.md)** — Fix PDF generation issues
See [features/](features/) for additional feature documentation.
---
## 🔧 Technical Documentation
## 🔧 Administrator Documentation
### Project Structure
- **[Project Structure](PROJECT_STRUCTURE.md)** — Codebase organization and architecture
- **[Solution Guide](SOLUTION_GUIDE.md)** — Technical solutions and patterns
### Configuration
- **[Docker Compose Setup](admin/configuration/DOCKER_COMPOSE_SETUP.md)** — Docker deployment guide
- **[Docker Public Setup](admin/configuration/DOCKER_PUBLIC_SETUP.md)** — Production deployment
- **[Docker Startup Troubleshooting](admin/configuration/DOCKER_STARTUP_TROUBLESHOOTING.md)** — Fix startup issues
- **[Email Configuration](admin/configuration/EMAIL_CONFIGURATION.md)** — Email setup
- **[OIDC Setup](admin/configuration/OIDC_SETUP.md)** — OIDC/SSO authentication setup
### Development
- **[Contributing Guidelines](CONTRIBUTING.md)** — How to contribute to TimeTracker
- **[Code of Conduct](CODE_OF_CONDUCT.md)** — Community standards and expectations
- **[Version Management](VERSION_MANAGEMENT.md)** — Release process and versioning
### Deployment
- **[Version Management](admin/deployment/VERSION_MANAGEMENT.md)** — Managing versions
- **[Release Process](admin/deployment/RELEASE_PROCESS.md)** — Release workflow
- **[Official Builds](admin/deployment/OFFICIAL_BUILDS.md)** — Official build information
### Security
- **[Security Documentation](admin/security/)** — Security guides and configuration
- See [admin/security/](admin/security/) for all security-related documentation
### Monitoring
- **[Monitoring Documentation](admin/monitoring/)** — Monitoring and analytics setup
- See [admin/monitoring/](admin/monitoring/) for telemetry and analytics guides
**📖 See [admin/README.md](admin/README.md) for complete administrator documentation**
---
## 👨‍💻 Developer Documentation
### Getting Started
- **[Contributing Guidelines](development/CONTRIBUTING.md)** — How to contribute to TimeTracker
- **[Code of Conduct](development/CODE_OF_CONDUCT.md)** — Community standards
- **[Project Structure](development/PROJECT_STRUCTURE.md)** — Codebase organization and architecture
### Development Setup
- **[Local Testing with SQLite](development/LOCAL_TESTING_WITH_SQLITE.md)** — Quick local testing setup
- **[Local Development with Analytics](development/LOCAL_DEVELOPMENT_WITH_ANALYTICS.md)** — Development setup with analytics
### Testing
- **[Testing Quick Reference](TESTING_QUICK_REFERENCE.md)** — Testing overview
- **[Testing Coverage Guide](TESTING_COVERAGE_GUIDE.md)** — Coverage documentation
- See [testing/](testing/) for additional testing documentation
### CI/CD
- **[CI/CD Documentation](cicd/)** — Continuous integration and deployment
@@ -89,21 +119,51 @@ Welcome to the comprehensive TimeTracker documentation. Everything you need to i
- **[Quick Start](cicd/CI_CD_QUICK_START.md)** — Get started with CI/CD
- **[Implementation Summary](cicd/CI_CD_IMPLEMENTATION_SUMMARY.md)** — What was implemented
- **[GitHub Actions Setup](cicd/GITHUB_ACTIONS_SETUP.md)** — Configure GitHub Actions
- **[GitHub Actions Verification](cicd/GITHUB_ACTIONS_VERIFICATION.md)** — Verify CI/CD setup
### Release & Images
- **[Release Process](RELEASE_PROCESS.md)** — How to create releases
- **[GitHub Workflow Images](GITHUB_WORKFLOW_IMAGES.md)** — Docker images on GitHub Container Registry
### Technical Documentation
- **[Solution Guide](SOLUTION_GUIDE.md)** — Technical solutions and patterns
- **[Database Migrations](../migrations/README.md)** — Database schema management
- **[Implementation Notes](implementation-notes/)** — Development notes and summaries
**📖 See [development/README.md](development/README.md) for complete developer documentation**
---
## 📚 API Documentation
- **[REST API](api/REST_API.md)** — Complete API reference with all endpoints
- **[API Token Scopes](api/API_TOKEN_SCOPES.md)** — Understanding token permissions and scopes
- **[API Versioning](api/API_VERSIONING.md)** — API versioning strategy
- **[API Enhancements](api/API_ENHANCEMENTS.md)** — Recent API improvements
**📖 See [api/README.md](api/README.md) for complete API documentation**
---
## 🚀 Installation & Deployment
### Quick Start
1. **[Getting Started Guide](GETTING_STARTED.md)** — Complete beginner tutorial
2. **[Docker Compose Setup](admin/configuration/DOCKER_COMPOSE_SETUP.md)** — Recommended deployment method
3. **[Requirements](REQUIREMENTS.md)** — System requirements
### Database & Migrations
- **[Database Migrations](../migrations/README.md)** — Database schema management with Flask-Migrate
- **[Migration Guide](../migrations/MIGRATION_GUIDE.md)** — Migrate existing databases
- **[Enhanced Database Startup](ENHANCED_DATABASE_STARTUP.md)** — Automatic database initialization
- **[Database Startup Fix](DATABASE_STARTUP_FIX_README.md)** — Database connection troubleshooting
- **[Docker Connection Troubleshooting](../docker/TROUBLESHOOTING_DB_CONNECTION.md)** — Database connection in Docker
---
## 🛠️ Troubleshooting
### Common Issues
- **[Docker Startup Troubleshooting](DOCKER_STARTUP_TROUBLESHOOTING.md)** — Docker won't start
- **[Docker Startup Troubleshooting](admin/configuration/DOCKER_STARTUP_TROUBLESHOOTING.md)** — Docker won't start
- **[Database Connection Issues](../docker/TROUBLESHOOTING_DB_CONNECTION.md)** — Can't connect to database
- **[PDF Generation Issues](PDF_GENERATION_TROUBLESHOOTING.md)** — PDFs not generating
- **[Solution Guide](SOLUTION_GUIDE.md)** — General problem solving
- **[Troubleshooting Transaction Error](TROUBLESHOOTING_TRANSACTION_ERROR.md)** — Transaction issues
### Quick Fixes
- **Port conflicts**: Change `PORT=8081` in docker-compose command
@@ -113,95 +173,112 @@ Welcome to the comprehensive TimeTracker documentation. Everything you need to i
---
## 📚 Additional Resources
### Features & Improvements
Detailed documentation about features and improvements is available in:
- **[Implementation Notes](implementation-notes/)** — Development summaries and changelogs
- **[Feature Guides](features/)** — Specific feature documentation
## 📝 Additional Resources
### Implementation Notes
Recent improvements and changes:
- **[Layout & UX Improvements](implementation-notes/IMPLEMENTATION_COMPLETE_SUMMARY.md)** — Complete UI/UX overhaul with 16 major improvements 🆕
- **[High-Impact Features](implementation-notes/HIGH_IMPACT_SUMMARY.md)** — Enhanced search, keyboard shortcuts, and data tables 🆕
- **[Advanced Features](implementation-notes/COMPLETE_ADVANCED_FEATURES_SUMMARY.md)** — Keyboard shortcuts system and quick actions menu
- **[Analytics Improvements](implementation-notes/ANALYTICS_IMPROVEMENTS_SUMMARY.md)**
- **[Calendar Improvements](implementation-notes/CALENDAR_IMPROVEMENTS_SUMMARY.md)**
- **[Command Palette Improvements](implementation-notes/COMMAND_PALETTE_IMPROVEMENTS.md)**
- **[Dashboard & Navbar](implementation-notes/DASHBOARD_NAVBAR_IMPROVEMENTS.md)**
- **[Kanban Improvements](implementation-notes/KANBAN_IMPROVEMENTS.md)**
- **[Notification System](implementation-notes/NOTIFICATION_SYSTEM_SUMMARY.md)**
- **[OIDC Improvements](implementation-notes/OIDC_IMPROVEMENTS.md)**
- **[Reports Improvements](implementation-notes/REPORTS_IMPROVEMENTS_SUMMARY.md)**
- **[Styling Consistency](implementation-notes/STYLING_CONSISTENCY_SUMMARY.md)**
- **[Toast Notifications](implementation-notes/TOAST_NOTIFICATION_IMPROVEMENTS.md)**
- **[Translation Improvements](implementation-notes/TRANSLATION_IMPROVEMENTS_SUMMARY.md)**
- **[Translation Fixes](implementation-notes/TRANSLATION_FIXES_SUMMARY.md)**
- **[UI Improvements](implementation-notes/UI_IMPROVEMENTS_SUMMARY.md)**
Recent improvements and changes are documented in [implementation-notes/](implementation-notes/):
- Layout & UX improvements
- Feature implementations
- Bug fixes and improvements
- Architecture changes
### Feature Specific
Feature documentation and quick starts:
- **[Layout Improvements Complete](features/LAYOUT_IMPROVEMENTS_COMPLETE.md)** — Comprehensive UX improvements documentation 🆕
- **[Alembic Migrations](features/ALEMBIC_MIGRATION_README.md)**
- **[Project Costs](features/PROJECT_COSTS_FEATURE.md)**
- **[Project Costs Quick Start](features/QUICK_START_PROJECT_COSTS.md)**
- **[Calendar Quick Start](features/CALENDAR_QUICK_START.md)**
- **[Badges](features/BADGES.md)**
- **[Code Formatting](features/RUN_BLACK_FORMATTING.md)**
### Reports & Analysis
Analysis reports and summaries are available in [reports/](reports/):
- Bugfix summaries
- Audit reports
- Translation analysis
### Feature-Specific Documentation
Detailed feature documentation is available in [features/](features/):
- Feature guides
- Quick start guides
- Implementation status
### User Guides
Additional user guides are available in [user-guides/](user-guides/):
- Step-by-step guides
- Tips and tricks
- Best practices
---
## 🔍 Documentation by Topic
## 🔍 Documentation by Role
### For New Users
1. Start with **[Main README](../README.md)** for product overview
2. Review **[Requirements](REQUIREMENTS.md)** to check if your system is compatible
3. Follow **[Docker Public Setup](DOCKER_PUBLIC_SETUP.md)** for installation
4. Explore **[Feature Documentation](#-feature-documentation)** to learn what TimeTracker can do
### For Developers
1. Read **[Contributing Guidelines](CONTRIBUTING.md)** before making changes
2. Review **[Project Structure](PROJECT_STRUCTURE.md)** to understand the codebase
3. Check **[Solution Guide](SOLUTION_GUIDE.md)** for technical patterns
4. Use **[Local Testing with SQLite](LOCAL_TESTING_WITH_SQLITE.md)** for development
2. Follow **[Getting Started Guide](GETTING_STARTED.md)** for installation
3. Review **[Requirements](REQUIREMENTS.md)** to check system compatibility
4. Explore **[Feature Documentation](#-feature-documentation)** to learn features
### For Administrators
1. Follow **[Docker Public Setup](DOCKER_PUBLIC_SETUP.md)** for deployment
2. Review **[Version Management](VERSION_MANAGEMENT.md)** for updates
3. Set up **[Database Migrations](../migrations/README.md)** for schema management
4. Configure **[CI/CD](cicd/)** for automated deployments
1. Follow **[Docker Compose Setup](admin/configuration/DOCKER_COMPOSE_SETUP.md)** for deployment
2. Review **[Version Management](admin/deployment/VERSION_MANAGEMENT.md)** for updates
3. Set up **[Email Configuration](admin/configuration/EMAIL_CONFIGURATION.md)** if needed
4. Configure **[OIDC/SSO](admin/configuration/OIDC_SETUP.md)** for authentication
5. See **[admin/README.md](admin/README.md)** for complete admin documentation
### For Developers
1. Read **[Contributing Guidelines](development/CONTRIBUTING.md)** before making changes
2. Review **[Project Structure](development/PROJECT_STRUCTURE.md)** to understand codebase
3. Check **[Solution Guide](SOLUTION_GUIDE.md)** for technical patterns
4. Use **[Local Testing with SQLite](development/LOCAL_TESTING_WITH_SQLITE.md)** for development
5. See **[development/README.md](development/README.md)** for complete developer documentation
### For Troubleshooting
1. Check **[Docker Startup Troubleshooting](DOCKER_STARTUP_TROUBLESHOOTING.md)**
1. Check **[Docker Startup Troubleshooting](admin/configuration/DOCKER_STARTUP_TROUBLESHOOTING.md)**
2. Review **[Database Connection Issues](../docker/TROUBLESHOOTING_DB_CONNECTION.md)**
3. Consult **[Solution Guide](SOLUTION_GUIDE.md)** for common problems
4. Check specific feature documentation if issue is feature-related
---
## 📝 Documentation Structure
## 📁 Documentation Structure
```
docs/
├── README.md # This file - documentation index
├── GETTING_STARTED.md # Beginner tutorial
├── REQUIREMENTS.md # System requirements
├── PROJECT_STRUCTURE.md # Codebase architecture
├── CONTRIBUTING.md # Contribution guidelines
├── CODE_OF_CONDUCT.md # Community standards
├── FEATURES_COMPLETE.md # Complete features list
├── cicd/ # CI/CD documentation
│ ├── CI_CD_DOCUMENTATION.md
│ ├── CI_CD_QUICK_START.md
├── guides/ # User-facing guides
│ ├── DEPLOYMENT_GUIDE.md
│ ├── QUICK_START_GUIDE.md
│ └── ...
├── admin/ # Administrator documentation
│ ├── configuration/ # Configuration guides
│ ├── deployment/ # Deployment guides
│ ├── security/ # Security documentation
│ └── monitoring/ # Monitoring & analytics
├── development/ # Developer documentation
│ ├── CONTRIBUTING.md
│ ├── CODE_OF_CONDUCT.md
│ ├── PROJECT_STRUCTURE.md
│ └── ...
├── api/ # API documentation
│ ├── REST_API.md
│ ├── API_TOKEN_SCOPES.md
│ └── ...
├── features/ # Feature-specific guides
│ ├── ALEMBIC_MIGRATION_README.md
│ ├── PROJECT_COSTS_FEATURE.md
│ └── ...
── implementation-notes/ # Development notes
── ANALYTICS_IMPROVEMENTS_SUMMARY.md
├── UI_IMPROVEMENTS_SUMMARY.md
── implementation-notes/ # Development notes
── ...
├── testing/ # Testing documentation
│ └── ...
├── reports/ # Reports & analysis
│ └── ...
├── user-guides/ # Additional user guides
│ └── ...
└── cicd/ # CI/CD documentation
└── ...
```
@@ -211,7 +288,7 @@ docs/
Found an error? Want to improve the docs?
1. Check the **[Contributing Guidelines](CONTRIBUTING.md)**
1. Check the **[Contributing Guidelines](development/CONTRIBUTING.md)**
2. Make your changes to the relevant documentation file
3. Test that all links work correctly
4. Submit a pull request with a clear description
@@ -225,7 +302,7 @@ Good documentation helps everyone! 📚
- **Use the search function** in your browser (Ctrl/Cmd + F) to find specific topics
- **Follow links** to related documentation for deeper understanding
- **Start with Quick Links** at the top if you're in a hurry
- **Browse by topic** using the categorized sections
- **Browse by role** using the role-based sections above
- **Check Implementation Notes** for recent changes and improvements
---
@@ -234,7 +311,7 @@ Good documentation helps everyone! 📚
**Need help?** [Open an issue](https://github.com/drytrix/TimeTracker/issues) or check the [troubleshooting section](#-troubleshooting)
**Want to contribute?** See our [Contributing Guidelines](CONTRIBUTING.md)
**Want to contribute?** See our [Contributing Guidelines](development/CONTRIBUTING.md)
---

35
docs/admin/README.md Normal file
View File

@@ -0,0 +1,35 @@
# Administrator Documentation
Complete guides for TimeTracker administrators.
## 📖 Quick Links
### Configuration
- **[Docker Compose Setup](configuration/DOCKER_COMPOSE_SETUP.md)** - Docker deployment guide
- **[Docker Public Setup](configuration/DOCKER_PUBLIC_SETUP.md)** - Production deployment
- **[Docker Startup Troubleshooting](configuration/DOCKER_STARTUP_TROUBLESHOOTING.md)** - Fix startup issues
- **[Email Configuration](configuration/EMAIL_CONFIGURATION.md)** - Email setup
- **[OIDC Setup](configuration/OIDC_SETUP.md)** - OIDC/SSO authentication setup
### Deployment
- **[Version Management](deployment/VERSION_MANAGEMENT.md)** - Managing versions
- **[Release Process](deployment/RELEASE_PROCESS.md)** - Release workflow
- **[Official Builds](deployment/OFFICIAL_BUILDS.md)** - Official build information
### Security
- See [security/](security/) for security documentation
### Monitoring
- See [monitoring/](monitoring/) for monitoring and analytics setup
## 🔧 Common Tasks
1. **Initial Setup**: Start with [Docker Compose Setup](configuration/DOCKER_COMPOSE_SETUP.md)
2. **Configure Email**: See [Email Configuration](configuration/EMAIL_CONFIGURATION.md)
3. **Set Up OIDC/SSO**: Follow [OIDC Setup](configuration/OIDC_SETUP.md)
4. **Monitor System**: Check [monitoring/](monitoring/) documentation
## 📚 Related Documentation
- **[Main Documentation Index](../README.md)** - Complete documentation overview
- **[User Guides](../guides/)** - User-facing guides

25
docs/api/README.md Normal file
View File

@@ -0,0 +1,25 @@
# API Documentation
Complete API reference for TimeTracker REST API.
## 📖 Overview
TimeTracker provides a comprehensive REST API for programmatic access to all features. The API supports token-based authentication and follows RESTful principles.
## 📚 Documentation
- **[REST API](REST_API.md)** - Complete API reference with all endpoints
- **[API Token Scopes](API_TOKEN_SCOPES.md)** - Understanding token permissions and scopes
- **[API Versioning](API_VERSIONING.md)** - API versioning strategy and best practices
- **[API Enhancements](API_ENHANCEMENTS.md)** - Recent API improvements and additions
## 🔑 Quick Start
1. Generate an API token in your user settings
2. Include the token in the `Authorization` header: `Bearer YOUR_TOKEN`
3. Make requests to the API endpoints
4. Review the [API Token Scopes](API_TOKEN_SCOPES.md) to ensure your token has the required permissions
## 📋 API Endpoints
See the [REST API](REST_API.md) documentation for a complete list of available endpoints organized by resource type.

View File

@@ -0,0 +1,28 @@
# Developer Documentation
Complete documentation for developers contributing to TimeTracker.
## 📖 Getting Started
- **[Contributing Guidelines](CONTRIBUTING.md)** - How to contribute to TimeTracker
- **[Code of Conduct](CODE_OF_CONDUCT.md)** - Community standards
- **[Project Structure](PROJECT_STRUCTURE.md)** - Codebase organization
- **[Local Testing with SQLite](LOCAL_TESTING_WITH_SQLITE.md)** - Quick local testing setup
- **[Local Development with Analytics](LOCAL_DEVELOPMENT_WITH_ANALYTICS.md)** - Development setup with analytics
## 🏗️ Development Resources
### Testing
- See [testing/](../testing/) for testing documentation
### CI/CD
- See [cicd/](../cicd/) for CI/CD setup and workflows
### Architecture
- See [implementation-notes/](../implementation-notes/) for architecture decisions and notes
## 📚 Related Documentation
- **[Main Documentation Index](../README.md)** - Complete documentation overview
- **[API Documentation](../api/)** - REST API reference
- **[Admin Documentation](../admin/)** - Administrator guides

20
docs/guides/README.md Normal file
View File

@@ -0,0 +1,20 @@
# User Guides
Step-by-step guides for using TimeTracker.
## 📖 Available Guides
- **[Deployment Guide](DEPLOYMENT_GUIDE.md)** - How to deploy TimeTracker
- **[Quick Start Guide](QUICK_START_GUIDE.md)** - Get started quickly
- **[Quick Start Local Development](QUICK_START_LOCAL_DEVELOPMENT.md)** - Local development setup
- **[Improvements Quick Reference](IMPROVEMENTS_QUICK_REFERENCE.md)** - Quick reference for improvements
## 🚀 Getting Started
New to TimeTracker? Start with the [Getting Started Guide](../GETTING_STARTED.md) for a comprehensive tutorial.
## 📚 Related Documentation
- **[Main Documentation Index](../README.md)** - Complete documentation overview
- **[Feature Documentation](../features/)** - Detailed feature guides
- **[Troubleshooting](../#-troubleshooting)** - Common issues and solutions

View File

@@ -1,303 +1,149 @@
# ✅ Telemetry & Analytics Implementation Complete
# ✅ Feature Implementation Complete
## Summary
All four requirements have been successfully implemented:
### ✅ 1. Comprehensive Event Tracking
**Status:** COMPLETE
All major user actions across the application are now tracked:
- **30+ distinct event types** covering all CRUD operations
- Events tracked in: auth, timer, projects, tasks, clients, invoices, reports, comments, admin
- All events logged to `logs/app.jsonl` (JSON structured logging)
- All events sent to PostHog (if API key configured and telemetry enabled)
**See:** `docs/all_tracked_events.md` for complete list
### ✅ 2. Installation-Specific Salt Generation
**Status:** COMPLETE
Unique salt generated once per installation:
- **Automatically generated** on first startup using `secrets.token_hex(32)`
- **Persisted** in `data/installation.json`
- **Unique per installation** (64-character hex string)
- **Used for telemetry fingerprints** to create consistent anonymous IDs
- **Never regenerated** (unless file is deleted)
**Implementation:** `app/utils/installation.py`
### ✅ 3. First-Time Setup with Telemetry Opt-In
**Status:** COMPLETE
Beautiful setup page shown on first access:
- **Modern UI** with clear privacy information
- **Opt-in by default** (checkbox unchecked)
- **Detailed explanation** of what is/isn't collected
- **Redirects automatically** - all routes check for setup completion
- **Can be re-run** by deleting `data/installation.json`
**Routes:** `/setup`
**Template:** `app/templates/setup/initial_setup.html`
### ✅ 4. Admin Telemetry Dashboard
**Status:** COMPLETE
Comprehensive admin dashboard showing:
- **Current telemetry status** (enabled/disabled with toggle button)
- **Installation ID** and anonymous fingerprint
- **PostHog status** (configured/not configured)
- **Sentry status** (configured/not configured)
- **What data is collected** (detailed breakdown)
- **Privacy documentation links**
- **One-click enable/disable** telemetry
**Routes:**
- View: `/admin/telemetry`
- Toggle: `/admin/telemetry/toggle` (POST)
## Files Created (15 new files)
### Core Implementation
1. `app/utils/installation.py` - Installation config management
2. `app/routes/setup.py` - Setup route handler
3. `app/templates/setup/initial_setup.html` - Setup page UI
4. `app/templates/admin/telemetry.html` - Admin dashboard UI
### Documentation
5. `docs/all_tracked_events.md` - Complete list of tracked events
6. `docs/TELEMETRY_QUICK_START.md` - User guide
7. `TELEMETRY_IMPLEMENTATION_SUMMARY.md` - Technical implementation details
8. `IMPLEMENTATION_COMPLETE.md` - This file
### Tests
9. `tests/test_installation_config.py` - Installation config tests
10. `tests/test_comprehensive_tracking.py` - Event tracking tests
## Files Modified (10 files)
1. `app/__init__.py` - Added setup check middleware, registered blueprint
2. `app/utils/telemetry.py` - Updated to use installation config
3. `app/routes/admin.py` - Added telemetry dashboard routes
4. `app/routes/invoices.py` - Added event tracking
5. `app/routes/clients.py` - Added event tracking
6. `app/routes/tasks.py` - Added event tracking
7. `app/routes/comments.py` - Added event tracking
8. `app/routes/auth.py` - (already had tracking)
9. `app/routes/timer.py` - (already had tracking)
10. `app/routes/projects.py` - (already had tracking)
## How to Use
### First-Time Setup
1. Start the application
2. You'll be redirected to `/setup`
3. Choose your telemetry preference
4. Click "Complete Setup & Continue"
### Admin Dashboard
1. Login as administrator
2. Navigate to **Admin****Telemetry** (or visit `/admin/telemetry`)
3. View all telemetry status and configuration
4. Toggle telemetry on/off with one click
### Configure PostHog (Optional)
```bash
export POSTHOG_API_KEY="your-api-key"
export POSTHOG_HOST="https://app.posthog.com"
```
### Configure Sentry (Optional)
```bash
export SENTRY_DSN="your-sentry-dsn"
export SENTRY_TRACES_RATE="0.1"
```
## Privacy Features
### Designed for Privacy
-**Opt-in by default** - Telemetry disabled unless explicitly enabled
-**Anonymous tracking** - Only numeric IDs, no PII
-**Transparent** - Complete documentation of tracked events
-**User control** - Can toggle on/off anytime
-**Self-hosted** - All data stays on your server
### What We Track
- Event types (e.g., "timer.started")
- Internal numeric IDs (user_id, project_id, etc.)
- Timestamps
- Anonymous installation fingerprint
### What We DON'T Track
- ❌ Email addresses or usernames
- ❌ Project names or descriptions
- ❌ Time entry notes or content
- ❌ Client information
- ❌ IP addresses
- ❌ Any personally identifiable information
## Testing
### Run Tests
```bash
# Run all tests
pytest
# Run telemetry tests only
pytest tests/test_installation_config.py
pytest tests/test_comprehensive_tracking.py
pytest tests/test_telemetry.py
pytest tests/test_analytics.py
```
### Manual Testing
#### Test Setup Flow
1. Delete `data/installation.json`
2. Restart application
3. Access any page → should redirect to `/setup`
4. Complete setup
5. Verify redirect to dashboard
#### Test Telemetry Dashboard
1. Login as admin
2. Go to `/admin/telemetry`
3. Verify all status cards show correct info
4. Toggle telemetry on/off
5. Verify state changes
#### Test Event Tracking
1. Enable telemetry in admin dashboard
2. Perform actions (create project, start timer, etc.)
3. Check `logs/app.jsonl` for events:
```bash
tail -f logs/app.jsonl | grep event_type
```
## Deployment Notes
### Docker Compose
All analytics services are integrated into `docker-compose.yml`:
- Start by default (no profiles needed)
- Includes: Prometheus, Grafana, Loki, Promtail
```bash
docker-compose up -d
docker-compose logs -f app
```
### Environment Variables
```bash
# Analytics (Optional)
POSTHOG_API_KEY= # Empty by default
POSTHOG_HOST=https://app.posthog.com
SENTRY_DSN= # Empty by default
SENTRY_TRACES_RATE=0.1
# Telemetry (User preference overrides this)
ENABLE_TELEMETRY=false # Default: false
```
### File Permissions
Ensure `data/` directory is writable:
```bash
chmod 755 data/
```
## Documentation
- **Quick Start:** `docs/TELEMETRY_QUICK_START.md`
- **All Events:** `docs/all_tracked_events.md`
- **Analytics Guide:** `docs/analytics.md`
- **Privacy Policy:** `docs/privacy.md`
- **Event Schema:** `docs/events.md`
## Architecture
### Flow Diagram
```
User Action
Route Handler
Business Logic
DB Commit
log_event() + track_event() ← Only if telemetry enabled
↓ ↓
JSON Log PostHog API
↓ ↓
logs/app.jsonl PostHog Dashboard
```
### Telemetry Check Flow
```
Request
check_setup_required() middleware
Is setup complete?
No → Redirect to /setup
Yes → Continue
Route Handler
track_event()
is_telemetry_enabled()?
No → Return early (no tracking)
Yes → Send to PostHog
```
## Success Metrics
### Implementation Completeness
- ✅ 30+ events tracked across all major routes
- ✅ 100% privacy-first design
- ✅ Full admin control
- ✅ Complete documentation
- ✅ Comprehensive tests
- ✅ Zero PII collection
### Code Quality
- ✅ No linting errors
- ✅ Type hints where applicable
- ✅ Comprehensive error handling
- ✅ Secure defaults (opt-in, no PII)
## Next Steps
### For Production
1. Set PostHog API key (if using PostHog)
2. Set Sentry DSN (if using Sentry)
3. Test setup flow with real users
4. Monitor logs for any issues
5. Review tracked events in PostHog dashboard
### For Development
1. Run tests: `pytest`
2. Review event schema in PostHog
3. Add more events as needed
4. Update documentation
## Support
- **Report Issues:** GitHub Issues
- **Documentation:** `docs/` directory
- **Community:** See README.md
**Date:** 2025-01-27
**Total Features:** 24
**Completed:** 17 (71%)
**Status:** 🎉 **MAJOR MILESTONE ACHIEVED**
---
## 🎉 Implementation Complete!
## ✅ COMPLETED FEATURES (17/24)
All requirements have been successfully implemented with:
- **Privacy-first design**
- **User-friendly interface**
- **Complete transparency**
- **Full administrative control**
### 🎯 Core Infrastructure (3)
1.**Offline Mode with Sync** - Complete IndexedDB implementation
2.**Automation Workflow Engine** - Full rule-based automation
3.**Activity Feed UI** - Real-time activity feed
The telemetry system is now ready for production use! 🚀
### 🔌 Integrations (4)
4.**Google Calendar** - Two-way sync
5.**Asana** - Project/task sync
6.**Trello** - Board/card sync
7.**QuickBooks** - Invoice/expense sync
### 📋 Workflows & Approvals (3)
8.**Time Approval Workflow** - Manager approval system
9.**Client Approval Workflow** - Client-side approvals
10.**Recurring Tasks** - Automated task creation
### 💬 Team Collaboration (2)
11.**Team Chat** - Real-time messaging system
12.**@Mentions UI** - Autocomplete mentions component
### 🎨 Customization (1)
13.**Client Portal Customization** - Branding & theme options
### 📊 Reporting (3)
14.**PowerPoint Export** - Presentation generation
15.**Currency Auto-Conversion** - Real-time rate fetching
16.**Currency Historical Rates** - Rate history tracking
### 🔄 Automation (1)
17.**Recurring Tasks** - Task templates with auto-creation
---
## 📋 REMAINING FEATURES (7/24)
### High Priority (1)
1.**Custom Report Builder** - Drag-and-drop UI component
### Medium/Low Priority (6)
2.**Pomodoro Enhancements** - Better timer integration
3.**Expense OCR Enhancement** - Improve receipt scanning
4.**Expense GPS Tracking** - Mileage tracking with GPS
5.**AI Suggestions** - Smart time entry suggestions
6.**AI Categorization** - Automatic categorization
7.**Gamification** - Badges and leaderboards
---
## 📁 Implementation Summary
### Files Created (35+)
- **Models:** 8 files (workflows, approvals, chat, customization, recurring tasks)
- **Services:** 6 files (workflow engine, approval services, currency service)
- **Routes:** 8 files (workflows, approvals, chat, customization, activity feed)
- **Integrations:** 4 files (Google Calendar, Asana, Trello, QuickBooks)
- **Frontend:** 3 files (offline sync, activity feed, mentions)
- **Utilities:** 2 files (PowerPoint export, currency service)
- **Migrations:** 4 files
- **Documentation:** 4 files
### Database Tables Added
1. `workflow_rules` & `workflow_executions`
2. `time_entry_approvals` & `approval_policies`
3. `recurring_tasks`
4. `client_portal_customizations`
5. `chat_channels`, `chat_messages`, `chat_channel_members`, `chat_read_receipts`
6. `client_time_approvals` & `client_approval_policies`
---
## 🚀 Next Steps
### Immediate Actions
1. **Run Migrations:**
```bash
flask db upgrade
```
2. **Add Dependencies:**
```txt
python-pptx==0.6.23
```
3. **Register Routes:**
Add to `app/__init__.py`:
```python
from app.routes.workflows import workflows_bp
from app.routes.time_approvals import time_approvals_bp
from app.routes.activity_feed import activity_feed_bp
from app.routes.recurring_tasks import recurring_tasks_bp
from app.routes.team_chat import team_chat_bp
from app.routes.client_portal_customization import client_portal_customization_bp
app.register_blueprint(workflows_bp)
app.register_blueprint(time_approvals_bp)
app.register_blueprint(activity_feed_bp)
app.register_blueprint(recurring_tasks_bp)
app.register_blueprint(team_chat_bp)
app.register_blueprint(client_portal_customization_bp)
```
4. **Add Scripts to Templates:**
- `offline-sync.js` - Base template
- `activity-feed.js` - Dashboard
- `mentions.js` - Chat/comments
5. **Update Models:**
- Already updated in `app/models/__init__.py`
---
## 📊 Statistics
- **Completion Rate:** 71% (17/24)
- **Lines of Code:** ~8,000+
- **New Services:** 6
- **New Integrations:** 4
- **Database Tables:** 13 new tables
- **API Endpoints:** 70+ new endpoints
- **JavaScript Components:** 3 major components
---
## 🎯 Key Achievements
**Complete Integration Framework** - OAuth-ready connectors
**Full Workflow Automation** - Rule-based system
**Team Collaboration** - Chat with mentions
**Approval Systems** - Manager & client approvals
**Portal Customization** - Full branding support
**Export Enhancements** - PowerPoint support
**Currency Features** - Auto-conversion & history
---
**Status:****71% COMPLETE**
**Next Focus:** Custom Report Builder UI

View File

@@ -1,308 +1,167 @@
# Kanban Board Customization - Implementation Summary
# Feature Implementation Summary
## Overview
**Date:** 2025-01-27
**Status:** Foundation Complete, Ready for Continued Development
Successfully implemented custom kanban board columns functionality for the TimeTracker application. Administrators can now create, modify, reorder, and manage custom task states/columns beyond the default "To Do", "In Progress", "Review", and "Done".
## ✅ Completed Implementations
## Key Features Implemented
### 1. Offline Mode with Sync ✅
**Status:** Complete
**Files:**
- `app/static/offline-sync.js` - Full offline sync manager
### 1. ✅ Custom Column Management
- Create new columns with custom names, icons, and colors
- Edit existing columns (label, icon, color, behavior)
- Delete custom columns (with validation to prevent data loss)
- Activate/deactivate columns without deleting them
- Reorder columns via drag-and-drop interface
**Features Implemented:**
- ✅ IndexedDB storage for time entries, tasks, projects
- ✅ Sync queue management
- ✅ Automatic sync when connection restored
- ✅ Conflict resolution framework
- ✅ UI indicators for offline status
- ✅ Background sync via Service Worker
- ✅ Pending sync count tracking
### 2. ✅ Dynamic Task Status System
- Task statuses now reflect custom kanban columns
- Validation against configured columns (not hardcoded values)
- Backward compatibility with existing task statuses
- Column states can mark tasks as completed automatically
**Integration Required:**
- Add `<script src="{{ url_for('static', filename='offline-sync.js') }}"></script>` to base template
- Add offline indicator UI element
- Integrate `offlineSyncManager.createTimeEntryOffline()` into time entry forms
### 3. ✅ Database Model
- New `KanbanColumn` model with all necessary properties
- Support for system columns that cannot be deleted
- Position-based ordering for flexible column arrangement
- Active/inactive state for hiding columns without deletion
### 2. Automation Workflow Engine ✅
**Status:** Complete (Backend)
**Files:**
- `app/models/workflow.py` - WorkflowRule and WorkflowExecution models
- `app/services/workflow_engine.py` - Complete workflow engine
- `app/routes/workflows.py` - Full CRUD API routes
- `migrations/versions/069_add_workflow_automation.py` - Database migration
### 4. ✅ Admin Interface
- Full CRUD interface for column management
- Drag-and-drop reordering with SortableJS
- Visual feedback for column properties (icon preview, color badges)
- System column protection (can edit but not delete)
**Features Implemented:**
- ✅ Rule-based automation system
- ✅ 8 trigger types (task status, time logged, deadlines, etc.)
- ✅ 8 action types (log time, notifications, status updates, etc.)
- ✅ Template variable resolution ({{task.name}})
- ✅ Execution logging and history
- ✅ Priority-based rule execution
- ✅ REST API endpoints
### 5. ✅ API Endpoints
- REST API for column management
- JSON response for frontend integration
- Reordering API with position updates
**Next Steps:**
1. Run migration: `flask db upgrade`
2. Register workflow routes in `app/__init__.py`
3. Create UI templates for workflow builder
4. Integrate workflow triggers into existing code:
- Call `WorkflowEngine.trigger_event()` when tasks change status
- Call `WorkflowEngine.trigger_event()` when time entries are created
- Add triggers for deadlines and budget thresholds
## Files Created
**Integration Points:**
```python
# In task status change handler:
from app.services.workflow_engine import WorkflowEngine
### Models
- `app/models/kanban_column.py` - KanbanColumn model with all business logic
### Routes
- `app/routes/kanban.py` - Complete CRUD routes for kanban column management
### Templates
- `app/templates/kanban/columns.html` - Column management page with drag-and-drop
- `app/templates/kanban/create_column.html` - Create new column form
- `app/templates/kanban/edit_column.html` - Edit existing column form
### Migrations
- `migrations/migration_019_kanban_columns.py` - Database schema migration
### Documentation
- `KANBAN_CUSTOMIZATION.md` - Comprehensive feature documentation
- `IMPLEMENTATION_SUMMARY.md` - This file
- UI polish: Task create/edit pages tips redesigned; unified dark-mode handling for editor
## Files Modified
### Models
- `app/models/__init__.py` - Added KanbanColumn import
- `app/models/task.py` - Updated `status_display` to use dynamic columns
### Routes
- `app/routes/tasks.py` - Updated status validation to use KanbanColumn
- `app/routes/projects.py` - Pass kanban_columns to templates
- `app/__init__.py` - Register kanban blueprint
### Templates
- `app/templates/tasks/_kanban.html` - Load columns dynamically from database
### Application Startup
- `app.py` - Initialize default columns on startup
## Technical Architecture
### Database Schema
```sql
CREATE TABLE kanban_columns (
id INTEGER PRIMARY KEY,
key VARCHAR(50) UNIQUE NOT NULL,
label VARCHAR(100) NOT NULL,
icon VARCHAR(100) DEFAULT 'fas fa-circle',
color VARCHAR(50) DEFAULT 'secondary',
position INTEGER DEFAULT 0,
is_active BOOLEAN DEFAULT 1,
is_system BOOLEAN DEFAULT 0,
is_complete_state BOOLEAN DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
WorkflowEngine.trigger_event('task_status_change', {
'data': {
'task_id': task.id,
'old_status': old_status,
'new_status': task.status,
'task': task.to_dict(),
'user_id': current_user.id
}
})
```
### Model Methods
- `get_active_columns()` - Retrieve all active columns ordered by position
- `get_all_columns()` - Retrieve all columns including inactive
- `get_column_by_key(key)` - Find column by unique key
- `get_valid_status_keys()` - Get list of valid status keys for validation
- `initialize_default_columns()` - Create default columns if none exist
- `reorder_columns(column_ids)` - Update column positions
### 3. Google Calendar Integration ✅
**Status:** Complete
**Files:**
- `app/integrations/google_calendar.py` - Full Google Calendar connector
- Updated `app/integrations/registry.py` - Registered connector
### Routes Structure
- `GET /kanban/columns` - List all columns (admin only)
- `GET /kanban/columns/create` - Create column form (admin only)
- `POST /kanban/columns/create` - Create new column (admin only)
- `GET /kanban/columns/<id>/edit` - Edit column form (admin only)
- `POST /kanban/columns/<id>/edit` - Update column (admin only)
- `POST /kanban/columns/<id>/delete` - Delete column (admin only)
- `POST /kanban/columns/<id>/toggle` - Toggle active status (admin only)
- `POST /api/kanban/columns/reorder` - Reorder columns (admin only)
- `GET /api/kanban/columns` - Get active columns (all users)
**Features Implemented:**
- ✅ OAuth 2.0 authentication
- ✅ Two-way calendar sync
- ✅ Time entry to calendar event conversion
- ✅ Calendar event updates
- ✅ Multiple calendar support
- ✅ Configurable sync direction
### Security Features
- Admin-only access to column management
- CSRF protection on all forms
- Validation to prevent deletion of columns with tasks
- Protection of system columns from deletion
- Input sanitization and validation
**Next Steps:**
1. Configure Google OAuth credentials in settings
2. Update calendar routes to use new connector
3. Add sync scheduling (background jobs)
4. Test OAuth flow
## Default Configuration
**Configuration Required:**
```env
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
```
### System Columns (Cannot be deleted)
1. **To Do** (`todo`)
- Icon: fas fa-list-check
- Color: secondary (gray)
- Position: 0
2. **In Progress** (`in_progress`)
- Icon: fas fa-spinner
- Color: warning (yellow)
- Position: 1
3. **Done** (`done`)
- Icon: fas fa-check-circle
- Color: success (green)
- Position: 3
- Marks tasks as complete: Yes
## 📋 Remaining Features (Prioritized)
### Custom Columns (Can be deleted)
4. **Review** (`review`)
- Icon: fas fa-user-check
- Color: info (cyan)
- Position: 2
### High Priority
1. **Asana Integration** - Similar to Google Calendar connector
2. **Trello Integration** - Similar pattern
3. **QuickBooks Integration** - More complex, requires QuickBooks API
4. **Time Approval Workflow** - Manager approval system
5. **Client Approval Workflow** - Client-side approval
## Usage Instructions
### Medium Priority
6. **Custom Report Builder** - Drag-and-drop UI component
7. **PowerPoint Export** - Use python-pptx library
8. **Team Chat** - Real-time messaging system
9. **Activity Feed UI** - Display Activity model data
10. **@Mentions UI** - Enhance existing comments
### For Administrators
### Lower Priority
11. **AI Features** - Requires ML/AI service integration
12. **Gamification** - Badges and leaderboards
13. **Expense OCR Enhancement** - Improve pytesseract usage
14. **GPS Tracking** - Browser geolocation API
15. **Recurring Tasks** - Similar to recurring invoices
16. **Currency Auto-Conversion** - Exchange rate API integration
1. **Access Column Management**
- Navigate to any kanban board
- Click "Manage Columns" button (visible to admins only)
- Or visit `/kanban/columns` directly
## 🚀 Quick Start Guide
2. **Create New Column**
- Click "Add Column"
- Enter label (e.g., "Blocked", "Testing", "Deployed")
- Optionally customize icon, color
- Check "Mark as Complete State" if this column completes tasks
- Submit form
### 1. Run Migrations
```bash
flask db upgrade
```
3. **Edit Column**
- Click edit icon next to any column
- Modify label, icon, color, or behavior
- Save changes
### 2. Register Workflow Routes
Add to `app/__init__.py`:
```python
from app.routes.workflows import workflows_bp
app.register_blueprint(workflows_bp)
```
4. **Reorder Columns**
- Drag columns using the grip icon (≡)
- Drop in desired position
- Order saves automatically
### 3. Add Offline Sync to Templates
Add to `app/templates/base.html`:
```html
<script src="{{ url_for('static', filename='offline-sync.js') }}"></script>
<div id="offline-indicator" class="hidden"></div>
```
5. **Toggle Column Visibility**
- Click eye icon to activate/deactivate
- Inactive columns hidden from kanban board
### 4. Integrate Workflow Triggers
Add workflow triggers to key events:
- Task status changes
- Time entry creation
- Invoice creation/payment
- Budget threshold reached
6. **Delete Custom Column**
- Only possible if no tasks use that status
- System columns cannot be deleted
- Click delete icon and confirm
## 📝 Notes
### For Regular Users
- All implementations follow existing codebase patterns
- Database migrations are ready to run
- Integration framework is extensible
- Service layer pattern is maintained
- Error handling and logging included
- Kanban board automatically shows configured columns
- Drag and drop tasks between columns
- Task status updates automatically
- No configuration needed
## 🔄 Next Session Priorities
## Testing Checklist
1. Complete UI templates for workflows
2. Integrate workflow triggers
3. Add Asana/Trello integrations
4. Implement time approval workflow
5. Create custom report builder
To verify the implementation:
- [ ] Database table created successfully
- [ ] Default columns initialized
- [ ] Admin can access `/kanban/columns`
- [ ] Can create new custom column
- [ ] Can edit existing column
- [ ] Can reorder columns via drag-and-drop
- [ ] Can toggle column active/inactive
- [ ] Cannot delete system columns
- [ ] Cannot delete columns with tasks
- [ ] Kanban board loads custom columns
- [ ] Tasks can be dragged between custom columns
- [ ] Task status updates correctly
- [ ] Complete state columns mark tasks as done
- [ ] Non-admin users cannot access column management
## Migration Instructions
To apply this feature to an existing installation:
1. **Backup Database**
```bash
# Create backup before migration
cp timetracker.db timetracker.db.backup
```
2. **Run Migration**
```bash
cd /path/to/TimeTracker
python migrations/migration_019_kanban_columns.py
```
Or through the application:
- Restart the application
- Default columns will be created automatically on startup
3. **Verify Installation**
- Log in as admin
- Navigate to `/kanban/columns`
- Verify 4 default columns exist
- Try creating a test column
## Backward Compatibility
- ✅ Existing tasks with old statuses continue to work
- ✅ Old status values ('todo', 'in_progress', 'review', 'done') still valid
- ✅ Status display falls back to hardcoded labels if column not found
- ✅ No data migration needed for existing tasks
- ✅ Default columns match previous behavior
## Performance Considerations
- Columns are cached in memory for each request
- Database queries optimized with proper indexing
- Column count expected to be small (<20 columns)
- Minimal impact on page load times
- Drag-and-drop uses client-side library (SortableJS)
## Future Enhancement Opportunities
1. **Per-Project Columns** - Different columns for different projects
2. **Column Templates** - Pre-defined workflows (Scrum, Kanban, Custom)
3. **Column Automation** - Auto-transitions based on rules
4. **Custom Colors** - Support for hex color codes
5. **Column Analytics** - Time spent in each column
6. **Swimlanes** - Horizontal grouping with custom columns
7. **Bulk Operations** - Move multiple tasks at once
8. **Column Limits** - WIP limits per column
## Known Limitations
1. **Global Columns** - All projects share the same columns
2. **Manual Migration** - Migration must be run manually
3. **No History** - Column changes not tracked in audit log
4. **Single Language** - Column labels not localized (yet)
## Dependencies
- **SortableJS** (v1.15.0) - For drag-and-drop functionality (CDN)
- **Bootstrap 5** - For UI components
- **Font Awesome** - For icons
- **Flask-Login** - For admin authentication
- **SQLAlchemy** - For database ORM
## Rollback Plan
If issues arise, rollback by:
1. Remove blueprint registration from `app/__init__.py`
2. Remove import from `app/models/__init__.py`
3. Revert changes to `app/models/task.py`
4. Revert changes to `app/routes/tasks.py`
5. Run migration downgrade (drops kanban_columns table)
6. Restart application
## Support and Maintenance
- All code follows existing project patterns
- Comprehensive error handling included
- Admin-only access prevents user confusion
- System columns prevent accidental data loss
- Validation prevents orphaned task statuses
## Conclusion
The custom kanban column feature is fully implemented and ready for testing. It provides flexible workflow management while maintaining backward compatibility and data integrity. The feature follows the project's coding standards and integrates seamlessly with the existing task management system.
### Next Steps for User
1. Test the migration
2. Verify column management interface
3. Create custom columns as needed
4. Customize icons and colors to match workflow
5. Train users on new flexibility
All TODOs completed successfully! ✅
---
**Total Features Implemented:** 3/24
**Foundation Complete:**
**Ready for UI Development:**

21
docs/reports/README.md Normal file
View File

@@ -0,0 +1,21 @@
# Reports & Analysis
Reports, summaries, and analysis documents for TimeTracker.
## 📊 Available Reports
- **[All Bugfixes Summary](ALL_BUGFIXES_SUMMARY.md)** - Complete list of bugfixes
- **[i18n Audit Report](i18n_audit_report.md)** - Internationalization audit results
- **[Translation Analysis Report](TRANSLATION_ANALYSIS_REPORT.md)** - Translation system analysis
## 📝 Report Types
This directory contains:
- **Bugfix summaries** - Historical bugfix documentation
- **Audit reports** - System audits and analysis
- **Analysis reports** - Feature and system analysis
## 📚 Related Documentation
- **[Main Documentation Index](../README.md)** - Complete documentation overview
- **[Implementation Notes](../implementation-notes/)** - Development notes and summaries