A simple and clean Python Flask app to shorten your long URLs easily!
Frontend is made with HTML + TailwindCSS.
Backend is powered by Flask (Python).
your_project/ βββ app.py βββ home_pages/ βββ index.html
app.pyβ Flask Python applicationhome_pages/index.htmlβ Frontend page (served by Flask)
-
Open Terminal or Command Prompt
(π Go to your project folder whereapp.pyis present) -
Install Flask (only first time)
pip install flask
3. **Run the App**
```bash
python app.py
or if you accidentally typed wrong like `python.Ap` (no problem!), just type again correctly:
```bash
python app.py
β
After running, Flask will show something like:
- Running on http://127.0.0.1:5000
4. **Open Browser**
Go to the address shown β
π [http://127.0.0.1:5000](http://127.0.0.1:5000)
5. **Use the App**
- Paste your long URL
- Click `Shorten URL`
- Copy your short link!
- Share it anywhere π
---
## π Features
- Clean simple UI (TailwindCSS)
- Copy Button to copy short URL
- Clear Button to empty the input fields
- Redirection to original URL when opening short link
- All data stored temporarily in memory
- `/clear` endpoint to delete all saved links
---
## β‘ Notes
- App runs **locally** only (localhost).
- If you restart app, all shortened links will reset (stored only in RAM).
- Folder `home_pages/` must be next to `app.py`.
- This project is for **learning purposes** β not production ready.
---
## π Quick Commands
| Action | Command |
|:--|:--|
| Install Flask | `pip install flask` |
| Run App | `python app.py` |
| Open App | Visit [http://localhost:5000](http://localhost:5000) in browser |
---
## π§ Extra Tip
If you want **to auto-open browser** after `python app.py`, you can modify the code slightly
# β
That's it!
Enjoy shortening your URLs with your own personal app!
Have fun building more projects ππ―