{"id":27933164,"url":"https://github.com/yashrajbharti/time-tracker","last_synced_at":"2026-04-25T23:37:22.785Z","repository":{"id":291606980,"uuid":"972659158","full_name":"yashrajbharti/Time-Tracker","owner":"yashrajbharti","description":"Insightful like App build using PWA and powered by web components.","archived":false,"fork":false,"pushed_at":"2025-05-05T15:23:53.000Z","size":11045,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T16:44:11.430Z","etag":null,"topics":["css5","html","js","pwa","tool","web-components"],"latest_commit_sha":null,"homepage":"https://yashrajbharti.github.io/Time-Tracker/localapp","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yashrajbharti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-04-25T12:50:04.000Z","updated_at":"2025-05-05T15:23:56.000Z","dependencies_parsed_at":"2025-05-05T16:55:31.514Z","dependency_job_id":null,"html_url":"https://github.com/yashrajbharti/Time-Tracker","commit_stats":null,"previous_names":["yashrajbharti/time-tracker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrajbharti%2FTime-Tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrajbharti%2FTime-Tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrajbharti%2FTime-Tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrajbharti%2FTime-Tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yashrajbharti","download_url":"https://codeload.github.com/yashrajbharti/Time-Tracker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252812633,"owners_count":21808175,"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","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":["css5","html","js","pwa","tool","web-components"],"created_at":"2025-05-07T04:27:39.912Z","updated_at":"2026-04-25T23:37:22.780Z","avatar_url":"https://github.com/yashrajbharti.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mercury - Time Tracking System\n\n\u003cimg src=\"./localapp/icons/mercury.svg\" alt=\"Mercury logo\" width=\"200px\" height=\"auto\"\u003e\n\nMercury is a time tracking platform built with:\n- Node.js + Express backend\n- Admin Web Application (Web Components)\n- Local Installable Employee PWA (Web Components)\n\n---\n\n## Project Structure\n\n| Folder | Description |\n|--------|-------------|\n| `/backend` | Node.js Express API server |\n| `/webapp` | Admin web app to manage employees, projects, and tasks |\n| `/localapp` | Employee PWA for time tracking and screenshots |\n\n---\n\n## Backend - Express API (these are some of the many APIs)\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| POST | `/admin/login` | Authenticate admin user |\n| POST | `/invite/send` | Send invite email to employee |\n| GET | `/employee` | Fetch all employees (optional select fields) |\n| POST | `/employee` | Add new employee |\n| GET | `/employee/:id` | Fetch employee by ID |\n| POST | `/employee/login` | Employee login (accept invitation) |\n| GET | `/project` | Fetch all projects |\n| POST | `/project` | Create a new project |\n| GET | `/project/:id` | Fetch project by ID |\n| POST | `/task` | Create a new task |\n| GET | `/task/:id` | Fetch task by ID |\n| GET | `/task` | Fetch all tasks |\n| POST | `/analytics/window` | Post time tracking entry (with background info) |\n| POST | `/analytics/project-time` | Post or update total project time |\n| GET | `/analytics/project-time` | Get project time records (filter by employeeId/projectId) |\n| POST | `/screenshot` | Post screenshot metadata |\n| GET | `/screenshot` | Get screenshots (filter by employeeId/projectId) |\n| POST | `/upload` | Upload screenshot image |\n| GET | `/auth/validate` | Validate current token for admin or employee |\n\n---\n\n## Admin Web App\n\nThe Admin Web App provides functionality to:\n- Login as Admin\n- Add employees, projects, tasks\n- View and manage employees and projects\n- Send email invitations to employees\n- View time logs and screenshots\n\nBuilt using Web Components (framework independent and using web standards, compatible with any framework).\n\n---\n\n## Local App (PWA for Employees)\n\nThe Local App (PWA) allows employees to:\n- Accept invitations from email link\n- Install the app on desktop Chrome\n- Clock in and out\n- Auto-log time sessions and screenshots\n- Work offline (Progressive Web App)\n\nBuilt using Web Components and optimized for `display-mode: standalone`.\n\n---\n\n## PWA Features\n\n| Feature | Status |\n|---------|--------|\n| Manifest.json | Included |\n| Service Worker | Included (basic offline caching) |\n| Installation Prompt | Guided setup |\n| Works Offline | Yes |\n| Native PWA Behavior | Yes |\n\n---\n\n## Getting Started\n\n1. Clone the repository.\n2. Run backend server:\n   ```bash\n   cd backend\n   npm install\n   npm run dev\n   ```\n3. Open the Admin Web App in a browser.\n4. Open the Local App (PWA) to accept employee invites.\n\nMake sure to update `.env` files with mail credentials and JWT secrets before running.\n\n---\n\n## Technologies Used\n\n| Area | Stack |\n|------|-------|\n| Backend | Node.js, Express, Nodemailer |\n| Frontend | HTML5, CSS5, Web Components, Vanilla JS |\n| PWA | Service Worker, Manifest.json, Cache API |\n\n## UI\n\n\u003cimg width=\"350\" height=\"auto\" alt=\"Screenshot Time Tracker\" src=\"https://github.com/user-attachments/assets/7497ab54-7786-496e-b6ee-f2f1a64b058e\" /\u003e\n\n\n---\n\n\u003e [!NOTE] \n\u003e - Admin tokens are securely stored in localStorage after login.\n\u003e - Employees accept invite links and log in through the PWA.\n\u003e - Web Components are used throughout for a modular, framework-free frontend.\n\u003e - Chrome Desktop is the primary supported platform for optimal PWA behavior.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashrajbharti%2Ftime-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashrajbharti%2Ftime-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashrajbharti%2Ftime-tracker/lists"}