Reduce is a URL shortening service that allows users to easily shorten long URLs for easy access and sharing. This repository contains both the backend and frontend code for the Reduce application.
- URL shortening: Convert long URLs into short, easy-to-share URLs.
- Automatic URL retrieval: Easily retrieve the original long URL using the short URL.
- Unique ID generation: Each shortened URL is given a unique, randomly generated ID.
- Responsive UI: User-friendly interface with React, Tailwind CSS, and MUI components.
- Backend: Go, Echo, GORM
- Frontend: React, Axios, Tailwind CSS, MUI
- Database: PostgreSQL
- Containerization: Docker, Docker Compose
- Docker and Docker Compose installed
- Node.js and npm installed
-
Ensure the environment variables are set:
DB_HOST=host DB_PORT=port DB_USER=user DB_NAME=name DB_PASSWORD=password BASE_URL=url
-
Build and run the backend using Docker Compose:
docker-compose up --build
-
Navigate to the frontend directory:
cd frontend
-
Create a
.env.local
file with the following variable:NEXT_PUBLIC_BACKEND_URL=http://localhost:8080
-
Install the dependencies and run the frontend:
npm install npm run dev
- Open your browser and navigate to
http://localhost:3000
. - Enter the long URL you want to shorten and click the "Reduce" button.
- Copy the shortened URL and share it as needed.
Thank you for considering contributing to Reduce! We welcome your contributions. Whether it's fixing bugs, adding features, or improving documentation, your help is appreciated. Feel free to report issues or submit pull requests.
This project is licensed under the MIT License. See the LICENSE file for more details.