This project provides a URL shortening service that generates a hashed version of long URLs, allowing users to track clicks while preserving the integrity and privacy of the original URLs. The service is built using AWS Lambda, DynamoDB, and Express.js.
- Shorten URLs: Generate short hashed URLs for long URLs.
- Click Tracking: Track the number of clicks on each shortened URL.
- Privacy: The original URL is not exposed in the public domain.
- Single Use: URLs can be generated for single or limited use.
- AWS Lambda
- AWS DynamoDB
- Express.js
- Node.js
- AWS SDK for JavaScript
-
POST /shorten
- Description: Shortens the provided URL.
- Request Body:
{ "originalUrl": "https://example.com" } - Response:
{ "hash": "shortHashValue", "originalUrl": "https://example.com" }
-
GET /r/:hash
- Description: Redirects to the original URL based on the hash.
- Parameters:
hash- The shortened hash. - Response: Redirects to the original URL.
-
GET /details/:hash
- Description: Retrieves details about the shortened URL, including the original URL and click count.
- Parameters:
hash- The shortened hash. - Response:
{ "originalUrl": "https://example.com", "clickCount": 10 }
If you encounter any issues or have questions, feel free to open an issue in the repository or contact the maintainer.
This project is licensed under the MIT License.
This project is a serverless URL shortening service that allows users to convert long URLs into short, hashed URLs while preserving query parameters. It features click tracking and provides a RESTful API for generating shortened URLs, redirecting to original URLs, and retrieving click