{"id":31908313,"url":"https://github.com/vishapp/safe-shrink","last_synced_at":"2025-10-13T15:26:59.099Z","repository":{"id":282900812,"uuid":"949849386","full_name":"VishApp/safe-shrink","owner":"VishApp","description":"A lightweight URL shortening application built using Flask, SQLAlchemy, SQLite, and Docker. This simple, intuitive project lets users shorten long URLs and easily redirect to the original URL.","archived":false,"fork":false,"pushed_at":"2025-03-17T15:13:35.000Z","size":2398,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T15:41:56.074Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/VishApp.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-17T08:37:49.000Z","updated_at":"2025-03-17T15:13:37.000Z","dependencies_parsed_at":"2025-03-17T15:42:38.617Z","dependency_job_id":"e710ebee-4115-4cb2-8e65-5390442cdb83","html_url":"https://github.com/VishApp/safe-shrink","commit_stats":null,"previous_names":["vishapp/safe-shrink"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VishApp/safe-shrink","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VishApp%2Fsafe-shrink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VishApp%2Fsafe-shrink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VishApp%2Fsafe-shrink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VishApp%2Fsafe-shrink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VishApp","download_url":"https://codeload.github.com/VishApp/safe-shrink/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VishApp%2Fsafe-shrink/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015919,"owners_count":26085778,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-13T15:26:51.270Z","updated_at":"2025-10-13T15:26:59.085Z","avatar_url":"https://github.com/VishApp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Safe Shrink \n\nA simple URL shortening web app built using Flask, featuring malware URL checking via VirusTotal API. \n\n## 🔗 Demo\nCheck out the live demo: [Safe Shrink](https://safe-shrink.onrender.com/)\n\n## 🎯 Features\n\n- **Easy URL Shortening:** Convert long URLs into short, shareable links.\n- **SQLite Database:** Efficient storage and retrieval using SQLAlchemy.\n- **Simple Web UI:** Minimalist, user-friendly interface.\n- **RESTful API:** Programmatically shorten URLs via an API endpoint.\n- **VirusTotal Integration:** Checks URLs for malicious content before shortening.\n- **Docker Support:** Easily containerized and deployable anywhere.\n\n## 🚀 Tech Stack\n\n- **Flask**\n- **SQLite \u0026 SQLAlchemy**\n- **VirusTotal API**\n- **Docker**\n\n## ⚙️ Installation\n\n### Using Docker\n\n```bash\ndocker-compose up --build\n```\n\nVisit [http://localhost:5000](http://localhost:5000)\n\n### Manual Setup\n\n```bash\npython -m venv venv\n\nsource venv/bin/activate  # On Windows: .\\venv\\Scripts\\activate\n\npip install -r requirements.txt\n\nexport FLASK_APP=app\n\nexport FLASK_RUN_HOST=localhost\n\nflask run\n```\n\n## 🌐 API Usage\n\n### Shorten URL\n\nMake a POST request to `/api/shorten`:\n\n```json\n{\n  \"url\": \"https://example.com\"\n}\n```\n\n### Example Response\n\n```json\n{\n  \"short_url\": \"http://localhost:5000/abc123\",\n  \"malicious\": false,\n  \"vt_result\": {}\n}\n```\n\nIf a URL is detected as malicious:\n\n```json\n{\n  \"error\": \"URL detected as malicious\",\n  \"malicious\": true,\n  \"vt_result\": {}\n}\n```\n\n## 📁 Project Structure\n\n```\nflask-url-shortener/\n├── app/\n│   ├── __init__.py\n│   ├── models.py\n│   ├── routes.py\n│   ├── templates/\n│   └── static/\n├── Dockerfile\n├── docker-compose.yml\n├── requirements.txt\n└── README.md\n```\n\n## 📸 Screenshot\n\n![URL Shortener Screenshot](https://i.postimg.cc/zvS9gdSp/Screenshot-2025-03-17-at-7-23-32-PM.png)\n\n![URL Shortener Screenshot](https://i.postimg.cc/1RGx2th6/Screenshot-2025-03-17-at-7-23-51-PM.png)\n\n## ⚡ Future Enhancements\n\n- Custom URL aliases\n- Analytics and click tracking\n- User authentication\n- URL expiration dates\n\n## 🤝 Contributions\n\nFeel free to fork this repository, submit pull requests, or suggest improvements!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishapp%2Fsafe-shrink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvishapp%2Fsafe-shrink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishapp%2Fsafe-shrink/lists"}