{"id":30738723,"url":"https://github.com/sanketInTech/Rupee-Transfer-API","last_synced_at":"2025-12-30T21:31:21.314Z","repository":{"id":312564573,"uuid":"1047905769","full_name":"sanketInTech/rupeexfer","owner":"sanketInTech","description":"RupeeXfer is a high-performance money transfer API that handles secure transactions with speed and reliability. Built with Spring Boot , Java and MySQL. it ensures fast, safe transfers between accounts with complete transaction tracking. The system includes robust security features and detailed transaction history. Easy to integrate and scale.","archived":false,"fork":false,"pushed_at":"2025-08-31T14:16:37.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-31T16:07:46.557Z","etag":null,"topics":["banking-applications","docker","finance","java","jwt-authentication","mysql","postgresql","rest-api","spring-boot","spring-data-jpa","spring-security"],"latest_commit_sha":null,"homepage":"","language":"Java","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/sanketInTech.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-31T13:55:13.000Z","updated_at":"2025-08-31T14:26:53.000Z","dependencies_parsed_at":"2025-08-31T16:07:56.009Z","dependency_job_id":"3de6c828-6c93-4a9e-86db-a68dd0541b16","html_url":"https://github.com/sanketInTech/rupeexfer","commit_stats":null,"previous_names":["sanketintech/rupeexfer"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sanketInTech/rupeexfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanketInTech%2Frupeexfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanketInTech%2Frupeexfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanketInTech%2Frupeexfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanketInTech%2Frupeexfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanketInTech","download_url":"https://codeload.github.com/sanketInTech/rupeexfer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanketInTech%2Frupeexfer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273517592,"owners_count":25119801,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"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":["banking-applications","docker","finance","java","jwt-authentication","mysql","postgresql","rest-api","spring-boot","spring-data-jpa","spring-security"],"created_at":"2025-09-03T22:02:49.815Z","updated_at":"2025-12-30T21:31:21.302Z","avatar_url":"https://github.com/sanketInTech.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rupee Transfer — Secure Fund Transfer API\n\n[![Java](https://img.shields.io/badge/Java-17-orange?logo=java)](https://www.oracle.com/java/)\n[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.1.0-brightgreen?logo=spring)](https://spring.io/projects/spring-boot)\n[![Spring Security](https://img.shields.io/badge/Spring%20Security-6.1.0-brightgreen?logo=springsecurity)](https://spring.io/projects/spring-security)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15-blue?logo=postgresql)](https://www.postgresql.org/)\n[![Docker](https://img.shields.io/badge/Docker-✓-blue?logo=docker)](https://www.docker.com/)\n[![Swagger](https://img.shields.io/badge/Swagger-✓-green?logo=swagger)](https://swagger.io/)\n\n##  Overview\n\nRupee Transfer is a high-performance, Payment API that implements banking-grade transaction management with ACID compliance. Built with Spring Boot 3 and Java 17, it demonstrates modern backend development practices including distributed transactions, optimistic locking, and Spring security.\n\n## Features\n\n-  **Atomic Money Transfers** - ACID-compliant fund transfers with rollback support\n-  **Optimistic Locking** - Prevents double-spending in high-concurrency scenarios\n-  **JWT Authentication** - Stateless, secure user authentication\n-  **Comprehensive API Docs** - Interactive documentation with Swagger UI\n-  **Docker Support** - Containerized deployment with Docker Compose\n-  **Test Coverage** - Unit, integration, and concurrency tests\n-  **Performance Optimized** - Connection pooling, batch processing, and caching\n\n##  Project Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                       Client Applications                   │\n└───────────────────────────────┬─────────────────────────────┘\n                                │\n┌───────────────────────────────▼─────────────────────────────┐\n│                API Gateway (Spring Cloud Gateway)           │\n└───────────────────────────────┬─────────────────────────────┘\n                                │\n┌───────────────────────────────▼─────────────────────────────┐\n│                      Rupee Transfer API (This Service)      │\n│  ┌───────────────────────────────────────────────────────┐  │\n│  │                   REST Controllers                    │  │\n│  └───────────────┬───────────────────────┬───────────────┘  │\n│                  │                       │                  │\n│  ┌───────────────▼───────┐ ┌────────────▼───────────────┐   │\n│  │    Account Service    │ │    Transaction Service     │   │\n│  └───────────────┬───────┘ └────────────┬───────────────┘   │\n│                  │                       │                  │\n│  ┌───────────────▼───────────────────────▼───────────────┐  │\n│  │                    Repository Layer                   │  │\n│  └───────────────────────────┬───────────────────────────┘  │\n│                              │                              │\n└──────────────────────────────┼──────────────────────────────┘\n                               │\n                 ┌─────────────┴───────────────┐\n                 │                             │\n    ┌────────────▼───────┐        ┌────────────▼───────┐\n    │   PostgreSQL DB    │        │    H2 (for dev)    │\n    └────────────────────┘        └────────────────────┘\n```\n\n##  Tech Stack\n\n- **Core**: Java 17, Spring Boot 3.1.0\n- **Security**: Spring Security 6.1.0, JWT, BCrypt\n- **Database**: PostgreSQL 15, H2 (development)\n- **Data Access**: Spring Data JPA, Hibernate 6.2.0\n- **API Docs**: SpringDoc OpenAPI 3.0\n- **Build**: Maven 3.8.6+\n- **Containerization**: Docker 20.10+, Docker Compose\n- **Testing**: JUnit 5, TestContainers, MockMVC\n\n##  Quickstart\n\n### Local Development (Database)\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/rupeexfer.git\ncd rupeexfer\n\n# Run with Maven\nmvn spring-boot:run -Dspring-boot.run.profiles=dev\n```\nAccess the application at `http://localhost:8080`\n\n### Docker with PostgreSQL\n\n```bash\ndocker-compose up --build\n```\n\n### Environment Variables\n\n| Variable           | Default (Dev)                     | Description                     |\n|--------------------|----------------------------------|---------------------------------|\n| `SPRING_PROFILES_ACTIVE` | `dev`                          | Active Spring profile          |\n| `DB_URL`           | `jdbc:h2:mem:rupeexfer`         | Database connection URL         |\n| `DB_USERNAME`      | `sa`                            | Database username              |\n| `DB_PASSWORD`      | (empty)                         | Database password              |\n| `JWT_SECRET`       | `your-256-bit-secret`           | JWT signing key                |\n| `JWT_EXPIRATION_MS`| `86400000` (24h)                | JWT expiration time in ms      |\n\n##  API Endpoints\n\n| Method | Endpoint | Description | Auth Required |\n|--------|----------|-------------|---------------|\n| `POST` | `/api/auth/signin` | User authentication | No |\n| `POST` | `/api/accounts` | Create new account | Yes |\n| `GET` | `/api/accounts/{accountNumber}/balance` | Get balance | Yes |\n| `POST` | `/api/transactions/transfer` | Transfer funds | Yes |\n| `GET` | `/api/accounts/{accountNumber}/transactions` | Transaction history | Yes |\n\n##  Example Requests\n\n### 1. Create Account\n```bash\ncurl -X POST 'http://localhost:8080/api/accounts' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Authorization: Bearer YOUR_JWT_TOKEN' \\\n  -d '{\n    \"accountType\": \"SAVINGS\",\n    \"initialBalance\": 1000.00\n  }'\n```\n\n### 2. Transfer Funds\n```bash\ncurl -X POST 'http://localhost:8080/api/transactions/transfer' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Authorization: Bearer YOUR_JWT_TOKEN' \\\n  -d '{\n    \"sourceAccountNumber\": \"ACC123456\",\n    \"destinationAccountNumber\": \"ACC789012\",\n    \"amount\": 100.00,\n    \"description\": \"Dinner bill\"\n  }'\n```\n\n### 3. Get Transaction History\n```bash\ncurl 'http://localhost:8080/api/accounts/ACC123456/transactions?page=0\u0026size=10' \\\n  -H 'Authorization: Bearer YOUR_JWT_TOKEN'\n```\n\n##  Testing\n\nRun the complete test suite:\n```bash\nmvn test\n```\n\nTest categories:\n- Unit tests (`*Test.java`)\n- Integration tests (`*IT.java`)\n\n##  Design Choices\n\n### Optimistic Locking\n- Prevents lost updates in concurrent transfer scenarios\n- Uses `@Version` for automatic conflict detection\n- Throws `OptimisticLockingFailureException` on conflicts\n\n### ACID Compliance\n- All money transfers are wrapped in `@Transactional`\n- Automatic rollback on any failure\n- Consistent state guaranteed at all times\n\n### Immutable Ledger\n- All transactions are append-only\n- No updates/deletes on transaction records\n- Complete audit trail for compliance\n\n### Idempotency\n- Support for idempotency keys in transfer requests\n- Prevents duplicate processing of the same request\n- Essential for reliable retries\n\n## Deployment\n\n### Build JAR\n```bash\nmvn clean package\n```\n\n### Run JAR\n```bash\njava -jar target/rupeexfer-0.0.1-SNAPSHOT.jar\n```\n\n### Production Deployment\nFor production deployment, it's recommended to:\n1. Use HTTPS\n2. Set strong database credentials\n3. Configure proper JWT secret\n4. Enable proper logging and monitoring\n5. Set up proper backup strategy\n\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nCopyright © 2025 Sanket Desai. All rights reserved.\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FsanketInTech%2FRupee-Transfer-API","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FsanketInTech%2FRupee-Transfer-API","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FsanketInTech%2FRupee-Transfer-API/lists"}