# wani21/minicorebankingsystem architecture

> Architecture diagram of the GitHub repository wani21/minicorebankingsystem, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wani21/minicorebankingsystem
- Repository: https://github.com/wani21/minicorebankingsystem

## Overview

1. This repository is a split full-stack banking application: a Spring Boot backend in `backend/coreBanking` and a React/Vite frontend in `frontend/MiniCoreBankSystem`. The architectural boundary is cleanly separated into API/backend logic and browser UI.

2. The backend is organized in a classic layered Spring structure:
   - `controller` exposes HTTP endpoints
   - `Service` contains business logic
   - `Repository` provides database access via Spring Data JPA
   - `Entity` maps persistent tables
   - `DTO` carries request/response payloads
   - `Util` contains shared helpers such as JWT handling

3. The main backend domain appears to be user onboarding and identity management rather than transactional core banking. The concrete backend entities are `SignUpUserEntity` and `UserKYCEntity`, which support registration, authentication, and KYC workflows. The SQL scripts in `backend/SQLFile` reflect those data stores, including login users and KYC request tables.

4. Authentication is JWT-based. `JwtUtil` is the central token utility, and `LoginAuthController` plus `UserAuthService` form the login/auth boundary. This implies the frontend likely authenticates once, then sends tokens on protected requests, with route protection handled client-side.

5. Registration and credential management are handled separately from login. `UserSignUpController` and `UserSignUpService` manage sign-up flows, while `UserCredentialsCheckRepo` and `GetStatusRepo` support validation and account/status lookups. That separation suggests the backend enforces different persistence/query paths for account creation versus login verification.

6. Password recovery is its own subsystem. The `ForgetPasswordControllers` package contains controllers for retrieving a security question, checking the answer, and changing the password. The DTOs `SecurityAnswerDTO` and `ChangePasswordDTO`, plus `ChangePasswordService`, indicate a multi-step recovery flow rather than a single reset endpoint.

7. KYC is modeled as a dedicated workflow. `KYCProcessController`, `KYCProcessRepo`, and `KYCProcessDTO` form the KYC submission path, likely writing user identity/compliance data into `UserKYCEntity`. This is a distinct business boundary from login and signup, which is important for diagramming.

8. The backend also exposes a user/admin data retrieval path. `GetAllUserService` and `AllUsersDataDTO`, along with the `ShowUsersData` page on the frontend, suggest an administrative read model for listing users or reviewing onboarding status. The presence of `AdminPage` in the frontend reinforces that this is an operator-facing capability.

9. `HealthCheckController/TestController` is a lightweight operational endpoint, separate from the business domains. It is likely used for deployment validation or connectivity checks and can be represented as an independent support path in the architecture.

10. The frontend is a React SPA with page-level routing. `App.jsx`, `main.jsx`, and `ProtectedRoute.jsx` define the shell and route guard behavior, while the `pages` directory contains feature screens such as `LoginPage`, `SignUp`, `Dashboard`, `Profile`, `Accounts`, `Transactions`, `KYCFormPage`, and password recovery pages.

11. Frontend pages map closely to backend capabilities: signup/login, KYC submission, password recovery, user status display, and admin/user listings. This suggests the UI is mostly a consumer of the backend APIs, not a separate business engine. `ProtectedRoute.jsx` is the main client-side security boundary.

12. `AppConfig.java` and `WebConfiguration.java` are the backend’s cross-cutting configuration layer. They likely define app-wide beans and web/CORS or MVC behavior, which matters because the React frontend must communicate with the Spring Boot API across the browser boundary.

13. The runtime stack is Spring Boot + Spring Security + Spring Data JPA + MySQL on the backend, and React + Vite on the frontend. The database is explicitly MySQL, and the SQL scripts suggest the schema is at least partially managed outside of JPA auto-generation.

14. For an architecture diagram, the key flows are: browser UI → protected React routes → REST controllers → service layer → JPA repositories → MySQL; and login/signup/KYC/password recovery are the main business subflows. The most important boundaries are client vs server, controller vs service, and authentication/identity vs KYC/compliance.

