This project is a simple URL shortener developed with React. It allows users to shorten URLs and store these shortened URLs locally. Additionally, the project follows best practices of clean code and SOLID principles to ensure the code's clarity and maintainability.
- React
- UUID for generating unique identifiers
- LocalStorage for data storage
To run this project locally, follow these steps:
-
Clone the repository:
git clone [REPOSITORY_URL]
-
Navigate to the repository folder:
cd [FOLDER_NAME]
-
Install dependencies:
npm install
-
Start the project:
npm start
- To shorten a URL, enter the desired URL in the input field and click the button to shorten.
- The shortened URLs will be displayed below the input field.
- Click on a shortened URL to open it in a new browser tab.
- The project uses React Hooks for state management.
- Implements a custom hook to encapsulate URL shortening and storage logic.
- Uses the Single Responsibility Principle (SRP) from SOLID to separate URL formatting logic into a utility function.
- URLs are validated and transformed into absolute URLs to ensure correct redirection.
Developed with ❤️ by Jady Rufino