{"id":18927873,"url":"https://github.com/0xabdulkhaliq/advice-generator","last_synced_at":"2026-05-09T07:06:00.051Z","repository":{"id":253033074,"uuid":"695501898","full_name":"0xabdulkhaliq/advice-generator","owner":"0xabdulkhaliq","description":"This is a solution to the \"Advice generator\" challenge on Frontend Mentor","archived":false,"fork":false,"pushed_at":"2023-11-15T04:03:41.000Z","size":211,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-19T12:45:30.282Z","etag":null,"topics":["css3","es6-modules","html5","javascript","pagespeed-insights","vercel","webpack"],"latest_commit_sha":null,"homepage":"https://advice-generator-0xabdulkhalid.vercel.app/","language":"CSS","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/0xabdulkhaliq.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}},"created_at":"2023-09-23T11:39:07.000Z","updated_at":"2024-05-20T20:45:45.000Z","dependencies_parsed_at":"2024-08-14T03:49:45.677Z","dependency_job_id":null,"html_url":"https://github.com/0xabdulkhaliq/advice-generator","commit_stats":null,"previous_names":["0xabdulkhaliq/advice-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0xabdulkhaliq/advice-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xabdulkhaliq%2Fadvice-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xabdulkhaliq%2Fadvice-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xabdulkhaliq%2Fadvice-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xabdulkhaliq%2Fadvice-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xabdulkhaliq","download_url":"https://codeload.github.com/0xabdulkhaliq/advice-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xabdulkhaliq%2Fadvice-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32810382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["css3","es6-modules","html5","javascript","pagespeed-insights","vercel","webpack"],"created_at":"2024-11-08T11:21:12.524Z","updated_at":"2026-05-09T07:06:00.016Z","avatar_url":"https://github.com/0xabdulkhaliq.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003cimg src=\"https://www.frontendmentor.io/static/images/logo-mobile.svg\" alt=\"frontendmentor\" width=\"80\"\u003e\n\n  \u003ch2 align=\"center\"\u003eAdvice Generator Solution\u003c/h2\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.frontendmentor.io/challenges/advice-generator-app-QdUG-13db\"\u003e\u003cstrong\u003eFrontend Mentor Challenge\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://advice-generator-0xabdulkhalid.vercel.app/\"\u003eView Demo\u003c/a\u003e\n    \u0026nbsp;·\u0026nbsp;\n    \u003ca href=\"https://github.com/0xabdulkhalid/advice-generator/issues\"\u003eReport Bug\u003c/a\u003e\n    \u0026nbsp;·\u0026nbsp;\n    \u003ca href=\"https://github.com/0xabdulkhalid/advice-generator/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003c!-- Badges --\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Profiles --\u003e\n  \u003ca href=\"https://www.frontendmentor.io/profile/0xabdulkhalid\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Profile-0xAbdulKhalid-fefefe?style=for-the-badge\u0026logo=frontendmentor\" alt=\"Abdul Khalid's Profile\"\u003e\n  \u003c/a\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp;\n\n  \u003c!-- Status --\u003e\n  \u003ca href=\"#\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Status-Completed-00CE80?style=for-the-badge\" alt=\"Status Completed\"\u003e\n  \u003c/a\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp;\n\n  \u003c!-- Difficulty --\u003e\n  \u003ca href=\"https://www.frontendmentor.io/challenges?difficulties=1\"  \u003e\n    \u003cimg src=\"https://img.shields.io/badge/Difficulty-Junior-AAC745?style=for-the-badge\u0026logo=frontendmentor\" alt=\"Challenge Difficulty - Junior\"\u003e\n  \u003c/a\u003e\n\n\u003c/div\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## Preview\n\n\u003cdiv align='center'\u003e\n\u003cimg src='./design/cover.webp' alt='Project cover image'\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\n## Links\n\n- |||\n  | :----- | :----- |\n  | Solution URL: | [ADVICE GENERATOR 🎯 [ ASYNC/AWAIT - ES6 MODULES - WEBPACK - 3D DICE ]](https://www.frontendmentor.io/solutions/advice-generator-asyncawait-es6-modules-webpack-3d-dice-kW5sm9EPZa) |\n  | Live Site URL: | [https://advice-generator-0xabdulkhalid.vercel.app/](https://advice-generator-0xabdulkhalid.vercel.app/) |\n  |||\n\n\n\u003cbr\u003e\n\n\n## Pagespeed Insights Score\n  \n- ||\n  | :-----: |\n  |  \u003cb\u003eOverall Score 99.3%, Average of Mobile and Desktop\u003c/b\u003e\u003cbr\u003e[ Mobile devices score is only shown below ] |\n  | |\n  | \u003cimg src='./design/pagespeed-insights-score.svg' alt='Scoreboard'\u003e |\n  | |\n  | Check out [**Pagespeed Insights**](https://pagespeed.web.dev/analysis/https-advice-generator-0xabdulkhalid-vercel-app/ne163fkmse?form_factor=mobile) to get live score |\n  ||\n\n\n\u003cbr\u003e\n\n## The Challenge\n\n- Users should be able to:\n  - View the optimal layout for the app depending on their device's screen size\n  - See hover states for all interactive elements on the page\n  - Generate a new piece of advice by clicking the dice icon\n\n\u003cbr\u003e\n\n\n## Installation\n\nTo set up the Advice Generator Application locally, follow these steps:\n\n1. Clone the GitHub repository to your local machine:\n\n   ```bash\n   git clone https://github.com/0xabdulkhalid/advice-generator.git\n   ```\n\n2. Navigate to the project's directory:\n\n   ```bash\n   cd advice-generator\n   ```\n\n3. Install the project's dependencies using npm:\n\n   ```bash\n   npm install\n   ```\n\n4. Build the project to bundle JavaScript, minify HTML and CSS, and move images:\n\n   ```bash\n   npm run build\n   ```\n5. The build files can be found on `dist` (distribution) directory.\n\n\u003cbr\u003e\n\n## Tags\n\n    ES6 Modules | Webpack Bundling | API Integration | Cross-Browser Compatibility | Responsive Design | Code Formatting Guidelines | Automated Deployment with Vercel   \n\n\u003cbr\u003e\n\n## Learnings / Notes\n\n- Finded a manual way for trigger/invoke click event for button element by creating a new `MouseEvent` object of type `\"click\"` and dispatch it on the button element using the `dispatchEvent` method. \n  - This will simulate a click on the button, and any event listeners attached to it will be triggered as if the button were clicked by the user.\n  - I have implemented this feature for initializing advice feed once the user visits/open the app.\n\n- Learned to create a 3D Dice by using multiple `div` elements for Dice face along with `preserve-3d`.\n  - Each one uses the transform property to rotate or translate the face in 3D space, giving the illusion of a 3D object.\n  - It also applies the dice-spin animation, which presumably spins the dice, the overall result is wonderfull!\n\n\u003cbr\u003e\n\n## Built With\n\n\u003cdiv align=center\u003e\n\n ![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge\u0026logo=html5\u0026logoColor=white) \u0026nbsp;\u0026nbsp;![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=for-the-badge\u0026logo=css3\u0026logoColor=white) \u0026nbsp;\u0026nbsp;![JavaScript](https://img.shields.io/badge/ES6%20Modules%20-%23F7DF1E.svg?style=for-the-badge\u0026logo=javascript\u0026logoColor=black) \u0026nbsp;\u0026nbsp;![Webpack](https://img.shields.io/badge/webpack-%238DD6F9.svg?style=for-the-badge\u0026logo=webpack\u0026logoColor=black) \u0026nbsp;\u0026nbsp;![html-minifier](https://img.shields.io/badge/html%20minifier-A90533?style=for-the-badge\u0026logo=html5\u0026logoColor=white) \u0026nbsp;\u0026nbsp;![CSS3](https://img.shields.io/badge/css_minifier-2C2D72.svg?style=for-the-badge\u0026logo=css3\u0026logoColor=white)\n\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n## Tools Used\n\n\u003cdiv align=center\u003e\n  \n![NPM](https://img.shields.io/badge/npm-CB3837?style=for-the-badge\u0026logo=npm\u0026logoColor=white) \u0026nbsp;\u0026nbsp;![Google](https://img.shields.io/badge/google-DA4437?style=for-the-badge\u0026logo=google\u0026logoColor=white) \u0026nbsp;\u0026nbsp;![Prettier](https://img.shields.io/badge/prettier-1A2C34?style=for-the-badge\u0026logo=prettier\u0026logoColor=F7BA3E) \u0026nbsp;\u0026nbsp;![Eslint](https://img.shields.io/badge/eslint-3A33D1?style=for-the-badge\u0026logo=eslint\u0026logoColor=white) \u0026nbsp;\u0026nbsp;![Visual Studio Code](https://img.shields.io/badge/VS%20Code-0078d7.svg?style=for-the-badge\u0026logo=visual-studio-code\u0026logoColor=white) \u0026nbsp;\u0026nbsp;![Git](https://img.shields.io/badge/Git-F05032?style=for-the-badge\u0026logo=git\u0026logoColor=white)\n\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\n## Acknowledgment\n\n- Challenge was provided by [Frontend Mentor](https://www.frontendmentor.io)\n\n\u003cbr\u003e\n\n## Let's Connect 👋\n\n\u003cdiv align=center\u003e\n\n  \u003ca href=\"https://linkedin.com/in/0xabdulkhalid\" \u003e\n    \u003cimg src=\"https://img.shields.io/badge/linkedin%20Profile-%2300acee.svg?color=405DE6\u0026style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\" alt=\"Linkedin Profile\"\u003e\n  \u003c/a\u003e\u0026nbsp;\n\n  \u003ca href=\"mailto:0xabdulkhalid@gmail.com\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/gmail-%23EA4335.svg?style=for-the-badge\u0026logo=gmail\u0026logoColor=white\" alt=mail/\u003e\n  \u003c/a\u003e\u0026nbsp;\n\n  \u003ca href=\"https://www.frontendmentor.io/profile/0xabdulkhalid\" \u003e\n    \u003cimg src=\"https://img.shields.io/badge/FEM%20Profile-f8f9f8?style=for-the-badge\u0026logo=Frontend-Mentor\u0026logoColor=black\" alt=\"Frontend-Mentor Profile\"\u003e\n  \u003c/a\u003e \u0026nbsp;\n  \n  \u003ca href=\"https://www.github.com/0xabdulkhalid/\" \u003e\n    \u003cimg src=\"https://img.shields.io/badge/Github%20Profile-131313?style=for-the-badge\u0026logo=github\u0026logoColor=white\" alt=\"Github Profile\"\u003e\n  \u003c/a\u003e\n\n\u003c/div\u003e\n\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xabdulkhaliq%2Fadvice-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xabdulkhaliq%2Fadvice-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xabdulkhaliq%2Fadvice-generator/lists"}