{"id":26657762,"url":"https://github.com/nuraj250/shortify-python","last_synced_at":"2026-05-05T03:37:44.587Z","repository":{"id":283798231,"uuid":"952440237","full_name":"Nuraj250/Shortify-Python","owner":"Nuraj250","description":"A lightweight and efficient URL shortener built with Python and Flask. Convert long links into short, track analytics, and generate QR codes effortlessly! 🚀","archived":false,"fork":false,"pushed_at":"2025-03-22T08:14:17.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T09:19:05.570Z","etag":null,"topics":["flask","link-tracking","python","redirects","short-links","url-shortener","web-application"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nuraj250.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-21T09:32:16.000Z","updated_at":"2025-03-22T08:14:20.000Z","dependencies_parsed_at":"2025-03-22T09:29:19.472Z","dependency_job_id":null,"html_url":"https://github.com/Nuraj250/Shortify-Python","commit_stats":null,"previous_names":["nuraj250/shortify-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nuraj250%2FShortify-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nuraj250%2FShortify-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nuraj250%2FShortify-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nuraj250%2FShortify-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nuraj250","download_url":"https://codeload.github.com/Nuraj250/Shortify-Python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245431715,"owners_count":20614184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","link-tracking","python","redirects","short-links","url-shortener","web-application"],"created_at":"2025-03-25T09:16:33.088Z","updated_at":"2026-05-05T03:37:44.557Z","avatar_url":"https://github.com/Nuraj250.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔗 Shortify – Flask URL Shortener\n\n![Shortify UI Screenshot](logo.png) \u003c!-- Add a screenshot if you'd like --\u003e\n\n**Shortify** is a modern, minimal, and fully-functional URL shortener built using **Flask** and **MongoDB**. It allows you to shorten URLs, customize short codes, track click counts, and optionally set expiration times.\n\n---\n\n## 🚀 Features\n\n- 🔗 Shorten long URLs into compact links\n- ✏️ Optional **custom short codes**\n- ⏳ Optional **expiration** (in hours)\n- 📈 Real-time **click tracking**\n- 📋 Copy-to-clipboard button\n- 🎨 Clean, responsive Bootstrap frontend\n- ❌ 404 page for broken links\n\n---\n\n## 🧱 Tech Stack\n\n- Backend: [Flask](https://flask.palletsprojects.com/)\n- Database: [MongoDB](https://www.mongodb.com/)\n- Frontend: HTML, Bootstrap 5, JavaScript\n- Others: `pymongo`, `python-dotenv`\n\n---\n\n## 📂 Project Structure\n\n```\nshortify/\n├── app/\n│   ├── __init__.py\n│   ├── config.py\n│   ├── models.py\n│   ├── routes.py\n│   └── utils.py\n├── templates/\n│   ├── index.html\n│   └── 404.html\n├── static/              # Optional for CSS/JS\n├── run.py\n├── requirements.txt\n├── .env\n└── README.md\n```\n\n---\n\n## ⚙️ Setup Instructions\n\n### 1. Clone the Repo\n\n```bash\ngit clone https://github.com/Nuraj250/shortify\ncd shortify\n```\n\n### 2. Create a Virtual Environment\n\n```bash\npython -m venv venv\nsource venv/bin/activate  # or venv\\Scripts\\activate on Windows\n```\n\n### 3. Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 4. Set Up Environment Variables\n\nCreate a `.env` file in the root directory:\n\n```env\nMONGO_URI=mongodb://localhost:27017/\nDB_NAME=shortify\nBASE_URL=http://localhost:5000\n```\n\n### 5. Run the App\n\n```bash\npython run.py\n```\n\nVisit `http://localhost:5000` in your browser 🎉\n\n---\n\n## 📡 API Endpoints\n\n### `POST /shorten`\n\nShortens a URL.\n\n#### Request Body (JSON):\n```json\n{\n  \"url\": \"https://example.com/long-url\",\n  \"custom_code\": \"mycustomcode\",    // optional\n  \"expires_in\": 24                  // optional (in hours)\n}\n```\n\n#### Response:\n```json\n{\n  \"short_url\": \"http://localhost:5000/mycustomcode\",\n  \"custom_code\": \"mycustomcode\",\n  \"expires_in\": 24\n}\n```\n\n---\n\n### `GET /\u003cshort_code\u003e`\n\nRedirects to the original URL, or returns a 404 page if invalid or expired.\n\n---\n\n### `GET /\u003cshort_code\u003e/stats`\n\nReturns click stats for a short URL.\n\n#### Response:\n```json\n{\n  \"short_code\": \"abc123\",\n  \"clicks\": 5\n}\n```\n\n---\n\n## 🛠 Future Ideas\n\n- 🔐 Admin dashboard for URL management\n- 📦 Docker support for deployment\n- 📊 Analytics with charts\n- 💬 QR code generation\n\n---\n\n## 📸 UI Preview\n\n![Shortify UI Screenshot](logo.png) \u003c!-- Add a screenshot if you'd like --\u003e\n\n---\n\n## 📄 License\n\nMIT License — use it freely!\n\n---\n\n## 🤝 Contribute\n\nPull requests and feature ideas are welcome! Drop a ⭐ if you like the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuraj250%2Fshortify-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuraj250%2Fshortify-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuraj250%2Fshortify-python/lists"}