Skip to content

This repository is made for hashing the url and adding some validation on url to make it secure.

Notifications You must be signed in to change notification settings

manishkrojha0/URL-Hasher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Hashing System using Django

Introduction In this project, we will design and implement a URL hashing system to overcome problems with long URLs with UTM tracking. The goal of the project is to create a system that can hash URLs to make them shorter and more manageable, while still preserving all query parameters and enabling click tracking.

The project can be implemented as a web application with UI or only as an API. We will use Django as our web framework to build the application.

Requirements

The following requirements should be considered while designing and implementing the URL hashing system:

  • URL length cannot be restricted
  • Query parameters cannot be ignored
  • Click tracking should be enabled
  • Hashed URLs can be made privacy aware
  • The generated URL might be single (limited) use only

Design

  • The URL hashing system can be designed using the following components:

  • URL Hashing Algorithm: A hashing algorithm will be used to hash the original URL to a shorter URL. The hashing algorithm should be secure and produce unique hashes for each URL.

  • Database: A database will be used to store the hashed URL and its corresponding original URL. We will use Django's built-in ORM to interact with the database.

  • Click Tracking: We will implement a click tracking system to track clicks on the hashed URLs. When a user clicks on a hashed URL, we will redirect them to the original URL and record the click in the database.

  • Privacy: To make the hashed URLs privacy aware, we can add a time limit or a limited number of uses to the hashed URLs. Once the limit is reached, the hashed URL will expire.

Implementation

The implementation of the URL hashing system can be divided into the following steps:

  • Create a Django project and app
  • Define a URL model to store the original URL and the hashed URL
  • Implement the URL hashing algorithm
  • Create views for generating hashed URLs and redirecting to original URLs
  • Implement the click tracking system
  • Add privacy features to the hashed URLs
  • Create a user interface or an API for the system

Conclusion

In this project, we have designed and implemented a URL hashing system using Django. The system can hash long URLs with UTM tracking, preserve query parameters, enable click tracking, and be made privacy aware. The system can be implemented as a web application with UI or only as an API.

About

This repository is made for hashing the url and adding some validation on url to make it secure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published