# neerajpatidar09/fts architecture

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

- Interactive diagram: https://gitdiagram.com/neerajpatidar09/fts
- Repository: https://github.com/neerajpatidar09/fts

## Overview

This is a financial transaction monitoring system with a React administration client and a Java/Spring backend. The client authenticates users, applies protected routes, and exposes customer and access-management screens. The backend also contains transaction intake, risk assessment, rule-based detection, alerts, investigations, and approval capabilities. The tree and excerpts establish these domain stages, but do not show their full runtime wiring; those backend relationships are therefore left unasserted.

Main entry points: [`client/src/services/api/axiosInstance.ts`](https://github.com/neerajpatidar09/fts/blob/dev/client/src/services/api/axiosInstance.ts) (API client), [`client/src/routes/AppRoutes.tsx`](https://github.com/neerajpatidar09/fts/blob/dev/client/src/routes/AppRoutes.tsx) (Application routes), [`client/src/context/AuthContext.tsx`](https://github.com/neerajpatidar09/fts/blob/dev/client/src/context/AuthContext.tsx) (Auth session), [`client/src/main.tsx`](https://github.com/neerajpatidar09/fts/blob/dev/client/src/main.tsx) (Client bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Admin client"]
  node_entry["Client bootstrap<br/>[main.tsx]"]
  node_routes["Application routes<br/>[AppRoutes.tsx]"]
  node_authctx["Auth session<br/>[AuthContext.tsx]"]
  node_storage["Session storage<br/>[storage.ts]"]
  node_http["API client<br/>[axiosInstance.ts]"]
  node_authpages["Login and MFA<br/>[LoginPage.tsx]"]
  node_customerui["Customer screens"]
  node_roleui["Role screens<br/>[RoleListPage.tsx]"]
  node_menuui["Menu screens<br/>[CreateMenuPage.tsx]"]
end

subgraph group_security["Identity and access"]
  node_authapi["Authentication API"]
  node_authservice["Authentication service"]
  node_userstore[("User records<br/>[User.java]")]
end

subgraph group_monitoring["Transaction monitoring"]
  node_transaction["Transaction intake"]
  node_risk["Risk assessment"]
  node_detection["Rule detection"]
  node_rules[("Rule management<br/>[RuleEntity.java]")]
end

subgraph group_operations["Case operations"]
  node_alerts["Alert service<br/>[AlertService.java]"]
  node_investigation["Investigations"]
  node_approval["Approvals"]
end

subgraph group_reference["Administration data"]
  node_customer["Customer management"]
  node_department["Departments"]
  node_role["Role management<br/>[RoleService.java]"]
  node_menu["Menu management<br/>[MenuService.java]"]
  node_permission["Permissions"]
end

node_admin(("Admin user"))

node_admin -->|"uses"| node_entry
node_entry -->|"provides session"| node_authctx
node_entry -->|"renders"| node_routes
node_routes -->|"routes to"| node_authpages
node_authctx -->|"reads and writes"| node_storage
node_authctx -->|"configures interceptors"| node_http
node_authctx -.->|"redirects on logout"| node_routes
node_authpages -.->|"calls API"| node_http
node_routes -->|"routes to"| node_customerui
node_routes -->|"routes to"| node_roleui
node_routes -->|"routes to"| node_menuui
node_http -.->|"HTTP requests"| node_authapi
node_authapi -.->|"delegates to"| node_authservice
node_authservice -.->|"loads user"| node_userstore
node_http -.->|"HTTP requests"| node_customer
node_http -.->|"HTTP requests"| node_role
node_http -.->|"HTTP requests"| node_menu
node_http -.->|"HTTP requests"| node_permission
node_transaction -.->|"assesses risk"| node_risk
node_risk -.->|"evaluates rules"| node_detection
node_detection -.->|"uses active rules"| node_rules
node_risk -.->|"creates alerts"| node_alerts
node_alerts -.->|"opens cases"| node_investigation
node_investigation -.->|"submits decisions"| node_approval
node_customerui -.->|"uses API client"| node_http
node_roleui -.->|"uses API client"| node_http
node_menuui -.->|"uses API client"| node_http

click node_entry "https://github.com/neerajpatidar09/fts/blob/dev/client/src/main.tsx"
click node_routes "https://github.com/neerajpatidar09/fts/blob/dev/client/src/routes/AppRoutes.tsx"
click node_authctx "https://github.com/neerajpatidar09/fts/blob/dev/client/src/context/AuthContext.tsx"
click node_storage "https://github.com/neerajpatidar09/fts/blob/dev/client/src/utils/storage.ts"
click node_http "https://github.com/neerajpatidar09/fts/blob/dev/client/src/services/api/axiosInstance.ts"
click node_authpages "https://github.com/neerajpatidar09/fts/blob/dev/client/src/features/auth/pages/LoginPage.tsx"
click node_customerui "https://github.com/neerajpatidar09/fts/blob/dev/client/src/features/customer/pages/CustomerListPage.tsx"
click node_roleui "https://github.com/neerajpatidar09/fts/blob/dev/client/src/features/role/pages/RoleListPage.tsx"
click node_menuui "https://github.com/neerajpatidar09/fts/blob/dev/client/src/features/menu/pages/CreateMenuPage.tsx"
click node_authapi "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/security/authentication/api/AuthController.java"
click node_authservice "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/security/authentication/application/AuthenticationService.java"
click node_userstore "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/user/infrastructure/persistence/User.java"
click node_transaction "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/transaction/application/TransactionService.java"
click node_risk "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/riskassessment/application/RiskAssessmentServiceImpl.java"
click node_detection "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/detection/application/DetectionServiceImpl.java"
click node_rules "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/rulemanagement/infrastructure/persistence/RuleEntity.java"
click node_alerts "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/alert/application/AlertService.java"
click node_investigation "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/investigation/application/InvestigationService.java"
click node_approval "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/approval/application/ApprovalService.java"
click node_customer "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/customer/application/CustomerService.java"
click node_department "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/department/application/DepartmentService.java"
click node_role "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/role/application/RoleService.java"
click node_menu "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/menu/application/MenuService.java"
click node_permission "https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/permission/api/PermissionController.java"

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_entry,node_routes,node_authctx,node_storage,node_http,node_authpages,node_customerui,node_roleui,node_menuui,node_admin toneBlue
class node_authapi,node_authservice,node_userstore toneAmber
class node_transaction,node_risk,node_detection,node_rules toneMint
class node_alerts,node_investigation,node_approval toneRose
class node_customer,node_department,node_role,node_menu,node_permission toneIndigo
```

## Components

### Admin client

- [Client bootstrap](https://github.com/neerajpatidar09/fts/blob/dev/client/src/main.tsx): `client/src/main.tsx`
- [Application routes](https://github.com/neerajpatidar09/fts/blob/dev/client/src/routes/AppRoutes.tsx): `client/src/routes/AppRoutes.tsx`
- [Auth session](https://github.com/neerajpatidar09/fts/blob/dev/client/src/context/AuthContext.tsx): `client/src/context/AuthContext.tsx`
- [Session storage](https://github.com/neerajpatidar09/fts/blob/dev/client/src/utils/storage.ts): `client/src/utils/storage.ts`
- [API client](https://github.com/neerajpatidar09/fts/blob/dev/client/src/services/api/axiosInstance.ts): `client/src/services/api/axiosInstance.ts`
- [Login and MFA](https://github.com/neerajpatidar09/fts/blob/dev/client/src/features/auth/pages/LoginPage.tsx): `client/src/features/auth/pages/LoginPage.tsx`
- [Customer screens](https://github.com/neerajpatidar09/fts/blob/dev/client/src/features/customer/pages/CustomerListPage.tsx): `client/src/features/customer/pages/CustomerListPage.tsx`
- [Role screens](https://github.com/neerajpatidar09/fts/blob/dev/client/src/features/role/pages/RoleListPage.tsx): `client/src/features/role/pages/RoleListPage.tsx`
- [Menu screens](https://github.com/neerajpatidar09/fts/blob/dev/client/src/features/menu/pages/CreateMenuPage.tsx): `client/src/features/menu/pages/CreateMenuPage.tsx`

### Identity and access

- [Authentication API](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/security/authentication/api/AuthController.java): `server/src/main/java/com/lost/fts/security/authentication/api/AuthController.java`
- [Authentication service](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/security/authentication/application/AuthenticationService.java): `server/src/main/java/com/lost/fts/security/authentication/application/AuthenticationService.java`
- [User records](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/user/infrastructure/persistence/User.java): `server/src/main/java/com/lost/fts/user/infrastructure/persistence/User.java`

### Transaction monitoring

- [Transaction intake](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/transaction/application/TransactionService.java): `server/src/main/java/com/lost/fts/transaction/application/TransactionService.java`
- [Risk assessment](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/riskassessment/application/RiskAssessmentServiceImpl.java): `server/src/main/java/com/lost/fts/riskassessment/application/RiskAssessmentServiceImpl.java`
- [Rule detection](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/detection/application/DetectionServiceImpl.java): `server/src/main/java/com/lost/fts/detection/application/DetectionServiceImpl.java`
- [Rule management](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/rulemanagement/infrastructure/persistence/RuleEntity.java): `server/src/main/java/com/lost/fts/rulemanagement/infrastructure/persistence/RuleEntity.java`

### Case operations

- [Alert service](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/alert/application/AlertService.java): `server/src/main/java/com/lost/fts/alert/application/AlertService.java`
- [Investigations](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/investigation/application/InvestigationService.java): `server/src/main/java/com/lost/fts/investigation/application/InvestigationService.java`
- [Approvals](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/approval/application/ApprovalService.java): `server/src/main/java/com/lost/fts/approval/application/ApprovalService.java`

### Administration data

- [Customer management](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/customer/application/CustomerService.java): `server/src/main/java/com/lost/fts/customer/application/CustomerService.java`
- [Departments](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/department/application/DepartmentService.java): `server/src/main/java/com/lost/fts/department/application/DepartmentService.java`
- [Role management](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/role/application/RoleService.java): `server/src/main/java/com/lost/fts/role/application/RoleService.java`
- [Menu management](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/menu/application/MenuService.java): `server/src/main/java/com/lost/fts/menu/application/MenuService.java`
- [Permissions](https://github.com/neerajpatidar09/fts/blob/dev/server/src/main/java/com/lost/fts/permission/api/PermissionController.java): `server/src/main/java/com/lost/fts/permission/api/PermissionController.java`

### Other components

- **Admin user**

## Connections

- Admin user → Client bootstrap: uses (evidence: `client/src/main.tsx`)
- Client bootstrap → Auth session: provides session (evidence: `client/src/main.tsx`)
- Client bootstrap → Application routes: renders
- Application routes → Login and MFA: routes to (evidence: `client/src/routes/AppRoutes.tsx`)
- Auth session → Session storage: reads and writes (evidence: `client/src/context/AuthContext.tsx`)
- Auth session → API client: configures interceptors (evidence: `client/src/context/AuthContext.tsx`)
- Auth session → Application routes: redirects on logout
- Login and MFA → API client: calls API
- Application routes → Customer screens: routes to (evidence: `client/src/routes/AppRoutes.tsx`)
- Application routes → Role screens: routes to (evidence: `client/src/routes/AppRoutes.tsx`)
- Application routes → Menu screens: routes to (evidence: `client/src/routes/AppRoutes.tsx`)
- API client → Authentication API: HTTP requests
- Authentication API → Authentication service: delegates to
- Authentication service → User records: loads user
- API client → Customer management: HTTP requests
- API client → Role management: HTTP requests
- API client → Menu management: HTTP requests
- API client → Permissions: HTTP requests
- Transaction intake → Risk assessment: assesses risk
- Risk assessment → Rule detection: evaluates rules
- Rule detection → Rule management: uses active rules
- Risk assessment → Alert service: creates alerts
- Alert service → Investigations: opens cases
- Investigations → Approvals: submits decisions
- Customer screens → API client: uses API client
- Role screens → API client: uses API client
- Menu screens → API client: uses API client
