{"id":24534408,"url":"https://github.com/al-chris/crypto-payment-system","last_synced_at":"2026-05-13T07:41:18.673Z","repository":{"id":272182789,"uuid":"915756574","full_name":"al-chris/Crypto-Payment-System","owner":"al-chris","description":"A simple Ethereum payment solution in Python FastAPI","archived":false,"fork":false,"pushed_at":"2025-01-20T07:03:29.000Z","size":29772,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T11:17:01.452Z","etag":null,"topics":["blockchain","ethereum","fastapi","open-source","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/al-chris.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-01-12T18:08:15.000Z","updated_at":"2025-01-15T17:33:48.000Z","dependencies_parsed_at":"2025-01-12T19:34:46.749Z","dependency_job_id":null,"html_url":"https://github.com/al-chris/Crypto-Payment-System","commit_stats":null,"previous_names":["al-chris/crypto-payment-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-chris%2FCrypto-Payment-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-chris%2FCrypto-Payment-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-chris%2FCrypto-Payment-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-chris%2FCrypto-Payment-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/al-chris","download_url":"https://codeload.github.com/al-chris/Crypto-Payment-System/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243797624,"owners_count":20349435,"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":["blockchain","ethereum","fastapi","open-source","python"],"created_at":"2025-01-22T11:17:08.254Z","updated_at":"2026-05-13T07:41:18.665Z","avatar_url":"https://github.com/al-chris.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crypto Payment System\n\nThis project is a Crypto Payment System API built with FastAPI and Etherscan API. It allows creates wallets for users to make transactions to, submit transactions, and monitor transaction statuses.\nIt only supports Ethereum at the moment. The project uses uv for fast and reliable Python package management.\n\n## Features\n\n- User registration and authentication\n- Wallet creation and management\n- Transaction submission and monitoring\n- Rate limiting to prevent abuse\n- CORS support for frontend integration\n\n## Requirements\n\n- Python 3.12+\n- PostgreSQL\n- Redis\n- Docker (for containerized deployment)\n- uv (Python package manager)\n\n---\n\n# Architecture Diagrams\n\n## Component Diagram\n\n![Component Diagram](docs/uml/component_diagram.svg)\n\n---\n\n## Sequence Diagrams\n\n### 1. User Registration\n\n![User Registration](docs/uml/user_registration.svg)\n\n---\n\n### 2. Wallet Creation\n\n![Wallet Creation](docs/uml/wallet_creation.svg)\n\n---\n\n### 3. Transaction Submission\n\n![Transaction Submission](docs/uml/transaction_submission.svg)\n\n---\n\n### 4. Transaction Monitoring (Celery Task)\n\n![Transaction Monitoring](docs/uml/transaction_monitoring.svg)\n\n---\n\n## Class Diagram\n\n![Class Diagram](docs/uml/class_diagram.svg)\n\n---\n\n## Setup\n\n### Environment Variables\n\nCreate a `.env` file in the project root with the following variables:\n\n```\nDATABASE_URL=postgresql+asyncpg://user:password@db/crypto_payments\nMNEMONIC=your_mnemonic_seed_phrase\nCELERY_BROKER_URL=redis://redis:6379/0\nCELERY_RESULT_BACKEND=redis://redis:6379/0\nETHERSCAN_API_KEY=your_etherscan_api_key\n```\n\n### Docker\n\nTo run the project using Docker, use the following commands:\n\n```sh\ndocker compose up --build\n```\n\nThis will start the PostgreSQL, Redis, FastAPI, and Celery services. The application runs as a non-root user for security, and uses uv for fast Python package management.\n\n### Manual Setup\n\n1. Install uv (if not already installed):\n\n```sh\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\n2. Install dependencies using uv:\n\n```sh\nuv sync\n```\n\n3. To generate or update `requirements.txt` (for Docker builds):\n\n```sh\nuv pip freeze \u003e requirements.txt\n```\nThen, add ` ; sys_platform == 'win32'` after the `pywin32` line in `requirements.txt` if it exists.\nso, it goes from something like \n```\npywin32==310 \n```\nto\n```\npywin32==310 ; sys_platform == 'win32'\n```\n\n4. Run the FastAPI application:\n\n```sh\nuv run uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload\n```\n\n5. Start the Celery worker and beat:\n\n```sh\nuv run celery -A app.celery_app.celery worker --loglevel=info\nuv run celery -A app.celery_app.celery beat --loglevel=info\n```\n\n## Usage\n\n### API Endpoints\n\n- `POST /users/`: Register a new user\n- `POST /auth/login`: Login and obtain a token\n- `POST /payments/initiate`: Initiate a new wallet\n- `POST /payments/submit`: Submit a transaction\n- `GET /payments/transactions/{transaction_id}`: Get transaction status\n- `GET /payments/my-wallets`: Get all wallets for the current user\n\n### Running Tests\n\nTo run the tests, use the following command:\n\n```sh\npytest\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal-chris%2Fcrypto-payment-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fal-chris%2Fcrypto-payment-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal-chris%2Fcrypto-payment-system/lists"}