{"id":41038725,"url":"https://github.com/devcavin/pesa-core","last_synced_at":"2026-01-22T10:40:09.611Z","repository":{"id":305683391,"uuid":"1022810021","full_name":"devcavin/pesa-core","owner":"devcavin","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-24T13:01:56.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-25T12:47:33.349Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/devcavin.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-19T22:00:50.000Z","updated_at":"2025-12-24T13:02:00.000Z","dependencies_parsed_at":"2025-12-20T12:02:22.756Z","dependency_job_id":null,"html_url":"https://github.com/devcavin/pesa-core","commit_stats":null,"previous_names":["killercavin/bankapp","devcavin/bankapp","devcavin/bank-app","devcavin/pesa-core"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devcavin/pesa-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcavin%2Fpesa-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcavin%2Fpesa-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcavin%2Fpesa-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcavin%2Fpesa-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devcavin","download_url":"https://codeload.github.com/devcavin/pesa-core/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcavin%2Fpesa-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28661875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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":[],"created_at":"2026-01-22T10:40:08.454Z","updated_at":"2026-01-22T10:40:09.603Z","avatar_url":"https://github.com/devcavin.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pesacore (PesaCore Backend)\n\nA robust, transactional Fintech backend built with **Kotlin** and **Spring Boot**. This system handles atomic financial transactions (Deposits, Withdrawals, P2P Transfers) with double-entry accounting principles, audit trails for failed transactions, and strict \"Guard Clause\" validation logic.\n\n## Key Features\n\n- **Atomic Transactions:** Uses `@Transactional` to ensure ACID compliance. Money never vanishes; it is either safely transferred or the entire operation rolls back.\n- **Audit Trail:** Implements a \"No-Rollback\" policy for specific exceptions (`InsufficientFunds`, `InvalidAmount`), ensuring that **failed attempts are logged** in the database for security and support auditing.\n- **Double-Entry Ledger:** Every transfer creates two transaction records (Sender Debit + Receiver Credit) to ensure accounting consistency.\n- **Privacy-First API:** Transfer responses return full details to the sender but mask sensitive receiver data (e.g., balance) using dedicated DTOs (`RecipientResponse`).\n- **Robust Error Handling:** A centralized `GlobalExceptionHandler` converts both Validation errors (`@Valid`) and Business logic errors into a consistent, clean JSON format.\n\n## Tech Stack\n\n- **Language:** Kotlin (JVM)\n- **Framework:** Spring Boot 4 (Web, JPA, Validation)\n- **Database:** PostgreSQL\n- **Build Tool:** Gradle(Kotlin DSL)\n- **Architecture:** Layered Architecture (Controller → Service → Repository) with extensive DTO mapping.\n\n## API Endpoints\n\n### Accounts\n\n| Method | Endpoint | Description |\n|------|---------|-------------|\n| POST | /api/v1/accounts | Create a new account |\n| GET | /api/v1/accounts/{id} | Get account details |\n\n### Transactions\n\n| Method | Endpoint | Description |\n|------|---------|-------------|\n| POST | /.../deposit | Deposit funds |\n| POST | /.../withdraw | Withdraw funds |\n| POST | /.../transfer | P2P Transfer |\n\n## Known Limitations \u0026 Roadmap\n\nWhile the core banking ledger is ACID-compliant and supports atomic transfers, the following features were excluded \nfrom the MVP scope to focus on architectural constraints:\n - Transaction Fees: Currently, all transfers are zero-fee. A Tariff Engine (configurable fees based on tiers) is \nplanned for v2.\n - Currency Conversion: Multi-currency transfers assume a 1:1 exchange rate currently.\n - Idempotency Keys: To prevent double-spending on network retries.\n - Authentication: The system currently assumes an authenticated context; JWT/OAuth2 integration is the next immediate \n   step.\n\n## Local Setup\n\n```bash\ngit clone https://github.com/devcavin/pesacore.git\ncd pesacore\n\n./gradlew bootRun # Linux/MacOS\ngradlew bootRun # Windows(Powershell/CMD)\n\n# run compose\ndocker-compose up --build\ndocker-compose up\n\npodman-compose up --build\npodman-compose up\n\n# Build Docker image\ndocker build -t pesacore:latest . # docker build --network=host -t pesacore . # for networking issues\n\n# podman\npodman build -t pesacore:latest .\n\n# Run locally\ndocker run -p 8080:8080 pesacore:latest\npodman run -p 8080:8080 pesacore:latest # for podman\n\ncurl http://localhost:8080\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevcavin%2Fpesa-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevcavin%2Fpesa-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevcavin%2Fpesa-core/lists"}