{"id":31177877,"url":"https://github.com/waregagbagbo/cs-employee-activity-tracker","last_synced_at":"2026-05-08T19:32:46.957Z","repository":{"id":310739269,"uuid":"1040991040","full_name":"waregagbagbo/CS-Employee-Activity-Tracker","owner":"waregagbagbo","description":"To build a system where customer support agents can log end-of-shift reports and also provide managers with visibility into team activities.","archived":false,"fork":false,"pushed_at":"2025-09-11T21:24:37.000Z","size":307,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-12T00:22:16.558Z","etag":null,"topics":["drf-jwt","markdown","mysql-database","orm-framework","postgresql-database","python","rest-api","webhooks-api"],"latest_commit_sha":null,"homepage":"http://127.0.0.1:8000","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waregagbagbo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-19T20:15:19.000Z","updated_at":"2025-09-11T21:24:41.000Z","dependencies_parsed_at":"2025-08-20T00:27:45.409Z","dependency_job_id":"8cf1015d-3d0f-471f-98fc-9edceb2b6b50","html_url":"https://github.com/waregagbagbo/CS-Employee-Activity-Tracker","commit_stats":null,"previous_names":["waregagbagbo/cs-employee-activity-tracker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/waregagbagbo/CS-Employee-Activity-Tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waregagbagbo%2FCS-Employee-Activity-Tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waregagbagbo%2FCS-Employee-Activity-Tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waregagbagbo%2FCS-Employee-Activity-Tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waregagbagbo%2FCS-Employee-Activity-Tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waregagbagbo","download_url":"https://codeload.github.com/waregagbagbo/CS-Employee-Activity-Tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waregagbagbo%2FCS-Employee-Activity-Tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275952450,"owners_count":25558705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drf-jwt","markdown","mysql-database","orm-framework","postgresql-database","python","rest-api","webhooks-api"],"created_at":"2025-09-19T14:31:49.854Z","updated_at":"2026-05-08T19:32:46.951Z","avatar_url":"https://github.com/waregagbagbo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Employee Activity Tracker for Customer Support \n\nA Django-based system for customer support teams to log end-of-shift reports and provide managers/supervisors with real-time visibility into team activities and performance.\n\n## Project Structure\n- `accounts/` – Custom user model and auth logic\n- `shifts/` – Shift tracking and webhook triggers\n- `reports/` – End-of-shift reporting and approval flow\n\n## 🚀 Quickstart\n\n1. Clone the repo:\n\n   ```bash\n   git clone https://github.com/your-org/employee-activity-tracker.git\n   cd employee-activity-tracker\n\n2. Create a virtual environment and install dependencies:\n   \n   ``` bash\n   Linux\n   python -m venv env\n   source env/bin/activate\n   \n\n   Windows\n   python -m venv env\n   venv\\Scripts\\activate\n\n3. Install dependencies\n\n   ``` bash\n   pip install -r requirements.txt\n\n4. Set up .env and run migrations:\n\n   ``` bash\n   python manage.py makemigrations  - schema version control\n   python manage.py migrate - Applies changes\n\n5. Run the server:\n\n   ``` bash\n    python manage.py runserver\n\n\n## API Endpoints\n\n### Authentication\n - POST /login/ - User login\n - POST /auth/register - User register\n - POST /auth/logout/ - User logout\n - POST /api/auth/refresh/ - Refresh JWT token. Also updates session-based auth tokens for compatibility with the accounts app.\n\n### Employee Management (Viewsets)/Generic\n\nUses a custom AbstractUser model with email as the primary identifier. \u003cbr\u003e Signals ensure automatic profile creation and token regeneration on user creation.\n\n - GET /api/employees/ - List employees (paginated)\n - GET /api/employees/{id}/ - Get employee details\n - PUT /api/employees/{id}/ - Update employee profile\n - GET /api/employees/me/ - Fetches the logged user profile\n\n\n### Attendance Management (Viewsets)\n\n\n - GET /api/attendance/ - List attendance of a user (lists)\n - POST /api/attendance/clock_in - new attendance triggered\n - POST /api/attendance/clok_out/ - time out for the user\n - GET /api/attendance/status/ - Authenticated user gets status\n - GET /api/attendance/today - Captures the day's attendance\n\n\n### Shift Management (Viewsets)\n\n\n - GET /api/shifts/ - List shifts (with filters)\n - POST /api/shifts/ - Create new shift\n - GET /api/shifts/{id}/ - Get shift details\n - PUT/PATCH /shifts/{id}/ - Update shift\n - DELETE /shifts/{id}/ - Delete shift\n - GET /shifts/today/ - Today's shifts\n - GET /shifts/upcoming/ - Next 7 days shifts\n - PATCH /shifts/{id}/cancel/ - Cancel shift\n\n### Activity Reports (Viewsets)\n\n - GET /api/reports/ - List reports (with filters)\n - POST /api/reports/ - Submit new report\n - GET /api/reports/{id}/ - Get report details\n - PUT /api/reports/{id}/ - Update report (if not approved)\n - PATCH /api/reports/{id}/approve/ - Approve report (supervisors/managers only)\n - GET /api/reports/export/ - \u003cb\u003e Export reports (CSV)(Future) ONCE VALIDATED with Frontend library\u003c/b\u003e\n\n\n### Webhook Management\n\nWebhooks are triggered on shift status changes (start/end). Implemented using Django signals and dispatched to registered endpoints test(https://webhook.site/). \u003cbr\u003e \nFuture support for multichannel registry.\n\n## Technical Considerations\n\n### Security\n- TokenAuth supported\n- Role-based access control (supervisors, agents,admins)\n- Input validation and permission checks\n- CORS configured for deployment\n\n### Performance\n- Database indexing on frequently queried fields (MySQL)\n- Pagination via DRF’s `PageNumberPagination` setting\n\n### Architecture\n- Modular design using ViewSets, signals, and custom user models.\n- Webhook dispatch system for real-time notifications on shifts and reports. Testing ground (https://webhook.site/#!/view/a66fc247-bafa-41ce-93af-a408e52ea2b3)\n\n\n## Development Environment Setup\n\n### Required Tools\n 1. Python 3.9+\n 2. Django 4.2+\n 3. Django REST Framework\n 5. MySQL 8.0+\n 6. Git\n 7. Code editor (PyCharm)\n 8. Postman for endpoint tests\n 9. React - For Frontend Scaffolding\n\n\n## SAMPLE Results.\n\n#### DRF Login (use case for SessionAuth) http://127.0.0.1:8000/accounts/api/login/\n\n\u003cimg width=\"673\" height=\"281\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6c274122-b485-4be7-bf4e-9ccfa064ba7f\" /\u003e\n\n#### Authentication and permissions required for the view functionality (http://127.0.0.1:8000/cs/shifts/)\n\n\u003cimg width=\"653\" height=\"181\" alt=\"image\" src=\"https://github.com/user-attachments/assets/579fc4c1-8791-44ba-b199-575ee414d39f\" /\u003e\n\n#### Token Auth in operation\n\n\u003cimg width=\"648\" height=\"302\" alt=\"image\" src=\"https://github.com/user-attachments/assets/104d2465-05d3-4bc0-bf1b-19c98a2d4c26\" /\u003e\n\u003cbr\u003e\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaregagbagbo%2Fcs-employee-activity-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaregagbagbo%2Fcs-employee-activity-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaregagbagbo%2Fcs-employee-activity-tracker/lists"}