This project is a URL shortener and analytics application built with React for the frontend and Go for the backend. It allows users to shorten URLs, track analytics, and manage generated URLs.
- Shorten URLs
- Track analytics for shortened URLs
- Manage URLs with a PIN
- Dark mode support with theme switching
- Responsive design
-
Clone the repository:
git clone https://github.com/meghrathod/shorty.git cd shorty
-
Install Go dependencies:
go mod tidy
-
Set up PostgreSQL database and update the environment variables as required in
utils.go
file. -
Run the backend server:
go run main.go
-
Navigate to the
ui
directory:cd ui
-
Install dependencies:
yarn
-
Start the development server:
yarn dev
- Access the application in your browser at
http://localhost:3000
. - Use the interface to shorten URLs and view analytics.
- Manage URLs using the provided PIN for security.
- POST /new: Create a new shortened URL.
- POST /search: Search for a URL and get redirect information.
- POST /analytics: Retrieve analytics data for a URL.
- DELETE /delete: Delete a shortened URL using a PIN.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.