GoURL is a URL shortener built with Golang, PostgreSQL, Redis, and Svelte. It provides a simple and efficient way to shorten long URLs into short, memorable ones.
- Shorten long URLs into short, easy-to-remember ones
- Redirect users to the original URL when they access the shortened URL
- Track the number of clicks and basic analytics for each shortened URL
- Dockerized application for easy deployment
- Golang: Backend server and API development
- PostgreSQL: Database management system
- Redis: In-memory data store for caching and analytics
- Svelte: Frontend framework for building the user interface
Before running the application, ensure that you have the following dependencies installed on your system:
- Go (1.16 or later)
- PostgreSQL
- Redis
These instructions will help you set up the project and get it running on your local machine.
- Clone the repository:
git clone https://github.com/your-username/your-repo.git
- Navigate to the project directory:
cd your-repo
- Start the Docker containers using Docker Compose:
docker-compose up -d
-
Open the GoURL application in your web browser.
-
Enter a long URL that you want to shorten in the input field.
-
Click the "Shorten" button to generate a short URL.
-
Copy the shortened URL and share it with others.
-
When users access the shortened URL, they will be redirected to the original long URL.
-
To view analytics for a shortened URL, append
/stats
to the URL. For example: -
Access the application in your web browser at
http://localhost:8000
.
This project includes a Dockerfile
and docker-compose.yml
file to enable easy Dockerization and deployment.
-
The
Dockerfile
contains the instructions to build a Docker image for the GoURL application. -
The
docker-compose.yml
file defines the services required for running the application, including the GoURL server, PostgreSQL database, and Redis cache.
To deploy the application using Docker, follow the steps mentioned in the "Getting Started" section above.
This project is licensed under the MIT License.
Contributions are welcome! If you find any issues or want to enhance the application, please submit a pull request.