-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview_blueprint.html
More file actions
170 lines (150 loc) · 3.96 KB
/
view_blueprint.html
File metadata and controls
170 lines (150 loc) · 3.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html>
<head>
<title>Fintech Banking System Blueprint</title>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
.diagram { margin: 20px 0; }
h2 { color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 5px; }
</style>
</head>
<body>
<h1>🏦 Fintech Banking System - Architecture Blueprint</h1>
<h2>High-Level System Architecture</h2>
<div class="diagram">
<div class="mermaid">
graph TB
subgraph "Customer-Facing Architecture"
CWeb[Customer Web App]
CMobile[Customer Mobile App]
CAPI[Customer API Gateway]
end
subgraph "Bank Admin Architecture"
AWeb[Admin Web Portal]
AAPI[Admin API Gateway]
RBAC[RBAC Service]
end
subgraph "Core Microservices"
US[User Service]
AS[Account Service]
TS[Transaction Service]
CS[Card Service]
LS[Loan Service]
IS[Investment Service]
NS[Notification Service]
FDS[Fraud Detection Service]
COS[Compliance Service]
ADS[Admin Service]
end
subgraph "Data Layer"
PG[(PostgreSQL)]
Redis[(Redis Cache)]
S3[(AWS S3)]
end
CWeb --> CAPI
CMobile --> CAPI
AWeb --> AAPI
CAPI --> US
CAPI --> AS
CAPI --> TS
CAPI --> CS
CAPI --> LS
CAPI --> IS
AAPI --> RBAC
RBAC --> ADS
AAPI --> US
AAPI --> AS
AAPI --> TS
AAPI --> FDS
AAPI --> COS
US --> PG
AS --> PG
TS --> PG
CS --> PG
LS --> PG
IS --> PG
ADS --> PG
US --> Redis
AS --> Redis
TS --> Redis
</div>
</div>
<h2>RBAC Role Hierarchy</h2>
<div class="diagram">
<div class="mermaid">
graph TB
subgraph "Executive Level"
CEO[CEO<br/>All Permissions]
GM[General Manager<br/>Branch Operations]
BM[Branch Manager<br/>Branch Level Control]
end
subgraph "Operations Level"
OM[Operations Manager<br/>Daily Operations]
CSM[Customer Service Manager<br/>Customer Issues]
LM[Loan Manager<br/>Loan Operations]
end
subgraph "Specialist Roles"
CO[Compliance Officer<br/>Regulatory Compliance]
FO[Fraud Officer<br/>Fraud Investigation]
AU[Auditor<br/>Audit & Review]
RO[Risk Officer<br/>Risk Assessment]
end
subgraph "Front-line Staff"
CSR[Customer Service Rep<br/>Customer Support]
LO[Loan Officer<br/>Loan Processing]
TO[Teller<br/>Basic Transactions]
SO[System Operator<br/>System Maintenance]
end
CEO --> GM
GM --> BM
BM --> OM
BM --> CSM
BM --> LM
OM --> CSR
OM --> TO
OM --> SO
CSM --> CSR
LM --> LO
CEO --> CO
CEO --> FO
CEO --> AU
CEO --> RO
</div>
</div>
<h2>Authentication Flow</h2>
<div class="diagram">
<div class="mermaid">
sequenceDiagram
participant C as Customer/Admin
participant FE as Frontend
participant AG as API Gateway
participant AS as Auth Service
participant DB as PostgreSQL
participant Redis as Redis Cache
C->>FE: Login Request
FE->>AG: POST /auth/login
AG->>AS: Validate Credentials
AS->>DB: Check User/Admin
DB-->>AS: User Details
AS->>AS: Generate JWT + Refresh Token
AS->>Redis: Store Session
AS-->>AG: JWT + Refresh Token
AG-->>FE: Authentication Response
FE->>FE: Store JWT in HttpOnly Cookie
Note over C,Redis: Subsequent API Calls
C->>FE: API Request
FE->>AG: Request with JWT
AG->>AG: Validate JWT
AG->>Redis: Check Session
Redis-->>AG: Session Valid
AG->>AS: Check Permissions (Admin)
AS-->>AG: Permission Result
AG->>AG: Route to Service
</div>
</div>
<script>
mermaid.initialize({ startOnLoad: true });
</script>
</body>
</html>