{"id":26562564,"url":"https://github.com/ismayilibrahimov/bankapp","last_synced_at":"2026-04-06T08:01:16.379Z","repository":{"id":283554281,"uuid":"952122700","full_name":"ismayilibrahimov/bankapp","owner":"ismayilibrahimov","description":"Bank application with customer, account, transaction features","archived":false,"fork":false,"pushed_at":"2025-05-27T06:37:09.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T10:09:54.941Z","etag":null,"topics":["java","postgresql","spring","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ismayilibrahimov.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}},"created_at":"2025-03-20T19:11:22.000Z","updated_at":"2025-05-27T06:37:12.000Z","dependencies_parsed_at":"2025-03-20T21:56:52.469Z","dependency_job_id":"e237e1c2-0b42-4010-b65d-50e88c8f6484","html_url":"https://github.com/ismayilibrahimov/bankapp","commit_stats":null,"previous_names":["ismayilibrahimov/bankapp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ismayilibrahimov/bankapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismayilibrahimov%2Fbankapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismayilibrahimov%2Fbankapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismayilibrahimov%2Fbankapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismayilibrahimov%2Fbankapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ismayilibrahimov","download_url":"https://codeload.github.com/ismayilibrahimov/bankapp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismayilibrahimov%2Fbankapp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"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":["java","postgresql","spring","spring-boot","spring-data-jpa","spring-security"],"created_at":"2025-03-22T15:18:09.785Z","updated_at":"2026-04-06T08:01:16.358Z","avatar_url":"https://github.com/ismayilibrahimov.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bank App (Spring Boot)\r\n\r\nA simple **Bank Application** built with **Spring Boot**, featuring authentication, account management, and transaction operations.\r\n\r\n---\r\n\r\n## 🚀 Features\r\n\r\n✅ **User Authentication and Authorization** (Register, Login, JWT Access \u0026 Refresh Tokens)  \r\n✅ **Account Management** (Create Account, View User Accounts)  \r\n✅ **Transaction Features**: (Deposit, Withdraw and Transfer)\r\n\r\n---\r\n\r\n## 🛠 Technologies Used\r\n\r\n- **Java 21**  \r\n- **Spring Boot 3**  \r\n- **Spring Security** (JWT based Authentication with Access \u0026 Refresh Tokens)\r\n- **PostgreSQL** (via Docker Compose)\r\n- **JPA (Hibernate)** for Database Interaction\r\n- **Lombok** (to reduce boilerplate code)\r\n- **Spring-Dotenv** in order to get environment variables from `.env` file\r\n\r\n---\r\n\r\n## ⚡ Getting Started\r\n\r\n### 1️⃣ Clone the Repository\r\n```bash\r\ngit clone https://github.com/ismayilibrahimov/bankapp.git\r\ncd bankapp\r\n```\r\n\r\n\r\n### 2️⃣ Configure Environment Variables\r\nCreate a `.env` file in the root directory:\r\n```bash\r\nDATABASE_URL=\r\nDATABASE_USERNAME=\r\nDATABASE_PASSWORD=\r\n\r\nJWT_SECRET_KEY=\r\nACCESS_TOKEN_EXPIRATION=\r\nREFRESH_TOKEN_EXPIRATION=\r\n```\r\n\r\n### 3️⃣ Run PostgreSQL with Docker Compose\r\n```bash\r\ndocker compose up -d\r\n```\r\n\r\n### 4️⃣ Run the Application\r\n```bash\r\n./mvnw spring-boot:run\r\n```\r\n---\r\n\r\n## API Endpoints\r\nThis section provides details on how to interact with the Bank App using its REST API. The endpoints are categorized into authentication, account management, and transaction operations.\r\n\r\n\r\n### 🔑 Authentication API\r\n\r\nRegister User:\r\n\r\nPOST `/api/v1/auth/register`\r\n```json\r\n{\r\n  \"firstname\": \"John\",\r\n  \"lastname\": \"Doe\",\r\n  \"username\": \"johndoe\",\r\n  \"password\": \"securepassword\"\r\n}\r\n```\r\n\r\nLogin:\r\n\r\nPOST `/api/v1/auth/login`\r\n```json\r\n{\r\n  \"username\": \"johndoe\",\r\n  \"password\": \"securepassword\"\r\n}\r\n```\r\n\r\nRefresh Token:\r\n\r\nuse `Authorization` header with `Bearer \u003crefresh-token\u003e`\r\n\r\nPOST `/api/v1/auth/refresh-token`\r\n\r\n\r\n### 💳 Account API\r\n\r\nCreate Account:\r\n\r\nuse `Authorization` header with `Bearer \u003caccess-token\u003e`\r\n\r\nPOST `/api/v1/accounts/create` (Authenticated)\r\n\r\nGet User Accounts:\r\n\r\nuse `Authorization` header with `Bearer \u003caccess-token\u003e`\r\n\r\nGET `/api/v1/accounts` (Authenticated)\r\n\r\n\r\n### 💰 Transaction API\r\n\r\nDeposit Money:\r\n\r\nuse `Authorization` header with `Bearer \u003caccess-token\u003e`\r\n\r\nPOST `/api/v1/transactions/deposit` (Authenticated)\r\n```json\r\n{\r\n  \"accountNumber\": \"123456789\",\r\n  \"amount\": 100.00\r\n}\r\n```\r\n\r\nWithdraw Money:\r\n\r\nuse `Authorization` header with `Bearer \u003caccess-token\u003e`\r\n\r\nPOST `/api/v1/transactions/withdraw` (Authenticated)\r\n\r\n```json\r\n{\r\n  \"accountNumber\": \"123456789\",\r\n  \"amount\": 50.00\r\n}\r\n\r\n```\r\n\r\nTransfer Money:\r\n\r\nuse `Authorization` header with `Bearer \u003caccess-token\u003e`\r\n\r\nPOST `/api/v1/transactions/transfer` (Authenticated)\r\n```json\r\n{\r\n  \"fromAccountNumber\": \"123456789\",\r\n  \"toAccountNumber\": \"987654321\",\r\n  \"amount\": 25.00\r\n}\r\n```\r\n\r\n---\r\n\r\n## How JWT Authentication Works\r\n\r\n1️⃣ User Logs In → Receives `accessToken` \u0026 `refreshToken`\r\n\r\n2️⃣ Use `accessToken` in `Authorization: Bearer \u003caccessToken\u003e` header for API calls\r\n\r\n3️⃣ If `accessToken` expires, use `refreshToken` to generate a new one\r\n\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismayilibrahimov%2Fbankapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismayilibrahimov%2Fbankapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismayilibrahimov%2Fbankapp/lists"}