Trackr is a comprehensive, production-ready Django web application designed for task management, project tracking, employee attendance, and leave management. It serves as an all-in-one portal for organizations to track productivity, process approvals, calculate comp-off credits, and monitor team performance metrics.
- 🔒 Authentication & Employee Directory: Robust signup/login with roles (MD, Admins, Employees) and profile picture uploads.
- 📋 Task & Timesheet Management:
- Create, edit, delete, and track tasks with status (In Progress, Completed, Paused).
- Log working hours, estimate benchmarks, and submit timesheets.
- 🗂 Project Tracking: Assign distinct scopes, check deliverables, and update project status.
- 📅 Attendance & Compensatory Leaves (Comp-Off):
- Record daily punch-in, punch-out, and break times.
- Interactive monthly attendance calendar.
- Auto-calculation of compensated worktime with MD approval flows for compensatory leaves.
- 🏖 Leave & Holiday Management:
- Submit leave applications and monitor approval queues.
- Holiday calendars and team holiday listings.
- 🧑🤝🧑 Team Dashboards & Rankings:
- Rank teams based on KPIs (Speed of execution, Quality of work, Task ownership).
- Interactive charts and team rankings.
- 📊 Reports & Exporting: Export project summary reports directly to Excel spreadsheet sheets.
- 📬 Notifications: System-wide notifications for task assignments and status updates.
- Framework: Django (Python 3.12+)
- Databases: MySQL (Production) and SQLite (Local Development)
- Libraries:
openpyxl(Excel reporting)python-dotenv(Environment configuration)celery&redis(Background task queue)
Trackr is equipped with a dynamic database fallback system. By default, if MySQL configuration is not detected in environment variables, the application will automatically fall back to the local SQLite database (db.sqlite3), allowing developers to run and test the project instantly.
Create a .env file in the project root directory:
# Database Configuration (Optional - Defaults to SQLite if not provided)
DB_ENGINE=mysql
DB_NAME=tasktracker
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_HOST=localhost
DB_PORT=3306
# Email Settings for Alerts (Optional)
EMAIL_HOST_USER=your_email@gmail.com
EMAIL_HOST_PASSWORD=your_app_passwordMake sure Python 3.12+ is installed on your machine.
pip install -r requirements.txtGenerate migrations for the tracker app and apply them:
python manage.py makemigrations tracker
python manage.py migratepython manage.py runserverVisit the application at http://127.0.0.1:8000/.
├── manage.py # Django project entrypoint
├── db.sqlite3 # SQLite Database (for local dev)
├── requirements.txt # Python package requirements
├── task_tracker/ # Project Configuration
│ ├── settings.py # Project Settings (Dotenv integration & DB fallbacks)
│ └── urls.py # Root Routing Configuration
└── tracker/ # Main Application Code
├── models.py # Database Models
├── views.py # Application Logic & API Endpoints
├── urls.py # Tracker app routing
├── forms.py # Form Definitions (with dynamic choice binding)
└── templates/ # HTML Templates
To make the application ready for production environments, the following enhancements have been implemented:
- Hashed Passwords: New employee passwords are automatically hashed using Django's default PBKDF2 hashing mechanism.
- Legacy Compatibility: A fallback mechanism checks passwords against legacy plain text values and automatically migrates/hashes them upon successful sign-in.
- Bulk Migration Command: To proactively migrate all plain text passwords in the database to secure hashes, run:
python manage.py hash_legacy_passwords
We now load critical configurations from a .env file instead of hardcoding them in settings.py:
SECRET_KEY: Django cryptographic signing key.DEBUG: Controls development debug pages (set toFalsein production).ALLOWED_HOSTS: List of domains/IPs allowed to access the app.DB_ENGINE,DB_NAME,DB_USER,DB_PASSWORD,DB_HOST,DB_PORT: Database connection details.EMAIL_HOST_USER,EMAIL_HOST_PASSWORD: SMTP email credentials for system notifications.
A template .env.example file is provided in the project root.
We serve compressed and cached static files directly via Python using WhiteNoise, removing the dependency on external web servers for static files.
To compile static assets for production:
python manage.py collectstatic --noinputThe following security middleware headers have been configured in settings.py to prevent typical exploits:
SECURE_BROWSER_XSS_FILTER(Cross-Site Scripting protection)SECURE_CONTENT_TYPE_NOSNIFF(MIME sniffing prevention)X_FRAME_OPTIONS = 'DENY'(Clickjacking protection)SESSION_COOKIE_SECURE&CSRF_COOKIE_SECURE(Transmit session/CSRF cookies over HTTPS only)
We completely eliminated the thread-unsafe global variable global_user_data in views.py that caused multi-user session bleeding, replacing it with Django's standard session engine (request.session).