{"id":27946404,"url":"https://github.com/one-zero-eight/accounts","last_synced_at":"2025-07-23T17:07:52.289Z","repository":{"id":223302577,"uuid":"690007590","full_name":"one-zero-eight/accounts","owner":"one-zero-eight","description":"InNoHassle Accounts service for accessing websites and Telegram bots using your Innopolils account.","archived":false,"fork":false,"pushed_at":"2025-05-31T22:02:45.000Z","size":329,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-01T09:27:06.551Z","etag":null,"topics":["fastapi","innohassle","python"],"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/one-zero-eight.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,"zenodo":null}},"created_at":"2023-09-11T11:04:03.000Z","updated_at":"2025-05-31T22:02:48.000Z","dependencies_parsed_at":"2024-02-19T15:07:58.324Z","dependency_job_id":"bd8cf808-3cd1-4cc1-abb8-9afbdb952518","html_url":"https://github.com/one-zero-eight/accounts","commit_stats":null,"previous_names":["one-zero-eight/innohassle-accounts","one-zero-eight/accounts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/one-zero-eight/accounts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-zero-eight%2Faccounts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-zero-eight%2Faccounts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-zero-eight%2Faccounts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-zero-eight%2Faccounts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/one-zero-eight","download_url":"https://codeload.github.com/one-zero-eight/accounts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-zero-eight%2Faccounts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266717708,"owners_count":23973384,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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","innohassle","python"],"created_at":"2025-05-07T13:54:40.741Z","updated_at":"2025-07-23T17:07:52.269Z","avatar_url":"https://github.com/one-zero-eight.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Accounts API | InNoHassle ecosystem\n\n\u003e https://api.innohassle.ru/accounts\n\n[![GitHub Actions pre-commit](https://img.shields.io/github/actions/workflow/status/one-zero-eight/InNoHassle-Accounts/pre-commit.yaml?label=pre-commit)](https://github.com/one-zero-eight/InNoHassle-Accounts/actions)\n\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=one-zero-eight_InNoHassle-Accounts\u0026metric=ncloc)](https://sonarcloud.io/summary/new_code?id=one-zero-eight_InNoHassle-Accounts)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=one-zero-eight_InNoHassle-Accounts\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=one-zero-eight_InNoHassle-Accounts)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=one-zero-eight_InNoHassle-Accounts\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=one-zero-eight_InNoHassle-Accounts)\n\n## Table of contents\n\nDid you know that GitHub supports table of\ncontents [by default](https://github.blog/changelog/2021-04-13-table-of-contents-support-in-markdown-files/) 🤔\n\n## About\n\nThis is the API for accounts service in InNoHassle ecosystem.\n\n### Features\n\n- 🧑‍🔧 User Management\n    - 🔑 Authenticate with Innopolis SSO\n    - 📱 Connect Telegram account\n    - ℹ️ Get user info\n- 🛡️ Tokens\n    - 🔒 Generate JWT tokens for other services in the ecosystem\n    - ✅ Check token validity with public key\n\n### Technologies\n\n- [Python 3.12](https://www.python.org/downloads/) \u0026 [Poetry](https://python-poetry.org/docs/)\n- [FastAPI](https://fastapi.tiangolo.com/) \u0026 [Pydantic](https://docs.pydantic.dev/latest/)\n- Database and ORM: [MongoDB](https://www.mongodb.com/), [Beanie](https://beanie-odm.dev/)\n- Formatting and linting: [Ruff](https://docs.astral.sh/ruff/), [pre-commit](https://pre-commit.com/)\n- Deployment: [Docker](https://www.docker.com/), [Docker Compose](https://docs.docker.com/compose/),\n  [GitHub Actions](https://github.com/features/actions)\n\n## Development\n\n### Getting started\n\n1. Install [Python 3.12](https://www.python.org/downloads/)\n2. Install [Poetry](https://python-poetry.org/docs/)\n3. Install project dependencies with [Poetry](https://python-poetry.org/docs/cli/#options-2).\n   ```bash\n   poetry install\n   ```\n4. Set up [pre-commit](https://pre-commit.com/) hooks:\n\n   ```bash\n   poetry run pre-commit install --install-hooks -t pre-commit -t commit-msg\n   ```\n5. Set up project settings file (check [settings.schema.yaml](settings.schema.yaml) for more info).\n   ```bash\n   cp settings.example.yaml settings.yaml\n   ```\n   Edit `settings.yaml` according to your needs.\n6. Set up a  [MongoDB](https://www.mongodb.com/) database instance.\n   \u003cdetails\u003e\n    \u003csummary\u003eUsing docker container\u003c/summary\u003e\n\n    - Set up database settings for [docker-compose](https://docs.docker.com/compose/) in `.env` file:\n      ```bash\n      cp .env.example .env\n      ```\n    - Run the database instance:\n      ```bash\n      docker compose up -d db\n      ```\n    - Make sure to set up the actual database connection in `settings.yaml`, for example:\n      ```yaml\n      database:\n        uri: mongodb://user:password@localhost:27017/db?authSource=admin\n      ```\n\n   \u003c/details\u003e\n\n**Set up PyCharm integrations**\n\n1. Ruff ([plugin](https://plugins.jetbrains.com/plugin/20574-ruff)).\n   It will lint and format your code. Make sure to enable `Use ruff format` option in plugin settings.\n2. Pydantic ([plugin](https://plugins.jetbrains.com/plugin/12861-pydantic)). It will fix PyCharm issues with\n   type-hinting.\n3. Conventional commits ([plugin](https://plugins.jetbrains.com/plugin/13389-conventional-commit)). It will help you\n   to write [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).\n\n### Run for development\n\n1. Run the database if you have not done it yet\n2. Run the ASGI server\n   ```bash\n   poetry run python -m src.api\n   ```\n   OR using uvicorn directly\n   ```bash\n   poetry run uvicorn src.api.app:app --use-colors --proxy-headers --forwarded-allow-ips=*\n   ```\n\nNow the API is running on http://localhost:8000. Good job!\n\n### Deployment\n\nWe use Docker with Docker Compose plugin to run the website on servers.\n\n1. Copy the file with environment variables: `cp .env.example .env`\n2. Change environment variables in the `.env` file\n3. Copy the file with settings: `cp settings.example.yaml settings.yaml`\n4. Change settings in the `settings.yaml` file according to your needs\n   (check [settings.schema.yaml](settings.schema.yaml) for more info)\n5. Install Docker with Docker Compose\n6. Build a Docker image: `docker compose build --pull`\n7. Run the container: `docker compose up --detach`\n8. Check the logs: `docker compose logs -f`\n\n## Contributing\n\nWe are open to contributions of any kind.\nYou can help us with code, bugs, design, documentation, media, new ideas, etc.\nIf you are interested in contributing, please read\nour [contribution guide](https://github.com/one-zero-eight/.github/blob/main/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fone-zero-eight%2Faccounts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fone-zero-eight%2Faccounts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fone-zero-eight%2Faccounts/lists"}