How x1ulan/shorturl works
Main Components
a) Frontend Layer:
• Single PHP interface (index.php)
• This as the entry point for user interactions
• Both URL submission and URL redirection flows
b) Application Logic Layer:
• URL processing component (util.php)
• URL generation and validation logic
• Shortening algorithm
c) Data Storage:
• JSON file storage (data.json)
• As a simple persistent storage solution
URL Shortening Flow
• User → index.php → util.php → data.json
• Response returns back through the same path
URL Redirection Flow
• User with short URL → index.php → util.php → data.json
• Redirect to original URL
Additional Elements
Technical details in notes or labels:
• PHP Version requirement
• Docker containerization
• JSON-based storage mechanism