{"id":20619388,"url":"https://github.com/danielace1/url-shortening-app","last_synced_at":"2026-04-23T09:32:55.001Z","repository":{"id":246949813,"uuid":"824538752","full_name":"danielace1/url-shortening-app","owner":"danielace1","description":"A simple react project to shorten URL using rapid API ","archived":false,"fork":false,"pushed_at":"2024-07-28T12:25:10.000Z","size":890,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T05:08:35.812Z","etag":null,"topics":["axios","rapidapi","react-hook-form","reactjs","tailwindcss","usecontext-hook"],"latest_commit_sha":null,"homepage":"https://url-shortening-app-livid.vercel.app","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/danielace1.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}},"created_at":"2024-07-05T10:49:08.000Z","updated_at":"2024-08-06T18:56:30.000Z","dependencies_parsed_at":"2024-11-20T11:02:15.003Z","dependency_job_id":null,"html_url":"https://github.com/danielace1/url-shortening-app","commit_stats":null,"previous_names":["danielace1/url-shortening-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielace1%2Furl-shortening-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielace1%2Furl-shortening-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielace1%2Furl-shortening-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielace1%2Furl-shortening-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielace1","download_url":"https://codeload.github.com/danielace1/url-shortening-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242277652,"owners_count":20101536,"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":["axios","rapidapi","react-hook-form","reactjs","tailwindcss","usecontext-hook"],"created_at":"2024-11-16T12:11:35.240Z","updated_at":"2026-04-23T09:32:54.971Z","avatar_url":"https://github.com/danielace1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shortly - URL Shortening App\n\nThis is a solution to the [Shortly URL shortening API Challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/url-shortening-api-landing-page-2ce3ob-G). 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- [Acknowledgments](#acknowledgments)\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- Shorten any valid URL\n- See a list of their shortened links, even after refreshing the browser\n- Copy the shortened link to their clipboard in a single click\n- Receive an error message when the `form` is submitted if:\n  - The `input` field is empty\n\n### Screenshot\n\n![Screenshot](./public/screenshot/shortly.png)\n\n### Links\n\n- Solution URL : [Solution URL](https://github.com/danielace1/url-shortening-app)\n- Live Site URL : [Live Link](https://url-shortening-app-livid.vercel.app/)\n\n### Built with\n\n- Semantic HTML5 markup\n- CSS custom properties\n- Flexbox\n- CSS Grid\n- Mobile-first workflow\n- [React](https://reactjs.org/) - JS library\n- [React Hook Form](https://react-hook-form.com/) - For handling form state\n- [TailwindCSS](https://tailwindcss.com/) - For styles\n- [RapidAPI](https://rapidapi.com/) - For accessing the URL shortening API\n\n### What I learned\n\nWhile working on this project, I learned several key concepts and techniques:\n\n1. **State Management with React Hooks**: Managing state with `useState` and `useEffect` to handle form inputs and local storage was essential for this project. Ensuring that the list of shortened URLs persisted across page refreshes provided a practical use case for local storage in a React application.\n\n2. **Form Handling with React Hook Form**: Using React Hook Form made it easier to manage form state and validation. Integrating Zod for schema validation provided a seamless way to ensure URLs were correctly formatted before submission.\n\n3. **Asynchronous API Requests with Axios**: Handling asynchronous API requests to the URL shortening service with Axios taught me how to effectively manage promise-based requests and error handling in React.\n\n4. **Copying to Clipboard**: Implementing the functionality to copy shortened URLs to the clipboard with a single click required understanding how to interact with the browser's clipboard API.\n\nHere's a snippet of code I'm particularly proud of:\n\n```js\nconst clipboard = (url) =\u003e {\n  navigator.clipboard.writeText(url);\n  setCopy(true);\n  setClicked(true);\n  setTimeout(() =\u003e setCopy(\"Copy\"), 2000);\n};\n```\n\n### Continued development\n\nIn future projects, I plan to focus on:\n\nEnhancing user experience with more interactive UI elements.\nImplementing more robust error handling and user feedback mechanisms.\nExploring additional React libraries to further streamline state management and API interactions\n\n### Useful resources\n\n- [React documentation](https://reactjs.org/) - This helped me understand the fundamentals of React.\n- [React Hook Form documentation](https://react-hook-form.com/) This is an amazing resource for handling form state in React.\n- [TailwindCSS documentation](https://tailwindcss.com/) - This helped me with utility-first CSS for rapid UI development.\n- [RapidAPI documentation](https://rapidapi.com/) - This helped me integrate the URL shortening API easily.\n\n### Author\n\n- [Sudharsan](https://www.facebook.com/sudharsandaniel01)\n\n### Acknowledgments\n\nI'd like to thank the Frontend Mentor community for providing valuable feedback and inspiration throughout this challenge.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielace1%2Furl-shortening-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielace1%2Furl-shortening-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielace1%2Furl-shortening-app/lists"}