{"id":20857114,"url":"https://github.com/flipperdevices/flipper-url-shortener","last_synced_at":"2025-04-10T21:09:35.744Z","repository":{"id":240898631,"uuid":"763818994","full_name":"flipperdevices/flipper-url-shortener","owner":"flipperdevices","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-23T23:45:48.000Z","size":168,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":10,"default_branch":"dev","last_synced_at":"2025-04-10T21:09:28.940Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flipperdevices.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-02-27T01:09:25.000Z","updated_at":"2025-04-04T02:23:57.000Z","dependencies_parsed_at":"2024-05-21T11:05:04.557Z","dependency_job_id":"57c6af14-037e-448b-b7bb-d811282ee148","html_url":"https://github.com/flipperdevices/flipper-url-shortener","commit_stats":null,"previous_names":["flipperdevices/flipper-url-shortener"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipper-url-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipper-url-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipper-url-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipper-url-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flipperdevices","download_url":"https://codeload.github.com/flipperdevices/flipper-url-shortener/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248298334,"owners_count":21080320,"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":[],"created_at":"2024-11-18T04:36:17.230Z","updated_at":"2025-04-10T21:09:35.728Z","avatar_url":"https://github.com/flipperdevices.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\nThis is a public repository of Flipper URL Shortener created using Python and Vue.js\n\n### **THERE IS NO AUTHORIZATION OR OTHER SECURITY**\n\n# Getting started\n\n### Requirements\n- Docker\n- PostgresSQL\n\n### Environment variables\nBackend:\n- APP_TITLE: string = URL Shortener\n- APP_VERSION: string = 0.1.0\n- APP_DEBUG: boolean = False\n- APP_API_VERSION_STR: string = v0\n- APP_OPENAPI_URL: string = /api/openapi.json **to disable API documentation set value to empty string \\' \\'**\n- POSTGRES_URL: string = **REQUIRED**\n- ROOT_REDIRECT_URL: string | None = None\n- CACHE_ACTIVE: boolean = True\n- CACHE_EXPIRE_TIME: int = 999999999999\n\nFrontend:\n- APP_PATH: string = /admin\n- API_PATH: string = /api/v0/\n- SHORTENED_URL_BASE_PATH: string = `${location.origin}/`\n\nSee `frontend/.env` for more description\n\n### Start application\n```\ndocker build -t test .\n```\n\n```\ndocker run --rm -it -p 8080:80 --net test -e POSTGRES_URL=postgresql+asyncpg://user:password@hostname/database test\n```\n\nVisit `http://127.0.0.1:8080/admin`\n\n# Backend\n\n### Main stack\n- Python3.11\n- FastAPI\n- SQLAlchemy\n- Alembic\n- FastAPI-cache2\n- FastAPI-pagination\n- Uvicorn\n\n### API Documentation\nVisit `/api/docs#/` - **to disable API documentation set value to empty string \\' \\'**\n\n### Security\nThere is no security, you have to protect your `/admin` and `/api` additionally\n\n### Cache\n**Only redirect router is cached**\n\nAs a cache backend we use `InMemoryBackend`, you can easily change it in the `backend/main.py`, see [package documentation](https://github.com/long2ice/fastapi-cache)\n\nWe have a custom `@cache_visits` decorator which works as usual but create a background task to increase visits count in the database\n\nAlso, we have a custom cache builder which creates a cache key from the request slug `{prefix}:{slug}`\n\nCache invalidation on short url update and delete by cache key\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipperdevices%2Fflipper-url-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflipperdevices%2Fflipper-url-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipperdevices%2Fflipper-url-shortener/lists"}