{"id":38077563,"url":"https://github.com/mtnvencenzo/cezzis-com-accounts-api","last_synced_at":"2026-04-11T05:01:15.144Z","repository":{"id":332881737,"uuid":"1133550604","full_name":"mtnvencenzo/cezzis-com-accounts-api","owner":"mtnvencenzo","description":"FastAPI-based backend for user account management, authentication, and profile operations. Implements OAuth 2.0 with PKCE flow, comprehensive profile management, and account settings for the Cezzis.com platform.","archived":false,"fork":false,"pushed_at":"2026-03-30T09:43:31.000Z","size":814,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T04:52:59.597Z","etag":null,"topics":["cosmosdb","fastapi","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mtnvencenzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":".github/SUPPORT.md","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-01-13T13:58:39.000Z","updated_at":"2026-03-29T22:27:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mtnvencenzo/cezzis-com-accounts-api","commit_stats":null,"previous_names":["mtnvencenzo/cezzis-com-accounts-api"],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/mtnvencenzo/cezzis-com-accounts-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtnvencenzo%2Fcezzis-com-accounts-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtnvencenzo%2Fcezzis-com-accounts-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtnvencenzo%2Fcezzis-com-accounts-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtnvencenzo%2Fcezzis-com-accounts-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtnvencenzo","download_url":"https://codeload.github.com/mtnvencenzo/cezzis-com-accounts-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtnvencenzo%2Fcezzis-com-accounts-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31536473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"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":["cosmosdb","fastapi","python"],"created_at":"2026-01-16T20:45:36.596Z","updated_at":"2026-04-08T02:02:56.437Z","avatar_url":"https://github.com/mtnvencenzo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Cezzis.com Accounts API\n\nThis repository provides the backend API for user account management, profile operations, and authentication as part of the Cezzis.com platform.\n\n## Overview\n\n**Status:** Work In Progress (WIP) — This project is in its early stages and actively under development.\n\nThe Accounts API manages user profiles, authentication, preferences, and account-related operations for the Cezzis.com ecosystem. This API is being migrated from the existing cocktails API to provide a dedicated microservice for account management.\n\n### Key Features\n- FastAPI-based RESTful API with OpenAPI 3.0 specification\n- OAuth 2.0 authentication with PKCE flow\n- Comprehensive user profile management\n- API key authorization support (APIM Host Key)\n- OpenTelemetry instrumentation for observability\n- Modular clean architecture (Application/Domain/Infrastructure layers)\n- Scalar API documentation at `/scalar/`\n- Health check endpoints\n- Structured error handling with RFC 7807 Problem Details\n\n### Architecture\n```\nsrc/cezzis_com_accounts_api/\n├── apis/              # API endpoints (health check, documentation)\n├── application/       # Application layer\n│   ├── behaviors/     # Cross-cutting concerns (auth, error handling, OpenTelemetry)\n│   └── concerns/      # Feature-specific logic\n├── domain/            # Domain models and configuration\n│   └── config/        # Application settings (OAuth, OTEL, app options)\n└── infrastructure/    # External integrations and repositories\n```\n## API Endpoints\n\n### Account Profile Management\nThe following endpoints will be migrated to this API:\n\n#### Profile Operations\n- **POST** `/api/v1/accounts/owned/profile` - Login/create account profile\n- **GET** `/api/v1/accounts/owned/profile` - Get authenticated user's profile\n- **PUT** `/api/v1/accounts/owned/profile` - Update profile information\n\n#### Account Settings\n- **PUT** `/api/v1/accounts/owned/profile/email` - Change email address\n- **PUT** `/api/v1/accounts/owned/profile/username` - Change username\n- **PUT** `/api/v1/accounts/owned/profile/password` - Initiate password change flow\n- **PUT** `/api/v1/accounts/owned/profile/accessibility` - Update accessibility settings\n- **PUT** `/api/v1/accounts/owned/profile/notifications` - Update notification preferences\n- **POST** `/api/v1/accounts/owned/profile/image` - Upload profile image\n\n#### Cocktail-Related Profile Features\n- **PUT** `/api/v1/accounts/owned/profile/cocktails/favorites` - Manage favorite cocktails\n- **POST** `/api/v1/accounts/owned/profile/cocktails/ratings` - Rate a cocktail\n- **GET** `/api/v1/accounts/owned/profile/cocktails/ratings` - Get user's cocktail ratings\n- **POST** `/api/v1/accounts/owned/profile/cocktails/recommendations` - Submit cocktail recommendation\n\n### Authentication\nAll endpoints require:\n- **X-Key** header: APIM subscription key\n- **OAuth 2.0** Bearer token with appropriate scopes\n\n#### OAuth Scopes\n- **`read:owned-account`** - Required for reading user's own account data\n- **`write:owned-account`** - Required for modifying user's own account data\n\nMost write operations require both scopes, while read-only operations only require the `read:owned-account` scope.\n\n## Getting Started\n\n### Prerequisites\n- Python 3.12 or higher\n- Poetry for dependency management\n\n### Installation\n\nInstall dependencies using Poetry:\n\n```bash\npoetry install\n```\n\n### Configuration\n\nThe API uses environment variables for configuration. Key settings include:\n- OAuth 2.0 settings (domain, client ID, audience)\n- OpenTelemetry configuration\n- Application options (service name, version, host)\n\n### Running the API\n\n\n#### Using VS Code Debugger (Recommended)\nLaunch the API in debug mode using the **\"Debug: Accounts API\"** configuration (F5):\n- Runs on port `8015`\n- Auto-reload enabled\n- Automatically opens Scalar documentation when ready\n- Sets `ENV=loc` environment variable\n\n#### Using Command Line\nFrom the project root, start the development server:\n\n```bash\ncd src/cezzis_com_accounts_api\nENV=loc uvicorn main:app --reload --port 8015\n```\n\nOr using Poetry from the project root:\n\n```bash\npoetry run uvicorn src.cezzis_com_accounts_api.main:app --reload --port 8015\n```\n\nThe API will be available at `http://localhost:8015`.\n\n### API Documentation\n\nOnce running, access the interactive API documentation:\n- **Scalar UI**: `http://localhost:8015/scalar/`\n- **OpenAPI JSON**: `http://localhost:8015/scalar/openapi.json`\n\nYou can also use the VS Code task **\"OpenApiRoot\"** to open the Scalar documentation in your browser.\n\n### Testing\n\nRun the test suite:\n\n```bash\npoetry run pytest\n```\n\n### Testing\n\nRun the test suite:\n\n```bash\npoetry run pytest\n```\n\nRun tests with coverage:\n\n```bash\npoetry run pytest --cov=src/cezzis_com_accounts_api --cov-report=html\n```\n\n## Technology Stack\n\n- **FastAPI** - Modern Python web framework\n- **Pydantic** - Data validation and settings management\n- **OAuth 2.0** - Authentication and authorization (via `cezzis-oauth` libraries)\n- **OpenTelemetry** - Distributed tracing and observability\n- **Scalar** - API documentation UI\n- **Mediatr** - CQRS pattern implementation\n- **Injector** - Dependency injection\n- **pytest** - Testing framework\n\n## Project Structure\n\n- `src/cezzis_com_accounts_api/` - Main application code\n  - `main.py` - Application entry point\n  - `app_module.py` - Dependency injection configuration\n  - `apis/` - REST API endpoints\n  - `application/behaviors/` - Middleware and cross-cutting concerns\n  - `application/concerns/` - Business logic and use cases\n  - `domain/config/` - Configuration models\n  - `infrastructure/repositories/` - Data access layer\n- `test/` - Test suite\n  - `unit/` - Unit tests\n  - `integration/` - Integration tests\n- `terraform/` - Infrastructure as Code\n\n## Contributing\n\nContributions are welcome! Please open issues or pull requests to help improve the API and its capabilities.\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtnvencenzo%2Fcezzis-com-accounts-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtnvencenzo%2Fcezzis-com-accounts-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtnvencenzo%2Fcezzis-com-accounts-api/lists"}