|
| 1 | +# GoURL - URL Shortener |
| 2 | + |
| 3 | +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. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- Shorten long URLs into short, easy-to-remember ones |
| 8 | +- Redirect users to the original URL when they access the shortened URL |
| 9 | +- Track the number of clicks and basic analytics for each shortened URL |
| 10 | +- Dockerized application for easy deployment |
| 11 | + |
| 12 | +## Technologies Used |
| 13 | + |
| 14 | +- **Golang**: Backend server and API development |
| 15 | +- **PostgreSQL**: Database management system |
| 16 | +- **Redis**: In-memory data store for caching and analytics |
| 17 | +- **Svelte**: Frontend framework for building the user interface |
| 18 | + |
| 19 | +## Prerequisites |
| 20 | + |
| 21 | +Before running the application, ensure that you have the following dependencies installed on your system: |
| 22 | + |
| 23 | +- Go (1.16 or later) |
| 24 | +- PostgreSQL |
| 25 | +- Redis |
| 26 | + |
| 27 | +## Getting Started |
| 28 | + |
| 29 | +These instructions will help you set up the project and get it running on your local machine. |
| 30 | + |
| 31 | +1. Clone the repository: |
| 32 | +```bash |
| 33 | +git clone https://github.com/your-username/your-repo.git |
| 34 | +``` |
| 35 | + |
| 36 | +2. Navigate to the project directory: |
| 37 | +```bash |
| 38 | +cd your-repo |
| 39 | +``` |
| 40 | + |
| 41 | +3. Start the Docker containers using Docker Compose: |
| 42 | +```bash |
| 43 | +docker-compose up -d |
| 44 | +``` |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +## Usage |
| 49 | + |
| 50 | +1. Open the GoURL application in your web browser. |
| 51 | + |
| 52 | +2. Enter a long URL that you want to shorten in the input field. |
| 53 | + |
| 54 | +3. Click the "Shorten" button to generate a short URL. |
| 55 | + |
| 56 | +4. Copy the shortened URL and share it with others. |
| 57 | + |
| 58 | +5. When users access the shortened URL, they will be redirected to the original long URL. |
| 59 | + |
| 60 | +6. To view analytics for a shortened URL, append `/stats` to the URL. For example: |
| 61 | + |
| 62 | + |
| 63 | +5. Access the application in your web browser at `http://localhost:8000`. |
| 64 | + |
| 65 | +## Dockerization |
| 66 | + |
| 67 | +This project includes a `Dockerfile` and `docker-compose.yml` file to enable easy Dockerization and deployment. |
| 68 | + |
| 69 | +- The `Dockerfile` contains the instructions to build a Docker image for the GoURL application. |
| 70 | + |
| 71 | +- The `docker-compose.yml` file defines the services required for running the application, including the GoURL server, PostgreSQL database, and Redis cache. |
| 72 | + |
| 73 | +To deploy the application using Docker, follow the steps mentioned in the "Getting Started" section above. |
| 74 | + |
| 75 | +## License |
| 76 | + |
| 77 | +This project is licensed under the [MIT License](LICENSE). |
| 78 | + |
| 79 | +## Acknowledgments |
| 80 | + |
| 81 | +- [Golang](https://golang.org/) |
| 82 | +- [PostgreSQL](https://www.postgresql.org/) |
| 83 | +- [Redis](https://redis.io/) |
| 84 | +- [Svelte](https://svelte.dev/) |
| 85 | + |
| 86 | +## Contributing |
| 87 | + |
| 88 | +Contributions are welcome! If you find any issues or want to enhance the application, please submit a pull request. |
0 commit comments