{"id":50882339,"url":"https://github.com/marekzelinka/url-shortener-api","last_synced_at":"2026-06-15T14:01:32.183Z","repository":{"id":338181543,"uuid":"1155731708","full_name":"marekzelinka/url-shortener-api","owner":"marekzelinka","description":"Shortify is a URL shortener RESTful API built with Python and FastAPI.","archived":false,"fork":false,"pushed_at":"2026-02-13T11:11:37.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-13T14:51:23.376Z","etag":null,"topics":["beanie-odm","fastapi","mongo","pydantic","pymongo","pyrefly","python","ruff","url-shortener","uv"],"latest_commit_sha":null,"homepage":"https://url-shortener-api-hidden-violet-9940.fly.dev/docs","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/marekzelinka.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-11T20:56:33.000Z","updated_at":"2026-02-13T11:11:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/marekzelinka/url-shortener-api","commit_stats":null,"previous_names":["marekzelinka/url-shortener-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/marekzelinka/url-shortener-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekzelinka%2Furl-shortener-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekzelinka%2Furl-shortener-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekzelinka%2Furl-shortener-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekzelinka%2Furl-shortener-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marekzelinka","download_url":"https://codeload.github.com/marekzelinka/url-shortener-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekzelinka%2Furl-shortener-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34365597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"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":["beanie-odm","fastapi","mongo","pydantic","pymongo","pyrefly","python","ruff","url-shortener","uv"],"created_at":"2026-06-15T14:01:30.051Z","updated_at":"2026-06-15T14:01:32.156Z","avatar_url":"https://github.com/marekzelinka.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# URL shortener RESTful API\n\nA fast, fully async and reliable **URL shortener RESTful API** built with **Python** and **FastAPI** framework. It uses **MongoDB** for storing shortened URLs data and implements user registration via **OAuth2 JWT authentication**.\n\n## Features\n\n- Dockerized and ready to be deployed.\n- Fully async and non-blocking.\n- Uses **FastAPI** framework for API development.\n- CORS (Cross Origin Resource Sharing) support.\n- Uses **MongoDB** as data store for users and shortened URLs.\n- **OAuth2** (with hashed passwords and JWT tokens) based user authentication.\n- Extensible architecture for adding new API endpoints and services.\n- Uses **UV** for dependency management.\n- Automated code formatting, linting and type-checking using **Ruff** and **Pyrefly**.\n- Pagination support for listing shortened URLs and users.\n- **Fully type annotated** code for better IDE support and code quality.\n\n## Tech stack\n\n- [FastAPI](https://fastapi.tiangolo.com/) - web framework\n- [Beanie](https://beanie-odm.dev/) - MongoDB ODM for Python\n- [MongoDB](https://sqlite.org/) - no-sql database\n- [uv](https://docs.astral.sh/uv/) - project manager, and much more...\n- [Ruff](https://docs.astral.sh/ruff/) - linter and formatter\n- [Pyrefly](https://pyrefly.org/) - type checker\n- [just](https://just.systems/) - command runner\n\n## Setup\n\n### Prep\n\nThis project uses the modern `pyproject.toml` standard for dependency management and requires the `uv` tool to manage the environment.\n\n**Ensure `uv` is installed** globally on your system. If not, follow the official installation guide for [`uv`](https://docs.astral.sh/uv/).\n\nCreate a [MongoDB Atlas](https://www.mongodb.com/docs/atlas/tutorial/create-atlas-account/) for cloud-based MongoDB.\n\n### Install\n\n1.  **Setup venv and install dependencies:**\n\n    ```sh\n    uv sync\n    ```\n\n2.  **Set up Environment Variables:**\n\n    Copy the contents of [`.env.example`](./.env.example) to `.env` file in the root directory.\n    \n     ```sh\n    cp .env.example .env\n    ```\n\n### Running the application\n\nStart the development server using `uv`:\n\n```sh\nuv run uvicorn app.main:app --reload\n```\n\nOnce started, access the interactive docs at: [http://localhost:8000/docs](http://localhost:8000/docs).\n\n### Local dev\n\n1. Setup your editor to work with [ruff](https://docs.astral.sh/ruff/editors/setup/) and [Pyrefly](https://pyrefly.org/en/docs/IDE/).\n\n2. *Optional* Install the [justfile extension](https://just.systems/man/en/editor-support.html) for your editor, and use the provided `./justfile` to run commands.\n\n## Code Quality\n\n- Check for linting errors using `ruff check`: \n\n  ```sh\n  uv run ruff check --fix\n  ```\n\n- Format the code using `ruff format`: \n\n  ```sh\n  uv run ruff format\n  ```\n\n- Run typechecker using `ty check`: \n\n  ```sh\n  uv run pyrefly check\n  ```\n\n## TODO\n\n- [x] deploy to Fly.io\n- [x] add admin routes for managment\n- [-] private short urls (add `is_public` field to `ShortURL`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarekzelinka%2Furl-shortener-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarekzelinka%2Furl-shortener-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarekzelinka%2Furl-shortener-api/lists"}