{"id":25426759,"url":"https://github.com/yevheniidatsenko/goit-pythonweb-hw-10","last_synced_at":"2026-05-01T16:31:39.442Z","repository":{"id":276689325,"uuid":"929842549","full_name":"yevheniidatsenko/goit-pythonweb-hw-10","owner":"yevheniidatsenko","description":"📂 Hometask - FullStack Web Development with Python (FastAPI | Authentication)","archived":false,"fork":false,"pushed_at":"2025-02-09T21:00:11.000Z","size":551,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-08T22:03:22.838Z","etag":null,"topics":["docker-compose","fastapi","goit-pythonweb-hw-10","jwt-authentication","python"],"latest_commit_sha":null,"homepage":"","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/yevheniidatsenko.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}},"created_at":"2025-02-09T14:37:32.000Z","updated_at":"2025-02-09T21:02:36.000Z","dependencies_parsed_at":"2025-02-09T21:29:46.161Z","dependency_job_id":"47aa9977-1d64-4fba-ab24-c3bb65726889","html_url":"https://github.com/yevheniidatsenko/goit-pythonweb-hw-10","commit_stats":null,"previous_names":["yevheniidatsenko/goit-pythonweb-hw-10"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yevheniidatsenko/goit-pythonweb-hw-10","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yevheniidatsenko%2Fgoit-pythonweb-hw-10","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yevheniidatsenko%2Fgoit-pythonweb-hw-10/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yevheniidatsenko%2Fgoit-pythonweb-hw-10/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yevheniidatsenko%2Fgoit-pythonweb-hw-10/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yevheniidatsenko","download_url":"https://codeload.github.com/yevheniidatsenko/goit-pythonweb-hw-10/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yevheniidatsenko%2Fgoit-pythonweb-hw-10/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32504997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["docker-compose","fastapi","goit-pythonweb-hw-10","jwt-authentication","python"],"created_at":"2025-02-17T00:21:47.894Z","updated_at":"2026-05-01T16:31:39.396Z","avatar_url":"https://github.com/yevheniidatsenko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST API Application - Enhanced Features\n\nThis project builds upon the previous REST API application, adding essential features for security, user management, and data handling.\n\n## Key Features\n\n- **Authentication:** Implemented user authentication with secure password hashing.\n- **Authorization (JWT):** JWT-based authorization to protect contact operations, ensuring only registered users can access them.\n- **User-Specific Data:** Contacts are associated with users, guaranteeing users can only access their own data.\n- **Email Verification:** Registration includes email verification to ensure valid user accounts.\n- **Rate Limiting:** Implemented rate limiting for the `/me` user route to prevent abuse.\n- **CORS Enabled:** Cross-Origin Resource Sharing (CORS) enabled for secure access from different domains.\n- **Avatar Upload:** Users can update their profile avatar using Cloudinary for image storage and management.\n\n## Technical Details\n\n- **Authentication:**\n  - Uses password hashing (e.g., bcrypt) for secure storage.\n  - Returns HTTP 409 Conflict for duplicate email registrations.\n  - Returns HTTP 201 Created on successful registration.\n  - Returns HTTP 401 Unauthorized for invalid login credentials.\n- **Authorization:**\n  - Uses JWT access tokens for secure API access.\n  - Access token passed in the `Authorization` header as `Bearer \u003ctoken\u003e`.\n- **Data Access:**\n  - Contact creation stores the `user_id` to associate contacts with users.\n  - API endpoints verify the `user_id` from the JWT to ensure users only access their own contacts.\n- **Email Verification:**\n  - Generates a unique token upon registration and sends a verification email.\n  - Verifies the token when the user clicks the link, marking the account as verified.\n- **Rate Limiting:**\n  - Limits requests to the `/me` route to prevent abuse (e.g., 5 requests per minute).\n- **CORS:**\n  - Configured to allow requests from specific origins (domains).\n- **Avatar Upload:**\n  - Integrates with Cloudinary to upload and store user avatars.\n  - Saves the Cloudinary URL in the user profile.\n\n## General Requirements\n\n- **.env File:** All sensitive information (API keys, database credentials, etc.) is stored in a `.env` file.\n- **Docker Compose:** All services (API, database) are orchestrated using Docker Compose for easy setup and deployment.\n- **HTTP Status Codes:** Correct HTTP status codes are used for various scenarios (e.g., 200, 201, 400, 401, 409).\n\n## Results\n\n![Docker](./screenshots/SCR_1.png)\n![API Screenshot](./screenshots/SCR_2.png)\n![API AUTH](./screenshots/SCR_3.png)\n![API AUTH](./screenshots/SCR_4.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyevheniidatsenko%2Fgoit-pythonweb-hw-10","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyevheniidatsenko%2Fgoit-pythonweb-hw-10","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyevheniidatsenko%2Fgoit-pythonweb-hw-10/lists"}