Main entry points: [`frontend/MiniCoreBankSystem/src/App.jsx`](https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/App.jsx) (App shell), [`backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/LoginControllers`](https://github.com/wani21/minicorebankingsystem/tree/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/LoginControllers) (Auth API), [`backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Service/UserAuthService`](https://github.com/wani21/minicorebankingsystem/tree/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Service/UserAuthService) (Auth services), [`backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Entity/SignUp/SignUpUserEntity.java`](https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Entity/SignUp/SignUpUserEntity.java) (Signup data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend SPA"]
  node_ui_shell["App shell<br/>React app<br/>[App.jsx]"]
  node_route_guard{{"Protected route<br/>route guard<br/>[ProtectedRoute.jsx]"}}
  node_login_page["Login<br/>screen<br/>[LoginPage.jsx]"]
  node_signup_page["Sign up<br/>screen<br/>[SignUp.jsx]"]
  node_kyc_page["KYC form<br/>screen<br/>[KYCFormPage.jsx]"]
  node_password_pages["Recovery UI<br/>screens"]
  node_admin_views["Admin views<br/>screens<br/>[AdminPage.jsx]"]
  node_user_pages["User pages<br/>screens<br/>[Dashboard.jsx]"]
end

subgraph group_backend["Backend API"]
  node_auth_api["Auth API<br/>controllers"]
  node_password_api["Recovery API<br/>controllers"]
  node_kyc_api["KYC API<br/>controller"]
  node_auth_services["Auth services"]
  node_password_service["Recovery service"]
  node_jwt_util{{"JWT util<br/>token helper<br/>[JwtUtil.java]"}}
end

subgraph group_data["Persistence"]
  node_signup_data[("Signup data<br/>entity/repo")]
  node_kyc_data[("KYC data<br/>entity/repo<br/>[UserKYCEntity.java]")]
  node_mysql[("MySQL<br/>database")]
end

subgraph group_support["Support"]
  node_config["Config<br/>[AppConfig.java]"]
  node_health["Health check<br/>ops controller"]
end

node_ui_shell -->|"protects"| node_route_guard
node_ui_shell -->|"routes to"| node_login_page
node_ui_shell -->|"routes to"| node_signup_page
node_ui_shell -->|"routes to"| node_kyc_page
node_ui_shell -->|"routes to"| node_password_pages
node_ui_shell -->|"routes to"| node_admin_views
node_ui_shell -->|"routes to"| node_user_pages
node_route_guard -->|"calls"| node_auth_api
node_login_page -->|"authenticates"| node_auth_api
node_signup_page -->|"registers"| node_auth_api
node_kyc_page -->|"submits"| node_kyc_api
node_password_pages -->|"recovers"| node_password_api
node_admin_views -->|"reads"| node_auth_api
node_auth_api -->|"delegates"| node_auth_services
node_password_api -->|"delegates"| node_password_service
node_kyc_api -->|"writes"| node_kyc_data
node_auth_services -->|"uses"| node_signup_data
node_auth_services -->|"issues tokens"| node_jwt_util
node_password_service -->|"verifies"| node_signup_data
node_signup_data -->|"persists to"| node_mysql
node_kyc_data -->|"persists to"| node_mysql
node_config -->|"configures"| node_auth_api
node_health -.->|"checks"| node_mysql

click node_ui_shell "https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/App.jsx"
click node_route_guard "https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/Components/ProtectedRoute.jsx"
click node_login_page "https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/pages/LoginPage/LoginPage.jsx"
click node_signup_page "https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/pages/SignUp/SignUp.jsx"
click node_kyc_page "https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/pages/KYCFormPage/KYCFormPage.jsx"
click node_password_pages "https://github.com/wani21/minicorebankingsystem/tree/main/frontend/MiniCoreBankSystem/src/pages/ForgetPasswordModule"
click node_admin_views "https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/pages/AdminPage/AdminPage.jsx"
click node_user_pages "https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/pages/Dashboard/Dashboard.jsx"
click node_auth_api "https://github.com/wani21/minicorebankingsystem/tree/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/LoginControllers"
click node_password_api "https://github.com/wani21/minicorebankingsystem/tree/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/ForgetPasswordControllers"
click node_kyc_api "https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/KYCProcessController/KYCProcessController.java"
click node_auth_services "https://github.com/wani21/minicorebankingsystem/tree/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Service/UserAuthService"
click node_password_service "https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Service/ChangePasswordService.java"
click node_jwt_util "https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Util/JwtUtil.java"
click node_config "https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Configuration/AppConfig.java"
click node_health "https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/HealthCheckController/TestController.java"
click node_signup_data "https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Entity/SignUp/SignUpUserEntity.java"
click node_kyc_data "https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Entity/UserKYC/UserKYCEntity.java"
click node_mysql "https://github.com/wani21/minicorebankingsystem/blob/main/backend/SQLFile/logindb_login_users.sql"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ui_shell,node_route_guard,node_login_page,node_signup_page,node_kyc_page,node_password_pages,node_admin_views,node_user_pages toneBlue
class node_auth_api,node_password_api,node_kyc_api,node_auth_services,node_password_service,node_jwt_util toneAmber
class node_signup_data,node_kyc_data,node_mysql toneMint
class node_config,node_health toneRose
```

## Components

### Frontend SPA

React/Vite browser application and route-level screens.

- [App shell](https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/App.jsx): React app · Main SPA entry, route wiring, and protected navigation. · `frontend/MiniCoreBankSystem/src/App.jsx`
- [Protected route](https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/Components/ProtectedRoute.jsx): route guard · Client-side access control for authenticated pages. · `frontend/MiniCoreBankSystem/src/Components/ProtectedRoute.jsx`
- [Login](https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/pages/LoginPage/LoginPage.jsx): screen · User sign-in screen. · `frontend/MiniCoreBankSystem/src/pages/LoginPage/LoginPage.jsx`
- [Sign up](https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/pages/SignUp/SignUp.jsx): screen · Account registration screen. · `frontend/MiniCoreBankSystem/src/pages/SignUp/SignUp.jsx`
- [KYC form](https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/pages/KYCFormPage/KYCFormPage.jsx): screen · Identity and compliance submission screen. · `frontend/MiniCoreBankSystem/src/pages/KYCFormPage/KYCFormPage.jsx`
- [Recovery UI](https://github.com/wani21/minicorebankingsystem/tree/main/frontend/MiniCoreBankSystem/src/pages/ForgetPasswordModule): screens · Password recovery and answer verification screens. · `frontend/MiniCoreBankSystem/src/pages/ForgetPasswordModule`
- [Admin views](https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/pages/AdminPage/AdminPage.jsx): screens · Operator-facing pages for user and status review. · `frontend/MiniCoreBankSystem/src/pages/AdminPage/AdminPage.jsx`
- [User pages](https://github.com/wani21/minicorebankingsystem/blob/main/frontend/MiniCoreBankSystem/src/pages/Dashboard/Dashboard.jsx): screens · Authenticated user screens such as dashboard, profile, accounts, and transactions. · `frontend/MiniCoreBankSystem/src/pages/Dashboard/Dashboard.jsx`

### Backend API

Spring Boot REST backend with layered business logic.

- [Auth API](https://github.com/wani21/minicorebankingsystem/tree/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/LoginControllers): controllers · Login and signup endpoints plus status lookup. · `backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/LoginControllers`
- [Recovery API](https://github.com/wani21/minicorebankingsystem/tree/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/ForgetPasswordControllers): controllers · Multi-step password recovery endpoints. · `backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/ForgetPasswordControllers`
- [KYC API](https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/KYCProcessController/KYCProcessController.java): controller · KYC submission endpoint. · `backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/KYCProcessController/KYCProcessController.java`
- [Auth services](https://github.com/wani21/minicorebankingsystem/tree/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Service/UserAuthService): services · Authentication, signup, and user listing business logic. · `backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Service/UserAuthService`
- [Recovery service](https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Service/ChangePasswordService.java): service · Password reset orchestration and validation. · `backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Service/ChangePasswordService.java`
- [JWT util](https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Util/JwtUtil.java): token helper · Shared token creation and validation utility. · `backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Util/JwtUtil.java`

### Persistence

Database entities, repositories, and SQL-backed schema.

- [Signup data](https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Entity/SignUp/SignUpUserEntity.java): entity/repo · User registration persistence and credential/status queries. · `backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Entity/SignUp/SignUpUserEntity.java`
- [KYC data](https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Entity/UserKYC/UserKYCEntity.java): entity/repo · KYC request storage and access path. · `backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Entity/UserKYC/UserKYCEntity.java`
- [MySQL](https://github.com/wani21/minicorebankingsystem/blob/main/backend/SQLFile/logindb_login_users.sql): database · Relational backing store defined by SQL scripts and JPA mappings. · `backend/SQLFile/logindb_login_users.sql`

### Support

Cross-cutting configuration and operational endpoints.

- [Config](https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Configuration/AppConfig.java): spring config · Application and web configuration layer. · `backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/Configuration/AppConfig.java`
- [Health check](https://github.com/wani21/minicorebankingsystem/blob/main/backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/HealthCheckController/TestController.java): ops controller · Lightweight operational endpoint for deployment and connectivity checks. · `backend/coreBanking/src/main/java/com/bankingSystem/coreBanking/controller/HealthCheckController/TestController.java`

## Connections

- App shell → Protected route: protects · SPA routes use a client-side auth guard.
- App shell → Login: routes to · Entry flow for authentication.
- App shell → Sign up: routes to · Entry flow for registration.
- App shell → KYC form: routes to · Entry flow for KYC submission.
- App shell → Recovery UI: routes to · Password recovery screens.
- App shell → Admin views: routes to · Operator-facing pages.
- App shell → User pages: routes to · Authenticated user pages.
- Protected route → Auth API: calls · Protected views depend on login state and token-backed API access.
- Login → Auth API: authenticates · Submits login credentials.
- Sign up → Auth API: registers · Submits new user details.
- KYC form → KYC API: submits · Sends identity/compliance data.
- Recovery UI → Recovery API: recovers · Drives security-question and password-change flow.
- Admin views → Auth API: reads · Loads user lists and onboarding/status data.
- Auth API → Auth services: delegates · Controllers hand off to business services.
- Recovery API → Recovery service: delegates · Recovery endpoints use dedicated service logic.
- KYC API → KYC data: writes · KYC submissions are persisted through the KYC model.
- Auth services → Signup data: uses · Signup and credential/status logic reads and writes user records.
- Auth services → JWT util: issues tokens · Authentication uses JWT creation/validation.
- Recovery service → Signup data: verifies · Recovery flow checks user identity and updates credentials.
- Signup data → MySQL: persists to · User registration tables are backed by MySQL.
- KYC data → MySQL: persists to · KYC request tables are backed by MySQL.
- Config → Auth API: configures · Web and application configuration support the REST layer.
- Health check → MySQL: checks · Operational endpoint can validate backend connectivity.
