{"id":41285544,"url":"https://github.com/eslam5464/url-shortener","last_synced_at":"2026-01-23T03:04:05.770Z","repository":{"id":235767889,"uuid":"791206909","full_name":"eslam5464/Url-Shortener","owner":"eslam5464","description":"Simple web application to shorten URLs locally or on a server","archived":false,"fork":false,"pushed_at":"2024-05-03T09:37:50.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-03T14:13:31.748Z","etag":null,"topics":["fastapi","postgresql","python3","redis","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eslam5464.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-24T09:36:31.000Z","updated_at":"2024-05-03T09:37:53.000Z","dependencies_parsed_at":"2024-04-24T15:02:05.408Z","dependency_job_id":"d6a4e22d-274a-47b3-bf9f-d8a2f90e4c15","html_url":"https://github.com/eslam5464/Url-Shortener","commit_stats":null,"previous_names":["eslam5464/url-shortener"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eslam5464/Url-Shortener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eslam5464%2FUrl-Shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eslam5464%2FUrl-Shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eslam5464%2FUrl-Shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eslam5464%2FUrl-Shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eslam5464","download_url":"https://codeload.github.com/eslam5464/Url-Shortener/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eslam5464%2FUrl-Shortener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28679141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"online","status_checked_at":"2026-01-23T02:00:08.296Z","response_time":59,"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":["fastapi","postgresql","python3","redis","sqlalchemy"],"created_at":"2026-01-23T03:03:18.012Z","updated_at":"2026-01-23T03:04:05.750Z","avatar_url":"https://github.com/eslam5464.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca id=\"readme-top\"\u003e\u003c/a\u003e\n\n[![MIT License][license-shield]][license-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n[![Github][github-shield]][github-url]\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About The Project\n\n* The project aims to build a URL shortener service that takes long URLs and generates shortened versions, making them\n  easier to share\n* Users can input long URLs, and the system will generate a unique short URL for each input\n\n### Sample image\n\n![Sample image](https://i.imgur.com/0pDChCQ.png)\n\n### Technologies Used\n\n[![Python][Python-shield]][Python-url]\n[![FastApi][FastAPI-shield]][FastAPI-url]\n[![PostgreSQL][PostgreSQL-shield]][PostgreSQL-url]\n[![Redis][Redis-shield]][Redis-url]\n[![Jinja][Jinja-shield]][Jinja-url]\n[![HTML][HTML-shield]][HTML-url]\n[![CSS][CSS-shield]][CSS-url]\n[![JavaScript][JavaScript-shield]][JavaScript-url]\n\n* Python: The primary programming language for backend development.\n* FastAPI: To create the web service and handle HTTP requests/responses.\n* PostgreSQL: As the primary database to store information about original URLs and their corresponding short URLs.\n* Redis: To cache frequently accessed URLs for faster retrieval and better performance and use it for the api limiter to\n  limit requests.\n* Jinja2 Template Engine: To render HTML templates for the frontend interface.\n* HTML/CSS/JavaScript: For the frontend interface.\n\n*Note: each of the above icons redirects to its official documentation*\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Getting Started\n\n### Prerequisites\n\n* [Docker](https://www.docker.com/get-started/)\n* [Python](https://www.python.org/downloads/release/python-3123/)\n\n### Installation\n\n1. Clone the repo\n   ```sh\n   git clone https://github.com/eslam5464/Url-Shortener.git\n   ```\n\n##### Environment variables\n\n```dotenv\nBACKEND_HOST=127.0.0.1\nBACKEND_PORT=8000\n\nCORS_ORIGIN=[\"*\"]\n\nALLOWED_HOSTS=[\"*\"]\n\nPOSTGRES_DB=main-database\nPOSTGRES_DB_SCHEMA=url-shortener\nPOSTGRES_HOST=localhost\nPOSTGRES_PASSWORD=change-this\nPOSTGRES_PORT=5432\nPOSTGRES_USER=postgres\n\nREDIS_HOST=localhost\nREDIS_USER=\nREDIS_PASS=change-this\nREDIS_PORT=6379\n```\n\n#### Local\n\n1. Add the previous environment variables to your project\n2. Create a new virtual\n   environment [Official python website documentation](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/)\n3. Activate the virtual environment\n4. Change the directory to 'backend' folder e.g. `cd backend`, and then run the following commands\n\n```shell\npip install poetry poetry-plugin-export\npoetry config virtualenvs.create false\npoetry export --without-hashes -f requirements.txt -o requirements.txt\npip install --upgrade pip\npip install -r requirements.txt\npython main.py\n```\n\n#### Docker\n\n1. Add the environment variables from above in the shell\n2. Change directory to project root directory and run dockerfile\n\n```docker\ndocker-compose -f docker-compose-local.yml -p url-shortener up -d --build backend\n```\n\n3. You should see the web interface at http://localhost:8000 or\n   the port and host that you specified in the environment variables.*\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any\ncontributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also\nsimply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See the file `LICENSE` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\nProject Link: [GitHub](https://github.com/eslam5464/Url-Shortener)\n\nSocial: [LinkedIn][linkedin-url]\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\n[HTML-shield]: https://img.shields.io/badge/HTML5-E34F26?logo=html5\u0026logoColor=fff\u0026style=flat\n\n[HTML-url]: https://developer.mozilla.org/en-US/docs/Web/HTML\n\n[CSS-shield]: https://img.shields.io/badge/CSS3-1572B6?logo=css3\u0026logoColor=fff\u0026style=flat\n\n[CSS-url]: https://developer.mozilla.org/en-US/docs/Web/CSS\n\n[JavaScript-shield]: https://img.shields.io/badge/JavaScript-F7DF1E?logo=javascript\u0026logoColor=000\u0026style=flat\n\n[JavaScript-url]: https://developer.mozilla.org/en-US/docs/Web/JavaScript\n\n[Jinja-shield]: https://img.shields.io/badge/Jinja-B41717?logo=jinja\u0026logoColor=fff\u0026style=flat\n\n[Jinja-url]: https://jinja.palletsprojects.com\n\n[Python-shield]: https://img.shields.io/badge/Python-3776AB?logo=python\u0026logoColor=fff\u0026style=flat\n\n[Python-url]: https://www.python.org\n\n[Redis-shield]: https://img.shields.io/badge/Redis-DC382D?logo=redis\u0026logoColor=fff\u0026style=flat\n\n[Redis-url]: https://redis.io\n\n[PostgreSQL-shield]: https://img.shields.io/badge/PostgreSQL-4169E1?logo=postgresql\u0026logoColor=fff\u0026style=flat\n\n[PostgreSQL-url]: https://www.postgresql.org\n\n[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=for-the-badge\n\n[license-url]: https://github.com/eslam5464/Url-Shortener/blob/main/LICENSE\n\n[github-shield]: https://img.shields.io/badge/GitHub-181717?logo=github\u0026logoColor=fff\u0026style=for-the-badge\n\n[github-url]: https://github.com/eslam5464/Url-Shortener\n\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=555\n\n[linkedin-url]: https://linkedin.com/in/eslam5464\n\n[FastAPI-shield]: https://img.shields.io/badge/FastAPI-009688?logo=fastapi\u0026logoColor=fff\u0026style=flat\n\n[FastAPI-url]: https://fastapi.tiangolo.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feslam5464%2Furl-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feslam5464%2Furl-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feslam5464%2Furl-shortener/lists"}