ZLY (Zany Link Yanker) is an open-source, full-stack URL shortening application. Built with a focus on simplicity and efficiency, it leverages Python and MongoDB to provide a reliable service for transforming long-form URLs into concise, shareable identifiers.
The application utilizes a Flask-based backend and a NoNoSQL database architecture to ensure rapid data retrieval and reliable persistence.
- Backend: Python 3.x, Flask
- Database: MongoDB Atlas
- Infrastructure: Gunicorn (WSGI), Nginx (Reverse Proxy)
- Frontend: HTML5, CSS3
- Unique Slug Generation: Automatically creates shortened identifiers for all submitted URLs.
- Persistent Data Management: Robust storage and retrieval via MongoDB integration.
- Environment Security: Configured to use
.envfiles for sensitive database credentials and API keys. - Cross-Platform Deployment: Optimized for PaaS (Render, Heroku) and self-hosted VPS environments.
- Provision a MongoDB cluster via MongoDB Atlas.
- Create a database user with
readWritepermissions. - Configure Network Access (IP Whitelisting) for your deployment environment.
- Retrieve your Connection String and define the
MONGO_URIin your environment variables.
Ensure you have Python 3.x and pip installed:
# Clone the repository
git clone [https://github.com/PythonPlumber/ZLY.git](https://github.com/PythonPlumber/ZLY.git)
# Install core dependencies
pip install Flask pymongo python-dotenv
# Execute the development server
python3 app.py
- Connect your repository to the Render dashboard.
- Select Web Service.
- Configure the Start Command:
gunicorn app:app
- Define your
MONGO_URIunder the Environment tab.
- Initialize the application via CLI:
heroku create [your-app-name]
- Ensure a
requirements.txtandProcfileexist in the root directory. - Deploy the source code:
git push heroku master
For production environments (Ubuntu/Debian recommended):
- System Dependencies: Install
nginx,python3-pip, andmongodb. - Process Management: Use Gunicorn managed by
systemdto ensure high availability. - Reverse Proxy: Configure Nginx to forward traffic to the Gunicorn application socket.
- Security: Configure your firewall (UFW) to allow traffic on ports
80(HTTP) and443(HTTPS).
This project is licensed under the MIT License.
Maintained by PythonPlumber**
**Would you like me to generate a `requirements.txt` file or a professional `Procfile` to complete this repository?**