URL Santa is a modern, secure URL shortening service with password protection capabilities. Built with FastAPI and featuring a beautiful, responsive dark-themed UI.
Currently working⚡️
- 🔗 URL shortening with custom short codes
- 🔒 Password protection for sensitive URLs
- 👤 User authentication system
- 📱 Responsive design with dark theme
- 📊 QR code generation and download
- 🔄 Real-time URL validation
- 🎨 Modern UI with smooth animations
- 🗄️ MongoDB Atlas integration
- Backend: FastAPI (Python)
- Frontend: HTML, TailwindCSS, Alpine.js
- Database: MongoDB Atlas
- Dependencies:
- FastAPI
- Uvicorn
- Jinja2
- Validators
- QRCode
- Python-multipart
- Passlib (bcrypt)
- Motor (async MongoDB driver)
- Itsdangerous (session management)
- Clone the repository:
git clone https://github.com/yourusername/URL-Santa.git
cd URL-Santa- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt-
Set up environment variables:
- Copy
env.exampleto.env - Add your MongoDB Atlas connection string:
MONGODB_URL=mongodb+srv://your_username:your_password@your_cluster.mongodb.net/?retryWrites=true&w=majority
- Copy
-
Run the application:
uvicorn main:app --reloadThe application will be available at http://localhost:8000
MONGODB_URL: Your MongoDB Atlas connection string (required for production)
-
User Registration/Login:
- Register a new account or log in to existing account
- User sessions are maintained for convenience
-
Basic URL Shortening:
- Enter a URL in the input field
- Click "Go" to validate and shorten
- Get your shortened URL and QR code
-
Password Protection:
- Enable password protection using the checkbox
- Set a password for your shortened URL
- Share the shortened URL with others
- Recipients will need to enter the password to access the original URL
-
QR Code:
- After shortening a URL, a QR code will be generated
- Click "Download QR" to save the QR code image
GET /: Main application interfaceGET /register: User registration pagePOST /register: Register new userGET /login: User login pagePOST /login: Authenticate userGET /logout: Logout userGET /check: Validate a URLPOST /shorten: Create a shortened URLGET /{short_code}: Redirect to original URLPOST /verify-password/{short_code}: Verify password for protected URLs
- Push your code to GitHub
- Connect your repository to Vercel
- Set the following environment variables in Vercel:
MONGODB_URL: Your MongoDB Atlas connection string
- Deploy!
The vercel.json file is already configured for FastAPI deployment.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Bhavya - @yourusername
- FastAPI for the amazing web framework
- TailwindCSS for the beautiful UI components
- Alpine.js for reactive JavaScript
- MongoDB Atlas for the database service
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Your Name - Initial work - GitHub
- FastAPI documentation
- Tailwind CSS
- QRCode.js library
- All contributors who have helped shape this project
If you encounter any issues or have questions, please open an issue in the GitHub repository.
Made with ❤️ by [Bhavya]