A React-based frontend application for a URL shortener service. This project provides a sleek and user-friendly interface for generating and managing short URLs.
- Input long URLs to generate short ones.
- View previously shortened URLs.
- Copy short URLs to the clipboard.
- Responsive design for mobile and desktop users.
- React: JavaScript library for building user interfaces.
- Vite: Fast development server and build tool.
- ESLint: Linting and code style enforcement.
- Node.js: Dependency management with npm.
Ensure you have the following installed:
-
Clone the repository:
git clone <repository-url> cd url-shortener-frontend
-
Install dependencies:
npm install
-
Configure environment variables:
- Create a
.env
file in the root directory (or edit the existing one). - Set the backend API URL or other configuration options as required:
VITE_API_URL=https://your-backend-url.com
- Create a
-
Start the development server:
npm run dev
-
Open your browser and navigate to:
http://localhost:3000
-
Build the project:
npm run build
-
The production-ready files will be in the
dist
directory.
-
Run ESLint:
npm run lint
-
Fix linting issues:
npm run lint:fix
url-shortener-frontend/
├── public/ # Static assets
├── src/ # Application source code
│ ├── components/ # Reusable UI components
│ ├── pages/ # Page-level components
│ ├── services/ # API interaction logic
│ ├── styles/ # Global styles
│ └── main.jsx # Application entry point
├── .env # Environment variables
├── vite.config.js # Vite configuration
└── README.md # Project documentation
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Description of changes"
- Push to your fork and create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to customize this README further as needed!