{"id":21894648,"url":"https://github.com/yamtaldev/securebankapp","last_synced_at":"2026-02-15T05:32:31.833Z","repository":{"id":256257439,"uuid":"854570334","full_name":"YamtalDev/SecureBankApp","owner":"YamtalDev","description":"Secure Bank App is a full-stack web application for secure banking services. It allows users to sign up, validate phone numbers via SMS, view account balances, and transfer money. Built with Java \u0026 Spring Boot for the backend, Angular for the frontend, MongoDB for data storage, and Docker for containerization.","archived":false,"fork":false,"pushed_at":"2024-09-30T16:23:49.000Z","size":2299,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T22:13:02.817Z","etag":null,"topics":["angular","authentication","aws","banking","docker","express","kubernetes","mongodb","nodejs","rest-api","swagger","twilio","typescript","users"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/YamtalDev.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-09-09T12:13:33.000Z","updated_at":"2025-02-16T03:14:02.000Z","dependencies_parsed_at":"2024-11-28T16:16:15.448Z","dependency_job_id":null,"html_url":"https://github.com/YamtalDev/SecureBankApp","commit_stats":null,"previous_names":["yamtaldev/securebankapp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YamtalDev/SecureBankApp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YamtalDev%2FSecureBankApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YamtalDev%2FSecureBankApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YamtalDev%2FSecureBankApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YamtalDev%2FSecureBankApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YamtalDev","download_url":"https://codeload.github.com/YamtalDev/SecureBankApp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YamtalDev%2FSecureBankApp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29470617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T05:26:30.465Z","status":"ssl_error","status_checked_at":"2026-02-15T05:26:21.858Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","authentication","aws","banking","docker","express","kubernetes","mongodb","nodejs","rest-api","swagger","twilio","typescript","users"],"created_at":"2024-11-28T13:27:11.667Z","updated_at":"2026-02-15T05:32:31.819Z","avatar_url":"https://github.com/YamtalDev.png","language":"TypeScript","readme":"# Secure Web Banking Application\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Version](https://img.shields.io/badge/version-0.0.1-blue.svg)](https://github.com/YourUsername/SecureWebBankingApp)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)  \n[![Node.js Version](https://img.shields.io/badge/Node.js-v22.9.0-339933.svg?logo=nodedotjs\u0026style=flat)](https://nodejs.org/en/)\n[![TypeScript Version](https://img.shields.io/badge/TypeScript-v5.6.2-3178C6.svg?logo=typescript\u0026style=flat)](https://www.typescriptlang.org/)\n[![Express.js Version](https://img.shields.io/badge/Express.js-v4.21.0-000000.svg?logo=express\u0026style=flat)](https://expressjs.com/)  \n[![MongoDB Version](https://img.shields.io/badge/MongoDB-v7.0.14-47A248.svg?logo=mongodb\u0026style=flat)](https://www.mongodb.com/)\n[![AWS](https://img.shields.io/badge/AWS-Cloud-FF9900.svg?logo=amazonaws\u0026style=flat)](https://aws.amazon.com/)\n[![Swagger](https://img.shields.io/badge/Swagger-API-85EA2D.svg?logo=swagger\u0026style=flat)](https://swagger.io/)\n[![Twilio](https://img.shields.io/badge/Twilio-API-F22F46.svg?logo=twilio\u0026style=flat)](https://www.twilio.com/)  \n[![npm Version](https://img.shields.io/badge/npm-v10.8.3-CB3837.svg?logo=npm\u0026style=flat)](https://www.npmjs.com/)\n[![Angular CLI Version](https://img.shields.io/badge/Angular_CLI-v18.2.4-DD0031.svg?logo=angular\u0026style=flat)](https://angular.io/)\n[![Docker Version](https://img.shields.io/badge/Docker-v24.0.7-2496ED.svg?logo=docker\u0026style=flat)](https://www.docker.com/)\n[![Minikube Version](https://img.shields.io/badge/Minikube-v1.34.0-326CE5.svg?logo=kubernetes\u0026style=flat)](https://minikube.sigs.k8s.io/docs/)\n[![kubectl Version](https://img.shields.io/badge/kubectl-v1.31.0-326CE5.svg?logo=kubernetes\u0026style=flat)](https://kubernetes.io/docs/reference/kubectl/)\n\n\n\n## Project Overview\n\nThe Secure Web Banking Application is a web-based system that allows users to sign up, verify their phone number via SMS, log in, view their account balance, view recent transactions, and send money to other registered users. The application adheres to industry best practices, utilizing modern technologies and frameworks to ensure security, scalability, and maintainability.\n\n## Requirements\n\n1. **User Authentication and Authorization:**\n\n   - Sign-up with email, password, and phone number.\n   - Phone number verification using a one-time passcode (OTP) sent via SMS.\n   - Secure sign-in with JWT authentication.\n   - Protected dashboard accessible only after authentication.\n\n2. **Transactions:**\n\n   - View account balance (randomly assigned upon sign-up for demo purposes).\n   - View recent transactions.\n   - Send money to other registered users by email.\n   - Validate sufficient balance and recipient existence before processing transactions.\n\n3. **Technology Stack:**\n\n   - **Frontend:** [Angular](https://angular.io/) with [TypeScript](https://www.typescriptlang.org/).\n   - **Backend:** [Node.js](https://nodejs.org/en/) with [Express.js](https://expressjs.com/).\n   - **Database:** [MongoDB](https://www.mongodb.com/).\n   - **SMS Service:** [Twilio](https://www.twilio.com/) (or a free alternative).\n   - **API Documentation:** [Swagger](https://swagger.io/).\n   - **Containerization:** [Docker](https://www.docker.com/).\n   - **Orchestration:** [Kubernetes](https://kubernetes.io/) for microservices.\n   - **Deployment:** AWS (Amazon Web Services) with local deployment via Docker Compose.\n\n4. **Additional Tools:**\n\n   - **UI Design:** [Figma](https://www.figma.com/) for implementing the provided designs.\n   - **Version Control:** [Git](https://git-scm.com/).\n\n## Main Entities\n\n**User:**\n\nAttributes:\n\n- `userId`: Unique identifier for each user.\n- `email`: User's email address.\n- `password`: Hashed password for authentication.\n- `phoneNumber`: User's phone number.\n- `isVerified`: Boolean indicating if the phone number has been verified.\n- `balance`: Current account balance.\n- `createdAt`: Timestamp when the account was created.\n\n**Transaction:**\n\nAttributes:\n\n- `transactionId`: Unique identifier for each transaction.\n- `senderEmail`: Email address of the sender.\n- `receiverEmail`: Email address of the receiver.\n- `amount`: Amount of money transferred.\n- `timestamp`: Timestamp when the transaction occurred.\n- `type`: Indicates 'credit' or 'debit'.\n\n**OTP Verification:**\n\nAttributes:\n\n- `email`: Email address associated with the OTP.\n- `otpCode`: One-time passcode sent to the user's phone.\n- `expiresAt`: Expiration time of the OTP.\n\n## Features\n\n- **User Registration and Verification:**\n\n  - Users can sign up with email, password, and phone number.\n  - Phone number verification via OTP sent through SMS.\n  - Validation to prevent duplicate registrations with the same email.\n\n- **Secure Authentication:**\n\n  - Passwords stored securely using hashing (e.g., bcrypt).\n  - JWT used for session management and route protection.\n\n- **User Dashboard:**\n\n  - Displays account balance and recent transactions.\n  - Provides an option to sign out.\n\n- **Money Transfer:**\n\n  - Users can send money to other registered users.\n  - Validates recipient's existence and sufficient sender balance.\n  - Updates transaction history for both sender and receiver.\n\n- **API Documentation:**\n\n  - APIs documented using Swagger for easy integration and testing.\n\n- **Containerization and Deployment:**\n\n  - Dockerized services for consistent environment setup.\n  - Kubernetes used for orchestrating microservices.\n  - AWS used for deployment with an option for local deployment using Docker Compose.\n\n- **Industry Best Practices:**\n\n  - Clean code with proper architecture.\n  - Secure coding practices to protect sensitive data.\n  - Use of environment variables for configuration.\n\n# Usage\n\nTo utilize this web banking application, follow these steps:\n\n### Prerequisites\n\nBefore you begin, ensure you have the following prerequisites installed on your system:\n\n- **Node.js and npm:** If you don't have Node.js installed, you can download it from the official website:\n\n  - [Download Node.js](https://nodejs.org/en/download/)\n\n- **Angular CLI:** Install Angular CLI globally using npm:\n\n  ```shell\n  npm install -g @angular/cli\n  \n  ```\n\n- **MongoDB:** Ensure you have MongoDB installed and running on your system.\n\n  - [Download MongoDB](https://www.mongodb.com/try/download/community)\n\n- **Docker and Docker Compose:** If you prefer to run the project using Docker containers, make sure you have Docker and Docker Compose installed.\n\n  - [Download Docker](https://docs.docker.com/get-started/get-docker/)\n  - [Download Docker Compose](https://docs.docker.com/compose/install/)\n\n\n- **AWS CLI (Optional):** For deployment to AWS.\n\n  - [Install AWS CLI](https://aws.amazon.com/cli/)\n\n### You can choose to run the project natively or with Docker, depending on your preference and system configuration.\n\n\n# Installation\n## Clone or Download the Repository\n\nYou can clone this Git repository or download it as a ZIP file to your local machine.\n\n```shell \ngit clone https://github.com/YamtalDev/SecureBankApp.git\ncd SecureBankApp\n\n```\nBackend Setup\n1. Navigate to the Backend Directory:\n\n```shell \ncd backend\n\n```\n\n2. Install Dependencies:\n\n```shell \nnpm install\n\n```\n\n3. Environment Variables:\nCreate a `.env` file in the `backend` directory and add the following configurations:\n\n```shell \n\nPORT=3000\nMONGODB_URI=mongodb://localhost:27017/bankapp\nJWT_SECRET=your_jwt_secret_key\nTWILIO_ACCOUNT_SID=your_twilio_account_sid\nTWILIO_AUTH_TOKEN=your_twilio_auth_token\nTWILIO_PHONE_NUMBER=your_twilio_phone_number\n\n```\n\n - Replace your_jwt_secret_key with a secure key.\n - For Twilio configurations, if you're using Twilio's free trial, replace the placeholders with your actual account details.\n\n 4. Run the Backend Server:\n\n```shell \nnpm start\n```\n\n - The backend server should now be running on `http://localhost:3000`.\n\n\n# Frontend Setup\n1. Navigate to the Frontend Directory:\n\n```shell\ncd ../frontend\n```\n\n2. Install Dependencies:\n\n```shell\nnpm install\n\n```\n\n3. Environment Variables:\n\nCreate an `environment.ts` file in the `src/environments` directory with the following content:\n\n``` typescript\nexport const environment = {\n  production: false,\n  apiUrl: 'http://localhost:3000/api'\n};\n```\n\n4. Run the Frontend Server:\n\n``` shell\nng serve\n\n```\n\n - The frontend application should now be running on `http://localhost:4200`.\n\n\n# MongoDB Setup\nEnsure that MongoDB is running on your local machine. If installed locally, you can start it with:\n\n```shell\nmongod\n```\n\nAlternatively, you can use MongoDB Atlas for a cloud-hosted database. Update `MONGODB_URI` in the `.env` file accordingly.\n\n# Spin Up with Docker\n1. Ensure No Services Are Running on Required Ports:\n\n```shell\nsudo lsof -i :3000\nsudo lsof -i :4200\nsudo lsof -i :27017\n```\n\n - Kill any processes using these ports if necessary.\n\n2. Navigate to the Root Directory:\n\n```shell\ncd ../\n```\n\n3. Run Docker Containers:\n\n\n```shell\ndocker-compose up --build\n```\n\n - This command builds and starts all services defined in the `docker-compose.yml` file.\n\n4. Access the Application:\n\n - Frontend: [http://localhost:4200](http://localhost:4200)\n - Backend API: [http://localhost:3000/api](http://localhost:3000/api)\n\n # API Documentation\n\nAPI documentation is available via Swagger UI:\n - [Access Swagger UI](http://localhost:3000/api-docs)\n\n - This provides a detailed overview of all API endpoints, request and response schemas, and allows for interactive testing. \n \n# Features and Endpoints\n\n1. User Registration\n\n - Endpoint:\n\n``` http\nPOST /api/auth/register\n```\n\n - Request Body:\n\n```json\n{\n  \"email\": \"user@example.com\",\n  \"password\": \"YourSecurePassword\",\n  \"phoneNumber\": \"+1234567890\"\n}\n```\n\n - Response:\n\n - Success message indicating that an OTP has been sent to the provided phone number.\n\n2. Phone Verification\n\n - Endpoint:\n\n``` http\nPOST /api/auth/verify-phone\n```\n\n - Request Body:\n\n```json\n{\n  \"email\": \"user@example.com\",\n  \"otpCode\": \"123456\"\n}\n```\n\n- Response:\n\n - Success message indicating that the phone number has been verified.\n\n3. User Login\n - Endpoint:\n\n``` http\nPOST /api/auth/login\n```\n\n - Request Body:\n\n```json\n{\n  \"email\": \"user@example.com\",\n  \"password\": \"YourSecurePassword\"\n}\n```\n\n - Response:\n\n - JWT token to be used for authenticated requests.\n\n4. Get User Dashboard\n - Endpoint:\n\n``` http\n\nGET /api/user/dashboard\n```\n\n - Headers:\n\n * Authorization: Bearer \u003cJWT_TOKEN\u003e\n\n - Response:\n\n```json\n{\n  \"email\": \"user@example.com\",\n  \"balance\": 1000,\n  \"transactions\": [\n    {\n      \"transactionId\": \"txn_123\",\n      \"senderEmail\": \"user@example.com\",\n      \"receiverEmail\": \"receiver@example.com\",\n      \"amount\": -100,\n      \"timestamp\": \"2023-09-01T12:34:56Z\",\n      \"type\": \"debit\"\n    }\n  ]\n}\n```\n\n5. Send Money\n\n - Endpoint:\n\n``` http\nPOST /api/transactions/send\n```\n\n - Headers:\n\n * Authorization: Bearer \u003cJWT_TOKEN\u003e\n\n - Request Body:\n\n```json\n{\n  \"receiverEmail\": \"receiver@example.com\",\n  \"amount\": 100\n}\n```\n\n - Response:\n\n * Success message with transaction details.\n\n6. Sign Out\n\n - Endpoint:\n\n * Frontend handles sign-out by removing JWT token from storage.\n\n\n\n# Deployment to AWS (Optional)\nGiven the budget constraints, you can utilize AWS Free Tier services.\n\n1. Set Up AWS Account:\n\n - Sign up for AWS and configure IAM users and roles.\n2. Deploy Backend and Frontend:\n\n - Use AWS Elastic Beanstalk or AWS EC2 instances to deploy your Docker containers.\n - Alternatively, use AWS Elastic Container Service (ECS) with Fargate.\n\n3. Database Deployment:\n - Use Amazon DocumentDB (MongoDB compatible) within the free tier limits.\n - Ensure security groups and network settings allow your application to connect to the database.\n\n4. SMS Service Configuration:\n\n - If Twilio's free trial is insufficient, consider using AWS SNS (Simple Notification Service) for sending SMS messages within the free tier.\n\n# Testing\n - Unit Tests:\n * Implement unit tests using frameworks like Jest for backend and Jasmine/Karma for frontend.\n - Integration Tests:\n *  Test interactions between different components of the application.\n - Manual Testing:\n * Use tools like Postman to test API endpoints.\n\nLearning Resources\n\n[![Angular](https://img.shields.io/badge/Angular-DD0031?style=for-the-badge\u0026logo=angular\u0026logoColor=white)](https://angular.io/docs)\n[![Express.js](https://img.shields.io/badge/Express.js-000000?style=for-the-badge\u0026logo=express\u0026logoColor=white)](https://expressjs.com/)\n[![MongoDB](https://img.shields.io/badge/MongoDB-47A248?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white)](https://docs.mongodb.com/manual/tutorial/)\n[![Docker](https://img.shields.io/badge/Docker-2496ED?style=for-the-badge\u0026logo=docker\u0026logoColor=white)](https://docs.docker.com/get-started/)\n[![Kubernetes](https://img.shields.io/badge/Kubernetes-326CE5?style=for-the-badge\u0026logo=kubernetes\u0026logoColor=white)](https://kubernetes.io/docs/tutorials/kubernetes-basics/)\n[![AWS](https://img.shields.io/badge/AWS-FF9900?style=for-the-badge\u0026logo=amazonaws\u0026logoColor=white)](https://aws.amazon.com/free/)\n[![Swagger](https://img.shields.io/badge/Swagger-85EA2D?style=for-the-badge\u0026logo=swagger\u0026logoColor=black)](https://swagger.io/docs/)\n[![Twilio](https://img.shields.io/badge/Twilio-F22F46?style=for-the-badge\u0026logo=twilio\u0026logoColor=white)](https://www.twilio.com/docs/usage/api)\n\n\n## License:\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contact:\nFor questions or issues, feel free to [create an issue](https://github.com/YamtalDev/HackerNews-API/issues) or contact the project maintainer.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyamtaldev%2Fsecurebankapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyamtaldev%2Fsecurebankapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyamtaldev%2Fsecurebankapp/lists"}