{"id":31206293,"url":"https://github.com/mohammadhasanii/oculustrack","last_synced_at":"2025-09-20T19:33:25.824Z","repository":{"id":312845882,"uuid":"1047510658","full_name":"mohammadhasanii/OculusTrack","owner":"mohammadhasanii","description":"An AI-powered eye-tracking app built with Go and face-api.js to monitor active screen time","archived":false,"fork":false,"pushed_at":"2025-09-02T09:57:24.000Z","size":81203,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-02T11:33:10.068Z","etag":null,"topics":["attention-tracking","computer-vision","eye-tracking","face-api-js","face-recognition","golang","tailwindcss","webcam"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mohammadhasanii.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-30T15:28:11.000Z","updated_at":"2025-09-02T09:57:28.000Z","dependencies_parsed_at":"2025-09-02T11:43:17.219Z","dependency_job_id":null,"html_url":"https://github.com/mohammadhasanii/OculusTrack","commit_stats":null,"previous_names":["mohammadhasanii/oculustrack"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mohammadhasanii/OculusTrack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadhasanii%2FOculusTrack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadhasanii%2FOculusTrack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadhasanii%2FOculusTrack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadhasanii%2FOculusTrack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammadhasanii","download_url":"https://codeload.github.com/mohammadhasanii/OculusTrack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadhasanii%2FOculusTrack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276149656,"owners_count":25593831,"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-20T02:00:10.207Z","response_time":63,"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":["attention-tracking","computer-vision","eye-tracking","face-api-js","face-recognition","golang","tailwindcss","webcam"],"created_at":"2025-09-20T19:31:12.560Z","updated_at":"2025-09-20T19:33:25.818Z","avatar_url":"https://github.com/mohammadhasanii.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OculusTrack \nAn AI-powered web application to track user screen time by analyzing eye gaze with a webcam, built with Go and `face-api.js`.\n\n---\n\n## Live Demo\nThis demo shows the real-time eye tracking and focus detection in action.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/mohammadhasanii/OculusTrack/master/demo.gif\" alt=\"OculusTrack Demo\" width=\"700\"\u003e\n\u003c/p\u003e\n\n---\n\n## ✨ Features\n* **Real-time Eye Tracking:** Uses `face-api.js` to detect facial landmarks and determine if the user is looking at the screen.\n* **Accurate Time Logging:** A Go backend logs the total time the user is actively focused.\n* **Secure Local Server:** Runs on a local HTTPS server with an auto-generated SSL certificate.\n* **Modern UI:** A clean, minimalist interface built with Tailwind CSS, featuring a start/pause control.\n\n---\n\n## 🛠️ Tech Stack\n* **Backend:** Go (Golang)\n* **Frontend:** HTML, Tailwind CSS\n* **AI/ML:** `face-api.js` (TensorFlow.js)\n\n---\n\n## 🚀 Getting Started\nFollow these steps to get the project running on your local machine.\n\n### 1. Clone the Repository\n```bash\ngit clone https://github.com/mohammadhasanii/OculusTrack.git\ncd OculusTrack\n```\n\n### 2. Create Project Files\nCreate the necessary files and folders with the source code provided below:\n- `main.go`\n- `static/index.html`\n- `static/script.js`\n\n### 3. Run the Go Server\nThis command will start the server and automatically generate the required SSL certificate files (`localhost.crt` \u0026 `localhost.key`) on the first run.\n\n```bash\ngo run main.go\n```\n\nThe server will be available at `https://localhost:8443`.\n\n---\n\n## 🔒 Important: Enabling HTTPS for Webcam Access\nModern browsers require a secure `https://` connection to access your webcam for privacy reasons. Since this project uses a self-signed certificate, you must manually instruct your operating system to trust it.\n\n**You only need to do this once.**\n\n### On macOS\n1. After running the server for the first time, find the generated `localhost.crt` file in your project folder.\n2. Open the **Keychain Access** application.\n3. Drag and drop the `localhost.crt` file into the **System** keychain.\n4. Find the \"localhost\" certificate in the list, double-click it.\n5. Expand the **\"Trust\"** section.\n6. Change the **\"When using this certificate\"** dropdown to **\"Always Trust\"**.\n7. Close the window (you may need to enter your password).\n8. Restart your browser completely.\n\n### On Windows\n1. After running the server for the first time, find the generated `localhost.crt` file.\n2. Double-click the `localhost.crt` file.\n3. Click the **\"Install Certificate...\"** button.\n4. Select **\"Current User\"** and click **Next**.\n5. Choose **\"Place all certificates in the following store\"** and click **\"Browse...\"**.\n6. Select the **\"Trusted Root Certification Authorities\"** store and click **OK**.\n7. Click **Next**, then **Finish**. Acknowledge the security warning by clicking **Yes**.\n8. Restart your browser completely.\n\n---\n\n\n---\n\n## 🧠 How It Works\n1. **Face Detection:** The frontend uses `face-api.js` to detect faces and facial landmarks from the webcam feed.\n2. **Gaze Analysis:** The application analyzes eye positions and orientations to determine if the user is looking at the screen.\n3. **Time Tracking:** When eyes are detected as \"focused,\" the system logs active screen time via API calls to the Go backend.\n4. **Real-time Feedback:** The UI provides instant visual feedback showing current focus status and accumulated time.\n\n---\n\n## 💡 Usage\n1. Open your browser and navigate to `https://localhost:8443`\n2. Allow camera permissions when prompted\n3. Click \"Start Tracking\" to begin eye tracking\n4. The system will monitor your focus and display real-time statistics\n5. Use \"Pause/Resume\" to control tracking as needed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadhasanii%2Foculustrack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammadhasanii%2Foculustrack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadhasanii%2Foculustrack/lists"}