# README
URL Shortener
This is a URL shortener web application built with Go and Echo framework, using PostgreSQL as the database. The application allows users to shorten long URLs and track the usage statistics of each shortened URL.
Features
- User registration and login: Users can sign up and log in to the application.
- JWT authentication: Authentication is handled using JSON Web Tokens (JWT) and stored in cookies for secure user sessions.
- Custom path for URLs: Users can specify a custom path for their shortened URLs.
- URL expiration: Shortened URLs have an expiration date, and if not used within a day, they are automatically deleted.
- Simple web interface: The application provides a user-friendly web interface for interacting with the APIs.
- Google Analytics integration: The application tracks and records every click on each shortened URL using Google Analytics.
Installation
To run the URL shortener locally, follow these steps:
Clone the repository:
git clone https://github.com/Calgorr/Full-URL_Shortener.git
Change into the project directory:
cd url-shortener
Build and run the server using Docker Compose:
sudo docker-compose up --build
This will start the server on port 8080.
API Endpoints
- POST /signup: Endpoint for user registration.
- GET /signup: User registration form.
- POST /login: Endpoint for user login.
- GET /login: User login form.
- POST /urls: Endpoint for saving a URL and generating a shortened URL.
- GET /urls: URL submission form.
- GET /:shortURL: Redirects to the original URL associated with the provided short URL.
- GET /:shortURL/stats: Retrieves statistics for the provided short URL.
Technologies Used
- Go: The programming language used for the backend implementation.
- Echo: A fast and minimalist web framework for Go.
- PostgreSQL: The database management system for storing user and URL data.
- Docker: Containerization platform used for packaging the application.
- Google Analytics: Service used to track and analyze user interactions with the shortened URLs.
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author