{"id":28718103,"url":"https://github.com/aymansoliman-dev/time-tracking-dashboard","last_synced_at":"2026-04-30T00:03:58.024Z","repository":{"id":285040787,"uuid":"949647593","full_name":"aymansoliman-dev/time-tracking-dashboard","owner":"aymansoliman-dev","description":"Frontend Mentor - Time tracking dashboard solution","archived":false,"fork":false,"pushed_at":"2025-05-27T15:05:18.000Z","size":1674,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-11T14:56:30.638Z","etag":null,"topics":["asynchronous","fetch","javascript","json","mobile-first-workflow","objects","responsive-layout"],"latest_commit_sha":null,"homepage":"https://aymansoliman-dev.github.io/time-tracking-dashboard/","language":"CSS","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/aymansoliman-dev.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}},"created_at":"2025-03-16T22:39:25.000Z","updated_at":"2025-05-27T15:05:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d16d5bb-e152-451f-a882-3452b8a27882","html_url":"https://github.com/aymansoliman-dev/time-tracking-dashboard","commit_stats":null,"previous_names":["ayman-soliman-1783/time-tracking-dashboard","aymansoliman-dev/time-tracking-dashboard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aymansoliman-dev/time-tracking-dashboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymansoliman-dev%2Ftime-tracking-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymansoliman-dev%2Ftime-tracking-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymansoliman-dev%2Ftime-tracking-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymansoliman-dev%2Ftime-tracking-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aymansoliman-dev","download_url":"https://codeload.github.com/aymansoliman-dev/time-tracking-dashboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymansoliman-dev%2Ftime-tracking-dashboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32448883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["asynchronous","fetch","javascript","json","mobile-first-workflow","objects","responsive-layout"],"created_at":"2025-06-15T04:10:13.532Z","updated_at":"2026-04-30T00:03:58.004Z","avatar_url":"https://github.com/aymansoliman-dev.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frontend Mentor - Time tracking dashboard solution\n\nThis is a solution to the [Time tracking dashboard challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/time-tracking-dashboard-UIQ7167Jw). Frontend Mentor challenges help you improve your coding skills by building realistic projects.\n\n## Table of contents\n\n- [Overview](#overview)\n  - [The challenge](#the-challenge)\n  - [Screenshot](#screenshot)\n  - [Links](#links)\n- [My process](#my-process)\n  - [Built with](#built-with)\n  - [What I learned](#what-i-learned)\n  - [Continued development](#continued-development)\n  - [Useful resources](#useful-resources)\n- [Author](#author)\n\n## Overview\n\n### The challenge\n\nUsers should be able to:\n\n- View the optimal layout for the site depending on their device's screen size\n- See hover states for all interactive elements on the page\n- Switch between viewing Daily, Weekly, and Monthly stats\n\n### Screenshot\n\n![Desktop Design Screenshot](images/desktop-design-screenshot.jpeg)\n\n##\n\n![Smaller Screens Screenshot](images/smaller-screens-screenshot.png)\n\n### Links\n\n- Solution URL: [Challenge Solution](https://www.frontendmentor.io/solutions/time-tracking-dashboard-solution-using-async-js-json-and-dom-aPiGX60ILO)\n- Live Site URL: [Live Preview](https://aymansoliman-dev.github.io/time-tracking-dashboard/)\n\n## My process\n\n### Built with\n\n- Semantic HTML5 markup\n- CSS custom properties\n- Mobile-first workflow\n- Flexbox\n- CSS Grid\n- JavaScript\n- JS DOM Manipulation\n- Asynchronous JavaScript\n\n### What I learned\n\nI learned that asynchronous JavaScript allows me to fetch data from a server without blocking the main thread, ensuring a smooth user experience. I used ```fetch(\"data.json\")``` to retrieve data asynchronously and ```await response.json()``` to convert it into a JavaScript object. I also learned how to handle potential errors using ```try...catch``` to prevent crashes.\nFor object and data manipulation, I learned how to use ```find()``` to search for a specific object in an array and optional chaining (```?.```) to safely access nested properties without errors. Additionally, I used template literals (```${}```) to dynamically update the UI based on fetched data. These techniques helped me efficiently work with structured data and interact with the DOM seamlessly.\n\n```html\n\u003cdiv class=\"time\"\u003e\n  \u003cspan class=\"hours\"\u003e\u003c/span\u003e\n  \u003cspan class=\"previous-hours\"\u003e\u003c/span\u003e\n\u003c/div\u003e\n```\n\n```js\nconst timeTrackingOptions = document.querySelectorAll(\"#time-tracking-options .option\");\nconst timeTrackers = document.querySelectorAll(\".time-tracker\");\n\n\n// Attach event listeners to tracking options\ntimeTrackingOptions.forEach((option) =\u003e {\n  option.addEventListener(\"click\", async () =\u003e {\n    optionType = option.getAttribute(\"data-option\");\n    await updateTimeTrackers(optionType);\n  });\n});\n\n// Fetch and update all time tracker elements\nasync function updateTimeTrackers(optionType) {\n  try {\n    const response = await fetch(\"data.json\");\n    const data = await response.json();\n\n    timeTrackers.forEach((tracker) =\u003e {\n      const category = tracker.getAttribute(\"data-category\");\n      const categoryData = data.find((item) =\u003e item.title === category);\n      \n      const currentHours =\n        categoryData.timeframes?.[optionType]?.current || 0;\n      const previousHours =\n        categoryData.timeframes?.[optionType]?.previous || 0;\n    });\n  } catch (error) {\n    console.error(\"Error fetching time tracking data:\", error);\n  }\n}\n```\n\n### Continued development\n\nI want to continue improving my understanding of asynchronous JavaScript, particularly in handling multiple asynchronous operations efficiently using ```Promise.all()``` and ```async```/```await``` in more complex scenarios. Additionally, I aim to refine my error-handling skills to make my code more resilient.\nFor object and data manipulation, I want to deepen my knowledge of working with nested objects, optimizing data structures, and improving performance when handling large datasets. I also plan to practice using advanced array methods like ```map()```, ```reduce()```, and ```filter()``` to write more efficient and readable code.\nFinally, I want to focus on best practices in DOM manipulation, ensuring I write scalable, maintainable code that minimizes unnecessary re-renders and improves overall performance.\n\n### Useful resources\n\n- [Elzero Web School](https://elzero.org/) - This is an amazing Egyptian web academy that helped me finally understand asynchronous JavaScript and object manipulation. I'd recommend it to anyone still learning these concepts.\n\n## Author\n\n- Website - [Ayman Soliman](https://bento.me/ayman-soliman)\n- Frontend Mentor - [aymansoliman-dev](https://www.frontendmentor.io/profile/aymansoliman-dev)\n- Twitter - [@a_soliman1783](https://x.com/a_soliman1783)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymansoliman-dev%2Ftime-tracking-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faymansoliman-dev%2Ftime-tracking-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymansoliman-dev%2Ftime-tracking-dashboard/lists"}