{"id":15514388,"url":"https://github.com/theayushmajumdar/banking-app","last_synced_at":"2025-04-24T00:49:21.621Z","repository":{"id":222912137,"uuid":"758717872","full_name":"theayushmajumdar/banking-app","owner":"theayushmajumdar","description":"This Spring Boot application serves as a REST API for a banking system. It allows users to manage accounts, transactions, users, perform financial operations such as depositing and withdrawing money , and also delete account.","archived":false,"fork":false,"pushed_at":"2024-03-18T22:29:15.000Z","size":86,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T00:49:15.408Z","etag":null,"topics":["java","maven","mysql","postman","rest-api","springboot"],"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/theayushmajumdar.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-02-16T23:00:18.000Z","updated_at":"2024-10-09T13:45:12.000Z","dependencies_parsed_at":"2024-12-10T19:51:30.822Z","dependency_job_id":null,"html_url":"https://github.com/theayushmajumdar/banking-app","commit_stats":null,"previous_names":["theayushmajumdar/banking-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theayushmajumdar%2Fbanking-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theayushmajumdar%2Fbanking-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theayushmajumdar%2Fbanking-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theayushmajumdar%2Fbanking-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theayushmajumdar","download_url":"https://codeload.github.com/theayushmajumdar/banking-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250540956,"owners_count":21447426,"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":["java","maven","mysql","postman","rest-api","springboot"],"created_at":"2024-10-02T09:58:55.601Z","updated_at":"2025-04-24T00:49:21.599Z","avatar_url":"https://github.com/theayushmajumdar.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Banking System REST API\n\nThis Spring Boot application serves as a REST API for a banking system. It allows users to manage accounts, transactions, users, perform financial operations such as depositing and withdrawing money , and also delete account.\n\n# Video \n\nVisit this link to see the video explanation\nhttps://www.linkedin.com/posts/ayushmajumdar_restapi-springboot-java-activity-7165247588311425024-P9Iy?utm_source=share\u0026utm_medium=member_desktop\n\n## Table of Contents\n\n- [Features](#features)\n- [Technologies](#technologies)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [Usage](#usage)\n  - [Endpoints](#endpoints)\n  - [Authentication](#authentication)\n  - [API Testing with Postman](#api-testing-with-postman)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- **Account Management**: Create, read, update, and delete bank accounts.\n- **Transaction Management**: Manage transactions associated with bank accounts.\n- **User Management**: Manage users and their roles within the system.\n- **Financial Operations**: Perform financial operations such as withdrawing money.\n- **RESTful API**: Provides endpoints for seamless integration with client applications.\n- **Authentication and Authorization**: Secured endpoints using JWT tokens.\n\n## Technologies\n\n- **Spring Boot**: Framework for building Java-based applications.\n- **Spring Security**: Provides authentication and authorization support.\n- **Spring Data JPA**: Simplifies data access layer implementation.\n- **Hibernate**: ORM (Object-Relational Mapping) framework for mapping Java objects to database tables.\n- **MySQL**: Relational database management system.\n- **JSON Web Tokens (JWT)**: For securing and authenticating API endpoints.\n- **Maven**: Dependency management and build automation tool.\n\n## Getting Started\n\n### Prerequisites\n\n- Java Development Kit (JDK) 8 or higher installed.\n- Apache Maven installed.\n- MySQL installed and running.\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/your_username/banking-system.git\n   ```\n\n2. Navigate to the project directory:\n\n   ```bash\n   cd banking-system\n   ```\n\n3. Update the `application.properties` file in `src/main/resources` with your MySQL database configurations:\n\n   ```properties\n   spring.datasource.url=jdbc:mysql://localhost:3306/your_database_name\n   spring.datasource.username=your_mysql_username\n   spring.datasource.password=your_mysql_password\n   ```\n\n4. Build the project using Maven:\n\n   ```bash\n   mvn clean package\n   ```\n\n5. Run the application:\n\n   ```bash\n   java -jar target/banking-system.jar\n   ```\n\n## Usage\n\n### Endpoints\n\nThe API exposes the following endpoints:\n\n- **Accounts**:\n  - `GET /accounts`: Retrieve all accounts.\n  - `GET /accounts/{accountId}`: Retrieve a specific account by ID.\n  - `POST /accounts`: Create a new account.\n  - `PUT /accounts/{accountId}`: Update an existing account.\n  - `DELETE /accounts/{accountId}`: Delete an account.\n\n- **Transactions**:\n  - `GET /accounts/{accountId}/transactions`: Retrieve all transactions for a specific account.\n  - `GET /accounts/{accountId}/transactions/{transactionId}`: Retrieve a specific transaction by ID for an account.\n  - `POST /accounts/{accountId}/transactions`: Create a new transaction for an account.\n  - `PUT /accounts/{accountId}/transactions/{transactionId}`: Update an existing transaction for an account.\n  - `DELETE /accounts/{accountId}/transactions/{transactionId}`: Delete a transaction for an account.\n\n- **Users**:\n  - `GET /users`: Retrieve all users.\n  - `GET /users/{userId}`: Retrieve a specific user by ID.\n  - `POST /users`: Create a new user.\n  - `PUT /users/{userId}`: Update an existing user.\n  - `DELETE /users/{userId}`: Delete a user.\n\n- **Financial Operations**:\n  - `POST /operations/withdraw`: Withdraw money from an account.\n\n### Authentication\n\nThe API requires authentication for certain endpoints. To authenticate, obtain a JWT token by sending a POST request to `/auth/login` with valid credentials. Include the token in the Authorization header of subsequent requests with the format: `Bearer {token}`.\n\nExample:\n\n```http\nPOST /auth/login\nContent-Type: application/json\n\n{\n  \"username\": \"example_user\",\n  \"password\": \"example_password\"\n}\n```\n\nResponse:\n\n```json\n{\n  \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\"\n}\n```\n\nInclude the obtained token in subsequent requests:\n\n```http\nGET /accounts\nAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\n```\n\n### API Testing with Postman\n\n[Postman](https://www.postman.com/) is a popular API client that allows you to test API endpoints quickly and efficiently. You can use Postman to send requests to your REST API endpoints and verify their functionality.\n\n#### Getting Started with Postman\n\n1. **Download and Install Postman**:\n   - Download and install Postman from the [official website](https://www.postman.com/downloads/).\n\n2. **Import Your API Collection**:\n   - If you have an existing Postman collection for your API endpoints, you can import it into Postman.\n   - If not, you can manually create requests for each endpoint you want to test.\n\n3. **Send Requests**:\n   - Once you have your requests set up in Postman, you can send them to your API endpoints.\n   - Make sure your Spring Boot application is running locally or deployed to a server accessible from Postman.\n\n4. **Inspect Responses**:\n   - Postman will display the responses from your API endpoints, allowing you to inspect the data returned.\n   - You can use this information to verify that your API is functioning correctly.\n\n#### Example Postman Collection\n\nTo help you get started, here's an example Postman collection that includes requests for the endpoints in your project:\n\n[Banking System API Collection](link_to_your_postman_collection)\n\n#### Running Tests\n\nYou can also use Postman to create and run automated tests for your API endpoints. Postman provides a testing framework that allows you to write scripts to validate responses and ensure that your API behaves as expected.\n\n#### Additional Resources\n\n- [Postman Documentation](https://learning.postman.com/docs/getting-started/introduction/)\n- [Postman Learning Center](https://learning.postman.com/)\n\n## Contributing\n\nContributions are welcome! Please fork the repository and create a pull request with your changes.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n```\n\nReplace `link_to_your_postman_collection` with the actual link to your Postman collection if you have one. Otherwise, you can leave it as is or remove the placeholder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheayushmajumdar%2Fbanking-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheayushmajumdar%2Fbanking-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheayushmajumdar%2Fbanking-app/lists"}