ReadyPath is a simple and efficient URL shortener that transforms long URLs into short, readable links like rp.houndsec.net/subtle-Lion. Built with Flask, MongoDB, and containerized using Docker and Docker Compose, ReadyPath is designed to be easy to set up and use.
Access it at: rp.houndsec.net
- Short, Readable URLs: Converts long URLs into short, human-readable links (e.g.,
rp.houndsec.net/sophisticated-Crow). - API-Based: Accepts JSON input and returns the shortened URL in JSON format.
- Containerized: Easily deployable using Docker and Docker Compose.
The ReadyPath API is live and hosted at rp.houndsec.net
To shorten a URL, send a POST request to:
https://rp.houndsec.net/api
With the following JSON payload:
{
"url": "https://houndsec.net/"
}The response will return a shortened URL:
{
"shortURL": "rp.houndsec.net/subtle-Lion"
}- Backend: Flask (Python)
- Database: MongoDB (for URL storage) and SQLite (for token generation)
- Containerization: Docker and Docker Compose
- Docker and Docker Compose installed on your machine.
- Python 3.x (if running from source).
pipfor installing Python dependencies.
-
Clone the Repository:
git clone https://github.com/houndsec/readypath cd readypath -
Start the Containers: Run the following command to spin up the Flask app and MongoDB containers:
docker-compose up -d
-
Access the API: The Flask app will be running on
localhost:8000. You can test the API using tools likecurlor Postman.
-
Clone the Repository:
git clone https://github.com/houndsec/readypath cd readypath -
Set Environment Variables: Set the
MONGO_URIenvironment variable to your MongoDB connection string:export MONGO_URI=mongodb://<MONGODB_URI_PATH>
-
Create a Virtual Environment:
python3 -m venv venv source venv/bin/activate -
Install Dependencies: Install the required Python packages:
pip install -r requirements.txt
-
Run the Application: Start the Flask development server:
python app.py
The app will be available at
http://localhost:5000.
Send a POST request to the /api endpoint with the following JSON payload:
{
"url": "https://houndsec.net/"
}The API will return a JSON response with the shortened URL:
{
"shortURL": "localhost:8000/sophisticated-Crow"
}The docker-compose.yml file defines two services:
- Flask App: The Flask application that handles URL shortening.
- MongoDB: The database used to store URLs.
services:
flask-app:
build:
context: .
ports:
- "8000:8000"
depends_on:
- mongo
restart: always
mongo:
image: mongo:latest
volumes:
- mongo-data:/data/db
restart: always
volumes:
mongo-data:readypath/
├── app.py
├── dbms.py
├── docker-compose.yml
├── Dockerfile
├── README.md
├── requirements.txt
├── utils.py
└── words.db
- Frontend Interface: Add a web interface for easier interaction.
- User Authentication: Enable users to create accounts and manage their URLs.
Contributions are welcome! If you'd like to contribute to ReadyPath, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Submit a pull request with a detailed description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or feedback, feel free to reach out:
- Email: mmdoha@houndsec.net
- GitHub: Monazir Muhammad Doha
Happy shortening with ReadyPath! 🚀

