This is a simple URL shortener web application built using Flask, SQLAlchemy, and WTForms. It allows users to register, log in, shorten URLs, and view their shortened URLs. The application also logs requests and sends them to a Discord webhook for monitoring.
- User registration and authentication
- URL shortening
- Logging of user requests
- Integration with Discord webhook for monitoring
Before you begin, ensure you have met the following requirements:
- Python 3 installed on your local machine
- Git installed on your local machine
- A Discord account to create a webhook
To install and run this project locally, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/M-thefl/URL-Shortner.git
-
Navigate to the project directory:
cd URL-Shortner
-
Install the required Python packages:
pip install -r requirements.txt
-
Set up a Discord webhook and copy the URL.
-
Create a
config.json
file in the project directory with the following content, replacing<webhook_url>
with your Discord webhook URL:
{
"app.register.info": "discord-webhook",
"app.logger.info": "discord-webhook",
"app.URLShortened.info": "discord-webhook"
}
Run the Flask application:
python app.py
Open your web browser and navigate to http://localhost:5000 to access the application.
Register an account or log in if you already have one.
Shorten URLs using the form provided.
View your shortened URLs and copy them for sharing.
Contributions are welcome! If you would like to contribute to this project, please follow these steps:
Fork the repository. Create a new branch (git checkout -b feature/new-feature). Make your changes. Commit your changes (git commit -am 'Add new feature'). Push to the branch (git push origin feature/new-feature). Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or suggestions, feel free to contact me at [email protected]
good luck (; 🌙
for life
fl