{"id":25442257,"url":"https://github.com/arvind-4/url-shortner","last_synced_at":"2026-04-07T09:31:33.191Z","repository":{"id":263362170,"uuid":"890113652","full_name":"arvind-4/url-shortner","owner":"arvind-4","description":"Url shortner service using Neon db and Django!","archived":false,"fork":false,"pushed_at":"2024-11-20T16:09:04.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-12T03:19:59.203Z","etag":null,"topics":["django","neondb","postgres","vercel"],"latest_commit_sha":null,"homepage":"https://awesomeurlshortner.vercel.app","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/arvind-4.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":"2024-11-18T02:23:52.000Z","updated_at":"2024-11-20T16:09:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"7bc88208-f8cb-4095-b934-b49a8f10bced","html_url":"https://github.com/arvind-4/url-shortner","commit_stats":null,"previous_names":["arvind-4/url-shortner"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arvind-4/url-shortner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvind-4%2Furl-shortner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvind-4%2Furl-shortner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvind-4%2Furl-shortner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvind-4%2Furl-shortner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arvind-4","download_url":"https://codeload.github.com/arvind-4/url-shortner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvind-4%2Furl-shortner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31507962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["django","neondb","postgres","vercel"],"created_at":"2025-02-17T13:17:49.836Z","updated_at":"2026-04-07T09:31:33.156Z","avatar_url":"https://github.com/arvind-4.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Url Shortner\n\nA simple URL shortener built using Django and PostgreSQL.\n\n## Features\n\n- Shorten URLs\n- Redirect to original URLs\n- Get top visited domains\n- Get metrics\n\n## Local Setup (Docker)\n\n1. Clone the repository\n2. Run `docker compose up --build` to start the application\n\n## Local Setup\n\n1. Clone the repo\n2. copy the contents of `.env.docker` to `.env`.\n3. Install the requirements from `requirements.txt`.\n4. Run the dev server by the command `python manage.py runserver`\n\n## Try the api!\n\n```bash\ncurl --location 'https://awesomeurlshortner.vercel.app/shorten/' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"url\": \"facebook.com\"\n}'\n```\n\n## Url Routes:\n\n- **`shorten/` (POST)**: Takes a URL in the request body, validates it, creates or retrieves a shortened URL, and returns the shortened URL in a JSON response.\n- **`metrics/` (GET)**: Returns a JSON response with the top 3 most common domains from all shortened URLs in the database.\n- **`\u003cstr:path\u003e/` (GET)**: Takes a shortcode from the URL path, looks it up in the database, and redirects to the original URL associated with that shortcode.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farvind-4%2Furl-shortner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farvind-4%2Furl-shortner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farvind-4%2Furl-shortner/lists"}