{"id":18068459,"url":"https://github.com/sxw111/referral-system-api","last_synced_at":"2026-04-11T09:46:12.100Z","repository":{"id":257842177,"uuid":"872639332","full_name":"sxw111/referral-system-api","owner":"sxw111","description":"tz","archived":false,"fork":false,"pushed_at":"2024-10-30T14:15:19.000Z","size":409,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T16:13:04.319Z","etag":null,"topics":["alembic","asynchronous","celery","docker","docker-compose","fastapi","jwt","oauth2","postgresql","pydantic","pytest","python","redis","sqlalchemy"],"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/sxw111.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-10-14T19:47:38.000Z","updated_at":"2024-12-12T14:52:19.000Z","dependencies_parsed_at":"2024-12-18T22:40:40.157Z","dependency_job_id":"5b6d1a08-3c15-45c2-8ab0-9ac9e36cc90d","html_url":"https://github.com/sxw111/referral-system-api","commit_stats":null,"previous_names":["sxw111/referral-system-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sxw111/referral-system-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sxw111%2Freferral-system-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sxw111%2Freferral-system-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sxw111%2Freferral-system-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sxw111%2Freferral-system-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sxw111","download_url":"https://codeload.github.com/sxw111/referral-system-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sxw111%2Freferral-system-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31676210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T08:18:19.405Z","status":"ssl_error","status_checked_at":"2026-04-11T08:17:08.892Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["alembic","asynchronous","celery","docker","docker-compose","fastapi","jwt","oauth2","postgresql","pydantic","pytest","python","redis","sqlalchemy"],"created_at":"2024-10-31T08:06:35.042Z","updated_at":"2026-04-11T09:46:12.079Z","avatar_url":"https://github.com/sxw111.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Referral System API\n\nAPI with `JWT` / `Google OAuth2` authentication, a referral system, and email verification during registration through the `hunter.io` service.\n\n## Tech Stack\n\n- **Backend Framework**: [FastAPI](https://fastapi.tiangolo.com/)\n- **Database**: [PostgreSQL](https://www.postgresql.org/)\n- **Caching**: [Redis](https://redis.io/)\n- **Containerization**: [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/)\n- **Migrations**: [Alembic](https://alembic.sqlalchemy.org/)\n- **ORM**: [SQLAlchemy](https://www.sqlalchemy.org/)\n- **Task Queue**: [Celery](https://docs.celeryq.dev/)\n- **Validation and Serialization**: [Pydantic](https://pydantic-docs.helpmanual.io/)\n- **Testing**: [pytest](https://pytest.org/)\n- **Asynchronous Programming**: Fully asynchronous implementation\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/sxw111/referral-system-api.git\n   cd referral-system-api\n   ```\n\n2. Edit the `.env` file by adding your data.\n\n3. Build and Run the Docker Containers:\n\n   ```bash\n   docker-compose up --build\n   ```\n\n4. Open your browser and go to http://localhost:8000/docs to view the Swagger documentation and interact with the API.\n\n## Project Structure\n\n```shell\n.vscode/\n├── settings.json                       # VSCode settings\napp/\n├── auth/\n    ├── google_auth.py                  # Google OAuth authentication endpoints and setup\n    ├── models.py                       # User SQLAlchemy and Pydantic models\n    ├── service.py                      # Business logic for authentication and user operations\n    ├── views.py                        # API endpoints for authentication and user management\n├── database/\n    ├── core.py                         # Core database connection and setup\n├── jwt/\n    ├── models.py                       # Pydantic models related to JWT handling\n├── referrals/\n    ├── models.py                       # Referrals Pydantic models\n    ├── service.py                      # Business logic for referral system operations\n    ├── utils.py                        # Utility functions for the referral system\n    ├── views.py                        # API endpoints for referral system management\n├── api.py                              # Defines the main router and includes all application routers\n├── config.py                           # Configuration settings for the application, including environment variables and application metadata\n├── exceptions.py                       # Custom exception classes for error handling\n├── main.py                             # Entry point for the FastAPI application\n├── models.py                           # Base class for Pydantic models with custom configuration\n├── security.py                         # Security-related functions\nmigrations/                             # Alembic migrations\ntests/\n.dockerignore                           # Excludes unnecessary files and directories from Docker image builds\n.env                                    # File for storing sensitive environment variables\n.flake8                                 # Configuration file for Flake8 code linter\n.gitattributes                          # Configuration file for specifying attributes for Git repositories\n.gitignore                              # File specifying files and directories Git should ignore\n.pre-commit-config.yaml                 # Configuration file for managing pre-commit hooks to automate code checks and formatting\nDockerfile                              # Script defining steps to create a Docker image\nLICENSE                                 # File containing terms and conditions for software usage and distribution\nREADME.md                               # Project overview and instructions for users and developers\nalembic.ini                             # Configuration file for Alembic database migrations\ndocker-compose.yml                      # Configuration file for Docker Compose\npoetry.lock                             # Automatically generated file containing locked dependencies for Poetry\npyproject.toml                          # Configuration file for Python projects, specifying project metadata and dependencies\n```\n\n## Contributing\n\nYour contributions are appreciated! Fork the repository, open issues, and submit pull requests.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsxw111%2Freferral-system-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsxw111%2Freferral-system-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsxw111%2Freferral-system-api/lists"}