Spaces:
Running
Running
Update indedx.html
Browse files- indedx.html +187 -194
indedx.html
CHANGED
|
@@ -1,181 +1,129 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8" />
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
-
<title>Demo Bank</title>
|
| 7 |
-
|
| 8 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
-
<script src="https://cdn.plaid.com/link/v2/stable/link-initialize.js"></script>
|
| 10 |
-
<link
|
| 11 |
-
rel="stylesheet"
|
| 12 |
-
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"/>
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
<link rel="stylesheet" href="/index.css">
|
| 16 |
-
<script type="importmap">
|
| 17 |
-
{
|
| 18 |
-
"imports": {
|
| 19 |
-
"react": "https://aistudiocdn.com/react@^19.1.1",
|
| 20 |
-
"modern-treasury": "https://aistudiocdn.com/modern-treasury@^3.3.0",
|
| 21 |
-
"react-dom/": "https://aistudiocdn.com/react-dom@^19.1.1/",
|
| 22 |
-
"react/": "https://aistudiocdn.com/react@^19.1.1/",
|
| 23 |
-
"recharts": "https://aistudiocdn.com/recharts@^3.2.0",
|
| 24 |
-
"@google/genai": "https://aistudiocdn.com/@google/genai@^1.19.0",
|
| 25 |
-
"recharts/": "https://aistudiocdn.com/recharts@^3.3.0/",
|
| 26 |
-
"chart.js": "https://aistudiocdn.com/chart.js@^4.5.1",
|
| 27 |
-
"react-chartjs-2": "https://aistudiocdn.com/react-chartjs-2@^5.3.1",
|
| 28 |
-
"@tanstack/react-query": "https://aistudiocdn.com/@tanstack/react-query@^5.90.10",
|
| 29 |
-
"uuid": "https://aistudiocdn.com/uuid@^13.0.0",
|
| 30 |
-
"react-icons/": "https://aistudiocdn.com/react-icons@^5.5.0/",
|
| 31 |
-
"vite": "https://aistudiocdn.com/vite@^7.2.4",
|
| 32 |
-
"lucide-react": "https://aistudiocdn.com/lucide-react@^0.555.0",
|
| 33 |
-
"path": "https://aistudiocdn.com/path@^0.12.7",
|
| 34 |
-
"plaid": "https://aistudiocdn.com/plaid@^20.0.0",
|
| 35 |
-
"@vitejs/plugin-react": "https://aistudiocdn.com/@vitejs/plugin-react@^5.1.1",
|
| 36 |
-
"@mui/x-data-grid": "https://aistudiocdn.com/@mui/x-data-grid@^8.20.0",
|
| 37 |
-
"@mui/material": "https://aistudiocdn.com/@mui/material@^7.3.6",
|
| 38 |
-
"@google/generative-ai": "https://aistudiocdn.com/@google/generative-ai@^0.24.1",
|
| 39 |
-
"react-router-dom": "https://aistudiocdn.com/react-router-dom@^7.10.0",
|
| 40 |
-
"@mui/material/": "https://aistudiocdn.com/@mui/material@^7.3.6/",
|
| 41 |
-
"@chakra-ui/react": "https://aistudiocdn.com/@chakra-ui/react@^3.30.0",
|
| 42 |
-
"@chakra-ui/icons": "https://aistudiocdn.com/@chakra-ui/icons@^2.2.4",
|
| 43 |
-
"class-variance-authority": "https://aistudiocdn.com/class-variance-authority@^0.7.1",
|
| 44 |
-
"@hello-pangea/dnd": "https://aistudiocdn.com/@hello-pangea/dnd@18.0.1",
|
| 45 |
-
"tailwind-merge": "https://aistudiocdn.com/tailwind-merge@^3.4.0",
|
| 46 |
-
"clsx": "https://aistudiocdn.com/clsx@^2.1.1",
|
| 47 |
-
"@nestjs/common": "https://aistudiocdn.com/@nestjs/common@^11.1.9",
|
| 48 |
-
"xml2js": "https://aistudiocdn.com/xml2js@^0.6.2",
|
| 49 |
-
"axios": "https://aistudiocdn.com/axios@^1.13.2",
|
| 50 |
-
"@mui/icons-material": "https://aistudiocdn.com/@mui/icons-material@^7.3.6",
|
| 51 |
-
"primereact/": "https://aistudiocdn.com/primereact@^10.9.7/",
|
| 52 |
-
"zustand": "https://aistudiocdn.com/zustand@^5.0.9",
|
| 53 |
-
"@mui/icons-material/": "https://aistudiocdn.com/@mui/icons-material@^7.3.6/",
|
| 54 |
-
"react-hook-form": "https://aistudiocdn.com/react-hook-form@^7.67.0",
|
| 55 |
-
"inversify": "https://aistudiocdn.com/inversify@^7.10.5",
|
| 56 |
-
"react-bootstrap": "https://aistudiocdn.com/react-bootstrap@^2.10.10",
|
| 57 |
-
"@tanstack/react-table": "https://aistudiocdn.com/@tanstack/react-table@^8.21.3",
|
| 58 |
-
"@stripe/stripe-js": "https://aistudiocdn.com/@stripe/stripe-js@^8.5.3",
|
| 59 |
-
"zustand/": "https://aistudiocdn.com/zustand@^5.0.9/",
|
| 60 |
-
"dotenv": "https://aistudiocdn.com/dotenv@^17.2.3",
|
| 61 |
-
"zod": "https://aistudiocdn.com/zod@^4.1.13",
|
| 62 |
-
"fs": "https://aistudiocdn.com/fs@^0.0.1-security",
|
| 63 |
-
"framer-motion": "https://aistudiocdn.com/framer-motion@^12.23.25",
|
| 64 |
-
"notistack": "https://aistudiocdn.com/notistack@^3.0.2",
|
| 65 |
-
"date-fns": "https://aistudiocdn.com/date-fns@^4.1.0",
|
| 66 |
-
"fast-xml-parser": "https://aistudiocdn.com/fast-xml-parser@^5.3.2",
|
| 67 |
-
"react-plaid-link": "https://aistudiocdn.com/react-plaid-link@^4.1.1",
|
| 68 |
-
"js-yaml": "https://aistudiocdn.com/js-yaml@^4.1.1",
|
| 69 |
-
"styled-components": "https://aistudiocdn.com/styled-components@^6.1.19",
|
| 70 |
-
"antd": "https://aistudiocdn.com/antd@^6.0.1",
|
| 71 |
-
"@ant-design/icons": "https://aistudiocdn.com/@ant-design/icons@^6.1.0",
|
| 72 |
-
"@radix-ui/react-progress": "https://aistudiocdn.com/@radix-ui/react-progress@^1.1.8",
|
| 73 |
-
"cmdk": "https://aistudiocdn.com/cmdk@^1.1.1",
|
| 74 |
-
"@radix-ui/react-separator": "https://aistudiocdn.com/@radix-ui/react-separator@^1.1.8",
|
| 75 |
-
"@radix-ui/react-label": "https://aistudiocdn.com/@radix-ui/react-label@^2.1.8",
|
| 76 |
-
"jspdf-autotable": "https://aistudiocdn.com/jspdf-autotable@^5.0.2",
|
| 77 |
-
"jspdf": "https://aistudiocdn.com/jspdf@^3.0.4",
|
| 78 |
-
"@heroicons/react/": "https://aistudiocdn.com/@heroicons/react@^2.2.0/",
|
| 79 |
-
"express": "https://aistudiocdn.com/express@^5.2.1",
|
| 80 |
-
"url": "https://aistudiocdn.com/url@^0.11.4",
|
| 81 |
-
"reactflow/": "https://aistudiocdn.com/reactflow@^11.11.4/",
|
| 82 |
-
"reactflow": "https://aistudiocdn.com/reactflow@^11.11.4",
|
| 83 |
-
"@hookform/resolvers/": "https://aistudiocdn.com/@hookform/resolvers@^5.2.2/",
|
| 84 |
-
"sonner": "https://aistudiocdn.com/sonner@^2.0.7",
|
| 85 |
-
"@radix-ui/react-select": "https://aistudiocdn.com/@radix-ui/react-select@^2.2.6",
|
| 86 |
-
"@radix-ui/react-slot": "https://aistudiocdn.com/@radix-ui/react-slot@^1.2.4",
|
| 87 |
-
"@radix-ui/react-dialog": "https://aistudiocdn.com/@radix-ui/react-dialog@^1.1.15",
|
| 88 |
-
"stripe": "https://aistudiocdn.com/stripe@^20.0.0",
|
| 89 |
-
"antd/": "https://aistudiocdn.com/antd@^6.0.1/",
|
| 90 |
-
"react-dropzone": "https://aistudiocdn.com/react-dropzone@^14.3.8",
|
| 91 |
-
"react-circular-progressbar/": "https://aistudiocdn.com/react-circular-progressbar@^2.2.0/",
|
| 92 |
-
"react-circular-progressbar": "https://aistudiocdn.com/react-circular-progressbar@^2.2.0",
|
| 93 |
-
"chartjs-adapter-date-fns": "https://aistudiocdn.com/chartjs-adapter-date-fns@^3.0.0",
|
| 94 |
-
"react-select": "https://aistudiocdn.com/react-select@^5.10.2",
|
| 95 |
-
"@rjsf/core": "https://aistudiocdn.com/@rjsf/core@^6.1.2",
|
| 96 |
-
"@stripe/react-stripe-js": "https://aistudiocdn.com/@stripe/react-stripe-js@^5.4.1",
|
| 97 |
-
"json-schema": "https://aistudiocdn.com/json-schema@^0.4.0",
|
| 98 |
-
"@radix-ui/react-popover": "https://aistudiocdn.com/@radix-ui/react-popover@^1.1.15",
|
| 99 |
-
"@rjsf/validator-ajv8": "https://aistudiocdn.com/@rjsf/validator-ajv8@^6.1.2"
|
| 100 |
-
}
|
| 101 |
-
}
|
| 102 |
-
</script>
|
| 103 |
-
<script type="module" crossorigin src="./assets/index-DiduAcFU.js"></script>
|
| 104 |
-
<link rel="stylesheet" crossorigin href="./assets/index-B-SB0IAk.css">
|
| 105 |
-
</head>
|
| 106 |
-
|
| 107 |
-
<body class="bg-gray-900">
|
| 108 |
-
<div id="root"></div>
|
| 109 |
-
|
| 110 |
-
<!-- No API key, nothing injected, nothing global -->
|
| 111 |
-
</body>
|
| 112 |
-
</html>
|
| 113 |
-
aa
|
| 114 |
-
3.61 MB
|
| 115 |
-
Rename assets/index-BoHSF06O.js to assets/aa
|
| 116 |
-
about 3 hours ago
|
| 117 |
-
html2canvas.esm-QH1iLAAe.js
|
| 118 |
-
202 kB
|
| 119 |
-
Rename assets/html2canvas.esm-QH1iLAAe (1).js to assets/html2canvas.esm-QH1iLAAe.js
|
| 120 |
-
15 days ago
|
| 121 |
-
index-B-SB0IAk.css
|
| 122 |
-
23.8 kB
|
| 123 |
-
Upload 5 files
|
| 124 |
-
15 days ago
|
| 125 |
-
index-BoHSF06O.js
|
| 126 |
-
6.08 MB
|
| 127 |
-
Upload index-BoHSF06O.js
|
| 128 |
-
about 2 hours ago
|
| 129 |
-
index-DiduAcFU.js
|
| 130 |
-
6.52 MB<!DOCTYPE html>
|
| 131 |
<html lang="en">
|
| 132 |
<head>
|
| 133 |
<meta charset="UTF-8" />
|
| 134 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 135 |
<title>Sovereign AI Banking Nexus</title>
|
| 136 |
|
| 137 |
-
<!-- TailwindCSS -->
|
| 138 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 139 |
|
| 140 |
-
<!-- Font Awesome -->
|
| 141 |
-
<link
|
| 142 |
-
|
| 143 |
-
|
|
|
|
| 144 |
|
| 145 |
-
<!-- Plaid Link -->
|
| 146 |
<script src="https://cdn.plaid.com/link/v2/stable/link-initialize.js"></script>
|
| 147 |
|
| 148 |
-
<!--
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
<script type="importmap">
|
| 150 |
{
|
| 151 |
"imports": {
|
|
|
|
| 152 |
"react": "https://aistudiocdn.com/react@^19.1.1",
|
| 153 |
-
"
|
| 154 |
-
"
|
| 155 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
}
|
| 157 |
}
|
| 158 |
</script>
|
| 159 |
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
#root { display: flex; justify-content: center; align-items: flex-start; padding: 2rem; min-height: 100vh; }
|
| 163 |
-
.card { background: #1f2937; padding: 1.5rem; border-radius: 0.5rem; box-shadow: 0 2px 10px rgba(0,0,0,0.5); width: 100%; max-width: 600px; }
|
| 164 |
-
button { background-color: #3b82f6; color: white; padding: 0.5rem 1rem; border-radius: 0.375rem; cursor: pointer; border: none; margin-top: 0.5rem; }
|
| 165 |
-
button:hover { background-color: #2563eb; }
|
| 166 |
-
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
|
| 167 |
-
th, td { border: 1px solid #374151; padding: 0.5rem; text-align: left; }
|
| 168 |
-
th { background-color: #111827; }
|
| 169 |
-
</style>
|
| 170 |
</head>
|
| 171 |
-
|
|
|
|
| 172 |
<div id="root"></div>
|
| 173 |
|
| 174 |
-
|
|
|
|
| 175 |
import React from 'react';
|
| 176 |
import ReactDOM from 'react-dom/client';
|
| 177 |
import { Auth0Provider, useAuth0 } from "@auth0/auth0-react";
|
| 178 |
-
import { LineChart, Line, XAxis, YAxis, Tooltip, CartesianGrid } from 'recharts';
|
| 179 |
|
| 180 |
// Failsafe fetch for transactions
|
| 181 |
async function fetchTransactions(token) {
|
|
@@ -186,6 +134,7 @@ index-DiduAcFU.js
|
|
| 186 |
if (!res.ok) throw new Error('Fetch failed');
|
| 187 |
return await res.json();
|
| 188 |
} catch (e) {
|
|
|
|
| 189 |
// fallback transactions
|
| 190 |
return {
|
| 191 |
data: [
|
|
@@ -198,80 +147,124 @@ index-DiduAcFU.js
|
|
| 198 |
|
| 199 |
function TransactionsTable({ transactions }) {
|
| 200 |
return (
|
| 201 |
-
<
|
| 202 |
-
<
|
| 203 |
-
<
|
| 204 |
-
<
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
</thead>
|
| 211 |
-
<tbody>
|
| 212 |
-
{transactions.map(txn => (
|
| 213 |
-
<tr key={txn.id}>
|
| 214 |
-
<td>{txn.id}</td>
|
| 215 |
-
<td>{txn.description}</td>
|
| 216 |
-
<td>${txn.amount}</td>
|
| 217 |
-
<td>{txn.status}</td>
|
| 218 |
-
<td>{txn.date || '-'}</td>
|
| 219 |
</tr>
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 223 |
);
|
| 224 |
}
|
| 225 |
|
| 226 |
function TransactionsChart({ transactions }) {
|
| 227 |
const chartData = transactions.map(txn => ({ date: txn.date || txn.id, amount: txn.amount }));
|
|
|
|
| 228 |
return (
|
| 229 |
-
<
|
| 230 |
-
<
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
);
|
| 237 |
}
|
| 238 |
|
| 239 |
function App() {
|
| 240 |
-
const { loginWithRedirect, logout, isAuthenticated, getAccessTokenSilently } = useAuth0();
|
| 241 |
const [transactions, setTransactions] = React.useState([]);
|
| 242 |
|
| 243 |
React.useEffect(() => {
|
| 244 |
if (isAuthenticated) {
|
| 245 |
getAccessTokenSilently()
|
| 246 |
.then(token => fetchTransactions(token))
|
| 247 |
-
.then(data => setTransactions(data.data || []))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
}
|
| 249 |
}, [isAuthenticated]);
|
| 250 |
|
| 251 |
-
return
|
| 252 |
-
<div className="card">
|
| 253 |
-
<h1 className="text-2xl mb-4">Sovereign AI Banking Nexus</h1>
|
| 254 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
{!isAuthenticated ? (
|
| 256 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
) : (
|
| 258 |
<>
|
| 259 |
-
<
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
</>
|
| 266 |
)}
|
| 267 |
</div>
|
| 268 |
);
|
| 269 |
}
|
| 270 |
|
|
|
|
| 271 |
const domain = "citibankdemobusinessinc.us.auth0.com";
|
| 272 |
const clientId = "rsBLCcuq5MVA9Dj84NEVdDqpOFePLsjI";
|
| 273 |
|
| 274 |
-
ReactDOM.createRoot(document.getElementById('root'))
|
|
|
|
| 275 |
<Auth0Provider
|
| 276 |
domain={domain}
|
| 277 |
clientId={clientId}
|
|
@@ -282,4 +275,4 @@ index-DiduAcFU.js
|
|
| 282 |
);
|
| 283 |
</script>
|
| 284 |
</body>
|
| 285 |
-
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8" />
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
<title>Sovereign AI Banking Nexus</title>
|
| 7 |
|
| 8 |
+
<!-- 1. TailwindCSS -->
|
| 9 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
|
| 11 |
+
<!-- 2. Font Awesome -->
|
| 12 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"/>
|
| 13 |
+
|
| 14 |
+
<!-- 3. Babel Standalone (REQUIRED for static React/JSX execution) -->
|
| 15 |
+
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
| 16 |
|
| 17 |
+
<!-- 4. Plaid Link -->
|
| 18 |
<script src="https://cdn.plaid.com/link/v2/stable/link-initialize.js"></script>
|
| 19 |
|
| 20 |
+
<!-- 5. User's Existing CSS Assets (Kept as requested) -->
|
| 21 |
+
<link rel="stylesheet" href="/index.css">
|
| 22 |
+
<link rel="stylesheet" crossorigin href="./assets/index-B-SB0IAk.css">
|
| 23 |
+
|
| 24 |
+
<!-- 6. THE MASSIVE IMPORT MAP (Preserved & Auth0 Added) -->
|
| 25 |
<script type="importmap">
|
| 26 |
{
|
| 27 |
"imports": {
|
| 28 |
+
"@auth0/auth0-react": "https://esm.sh/@auth0/auth0-react@2.2.4?external=react,react-dom",
|
| 29 |
"react": "https://aistudiocdn.com/react@^19.1.1",
|
| 30 |
+
"modern-treasury": "https://aistudiocdn.com/modern-treasury@^3.3.0",
|
| 31 |
+
"react-dom/": "https://aistudiocdn.com/react-dom@^19.1.1/",
|
| 32 |
+
"react-dom/client": "https://aistudiocdn.com/react-dom@^19.1.1/client",
|
| 33 |
+
"recharts": "https://aistudiocdn.com/recharts@^3.2.0",
|
| 34 |
+
"@google/genai": "https://aistudiocdn.com/@google/genai@^1.19.0",
|
| 35 |
+
"recharts/": "https://aistudiocdn.com/recharts@^3.3.0/",
|
| 36 |
+
"chart.js": "https://aistudiocdn.com/chart.js@^4.5.1",
|
| 37 |
+
"react-chartjs-2": "https://aistudiocdn.com/react-chartjs-2@^5.3.1",
|
| 38 |
+
"@tanstack/react-query": "https://aistudiocdn.com/@tanstack/react-query@^5.90.10",
|
| 39 |
+
"uuid": "https://aistudiocdn.com/uuid@^13.0.0",
|
| 40 |
+
"react-icons/": "https://aistudiocdn.com/react-icons@^5.5.0/",
|
| 41 |
+
"vite": "https://aistudiocdn.com/vite@^7.2.4",
|
| 42 |
+
"lucide-react": "https://aistudiocdn.com/lucide-react@^0.555.0",
|
| 43 |
+
"path": "https://aistudiocdn.com/path@^0.12.7",
|
| 44 |
+
"plaid": "https://aistudiocdn.com/plaid@^20.0.0",
|
| 45 |
+
"@vitejs/plugin-react": "https://aistudiocdn.com/@vitejs/plugin-react@^5.1.1",
|
| 46 |
+
"@mui/x-data-grid": "https://aistudiocdn.com/@mui/x-data-grid@^8.20.0",
|
| 47 |
+
"@mui/material": "https://aistudiocdn.com/@mui/material@^7.3.6",
|
| 48 |
+
"@google/generative-ai": "https://aistudiocdn.com/@google/generative-ai@^0.24.1",
|
| 49 |
+
"react-router-dom": "https://aistudiocdn.com/react-router-dom@^7.10.0",
|
| 50 |
+
"@mui/material/": "https://aistudiocdn.com/@mui/material@^7.3.6/",
|
| 51 |
+
"@chakra-ui/react": "https://aistudiocdn.com/@chakra-ui/react@^3.30.0",
|
| 52 |
+
"@chakra-ui/icons": "https://aistudiocdn.com/@chakra-ui/icons@^2.2.4",
|
| 53 |
+
"class-variance-authority": "https://aistudiocdn.com/class-variance-authority@^0.7.1",
|
| 54 |
+
"@hello-pangea/dnd": "https://aistudiocdn.com/@hello-pangea/dnd@18.0.1",
|
| 55 |
+
"tailwind-merge": "https://aistudiocdn.com/tailwind-merge@^3.4.0",
|
| 56 |
+
"clsx": "https://aistudiocdn.com/clsx@^2.1.1",
|
| 57 |
+
"@nestjs/common": "https://aistudiocdn.com/@nestjs/common@^11.1.9",
|
| 58 |
+
"xml2js": "https://aistudiocdn.com/xml2js@^0.6.2",
|
| 59 |
+
"axios": "https://aistudiocdn.com/axios@^1.13.2",
|
| 60 |
+
"@mui/icons-material": "https://aistudiocdn.com/@mui/icons-material@^7.3.6",
|
| 61 |
+
"primereact/": "https://aistudiocdn.com/primereact@^10.9.7/",
|
| 62 |
+
"zustand": "https://aistudiocdn.com/zustand@^5.0.9",
|
| 63 |
+
"@mui/icons-material/": "https://aistudiocdn.com/@mui/icons-material@^7.3.6/",
|
| 64 |
+
"react-hook-form": "https://aistudiocdn.com/react-hook-form@^7.67.0",
|
| 65 |
+
"inversify": "https://aistudiocdn.com/inversify@^7.10.5",
|
| 66 |
+
"react-bootstrap": "https://aistudiocdn.com/react-bootstrap@^2.10.10",
|
| 67 |
+
"@tanstack/react-table": "https://aistudiocdn.com/@tanstack/react-table@^8.21.3",
|
| 68 |
+
"@stripe/stripe-js": "https://aistudiocdn.com/@stripe/stripe-js@^8.5.3",
|
| 69 |
+
"zustand/": "https://aistudiocdn.com/zustand@^5.0.9/",
|
| 70 |
+
"dotenv": "https://aistudiocdn.com/dotenv@^17.2.3",
|
| 71 |
+
"zod": "https://aistudiocdn.com/zod@^4.1.13",
|
| 72 |
+
"fs": "https://aistudiocdn.com/fs@^0.0.1-security",
|
| 73 |
+
"framer-motion": "https://aistudiocdn.com/framer-motion@^12.23.25",
|
| 74 |
+
"notistack": "https://aistudiocdn.com/notistack@^3.0.2",
|
| 75 |
+
"date-fns": "https://aistudiocdn.com/date-fns@^4.1.0",
|
| 76 |
+
"fast-xml-parser": "https://aistudiocdn.com/fast-xml-parser@^5.3.2",
|
| 77 |
+
"react-plaid-link": "https://aistudiocdn.com/react-plaid-link@^4.1.1",
|
| 78 |
+
"js-yaml": "https://aistudiocdn.com/js-yaml@^4.1.1",
|
| 79 |
+
"styled-components": "https://aistudiocdn.com/styled-components@^6.1.19",
|
| 80 |
+
"antd": "https://aistudiocdn.com/antd@^6.0.1",
|
| 81 |
+
"@ant-design/icons": "https://aistudiocdn.com/@ant-design/icons@^6.1.0",
|
| 82 |
+
"@radix-ui/react-progress": "https://aistudiocdn.com/@radix-ui/react-progress@^1.1.8",
|
| 83 |
+
"cmdk": "https://aistudiocdn.com/cmdk@^1.1.1",
|
| 84 |
+
"@radix-ui/react-separator": "https://aistudiocdn.com/@radix-ui/react-separator@^1.1.8",
|
| 85 |
+
"@radix-ui/react-label": "https://aistudiocdn.com/@radix-ui/react-label@^2.1.8",
|
| 86 |
+
"jspdf-autotable": "https://aistudiocdn.com/jspdf-autotable@^5.0.2",
|
| 87 |
+
"jspdf": "https://aistudiocdn.com/jspdf@^3.0.4",
|
| 88 |
+
"@heroicons/react/": "https://aistudiocdn.com/@heroicons/react@^2.2.0/",
|
| 89 |
+
"express": "https://aistudiocdn.com/express@^5.2.1",
|
| 90 |
+
"url": "https://aistudiocdn.com/url@^0.11.4",
|
| 91 |
+
"reactflow/": "https://aistudiocdn.com/reactflow@^11.11.4/",
|
| 92 |
+
"reactflow": "https://aistudiocdn.com/reactflow@^11.11.4",
|
| 93 |
+
"@hookform/resolvers/": "https://aistudiocdn.com/@hookform/resolvers@^5.2.2/",
|
| 94 |
+
"sonner": "https://aistudiocdn.com/sonner@^2.0.7",
|
| 95 |
+
"@radix-ui/react-select": "https://aistudiocdn.com/@radix-ui/react-select@^2.2.6",
|
| 96 |
+
"@radix-ui/react-slot": "https://aistudiocdn.com/@radix-ui/react-slot@^1.2.4",
|
| 97 |
+
"@radix-ui/react-dialog": "https://aistudiocdn.com/@radix-ui/react-dialog@^1.1.15",
|
| 98 |
+
"stripe": "https://aistudiocdn.com/stripe@^20.0.0",
|
| 99 |
+
"antd/": "https://aistudiocdn.com/antd@^6.0.1/",
|
| 100 |
+
"react-dropzone": "https://aistudiocdn.com/react-dropzone@^14.3.8",
|
| 101 |
+
"react-circular-progressbar/": "https://aistudiocdn.com/react-circular-progressbar@^2.2.0/",
|
| 102 |
+
"react-circular-progressbar": "https://aistudiocdn.com/react-circular-progressbar@^2.2.0",
|
| 103 |
+
"chartjs-adapter-date-fns": "https://aistudiocdn.com/chartjs-adapter-date-fns@^3.0.0",
|
| 104 |
+
"react-select": "https://aistudiocdn.com/react-select@^5.10.2",
|
| 105 |
+
"@rjsf/core": "https://aistudiocdn.com/@rjsf/core@^6.1.2",
|
| 106 |
+
"@stripe/react-stripe-js": "https://aistudiocdn.com/@stripe/react-stripe-js@^5.4.1",
|
| 107 |
+
"json-schema": "https://aistudiocdn.com/json-schema@^0.4.0",
|
| 108 |
+
"@radix-ui/react-popover": "https://aistudiocdn.com/@radix-ui/react-popover@^1.1.15",
|
| 109 |
+
"@rjsf/validator-ajv8": "https://aistudiocdn.com/@rjsf/validator-ajv8@^6.1.2"
|
| 110 |
}
|
| 111 |
}
|
| 112 |
</script>
|
| 113 |
|
| 114 |
+
<!-- 7. User's JS asset script (Kept as requested) -->
|
| 115 |
+
<script type="module" crossorigin src="./assets/index-DiduAcFU.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
</head>
|
| 117 |
+
|
| 118 |
+
<body class="bg-gray-900 text-white">
|
| 119 |
<div id="root"></div>
|
| 120 |
|
| 121 |
+
<!-- 8. THE STATIC RUNNING APPLICATION LOGIC -->
|
| 122 |
+
<script type="text/babel" data-type="module">
|
| 123 |
import React from 'react';
|
| 124 |
import ReactDOM from 'react-dom/client';
|
| 125 |
import { Auth0Provider, useAuth0 } from "@auth0/auth0-react";
|
| 126 |
+
import { LineChart, Line, XAxis, YAxis, Tooltip, CartesianGrid, ResponsiveContainer } from 'recharts';
|
| 127 |
|
| 128 |
// Failsafe fetch for transactions
|
| 129 |
async function fetchTransactions(token) {
|
|
|
|
| 134 |
if (!res.ok) throw new Error('Fetch failed');
|
| 135 |
return await res.json();
|
| 136 |
} catch (e) {
|
| 137 |
+
console.warn("Using fallback data");
|
| 138 |
// fallback transactions
|
| 139 |
return {
|
| 140 |
data: [
|
|
|
|
| 147 |
|
| 148 |
function TransactionsTable({ transactions }) {
|
| 149 |
return (
|
| 150 |
+
<div className="overflow-x-auto">
|
| 151 |
+
<table className="min-w-full text-left border-collapse mt-4">
|
| 152 |
+
<thead>
|
| 153 |
+
<tr className="bg-gray-800 border-b border-gray-700">
|
| 154 |
+
<th className="p-3 border-r border-gray-700">ID</th>
|
| 155 |
+
<th className="p-3 border-r border-gray-700">Description</th>
|
| 156 |
+
<th className="p-3 border-r border-gray-700">Amount</th>
|
| 157 |
+
<th className="p-3 border-r border-gray-700">Status</th>
|
| 158 |
+
<th className="p-3">Date</th>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
</tr>
|
| 160 |
+
</thead>
|
| 161 |
+
<tbody>
|
| 162 |
+
{transactions.map((txn, idx) => (
|
| 163 |
+
<tr key={txn.id || idx} className="border-b border-gray-700 hover:bg-gray-800">
|
| 164 |
+
<td className="p-3 border-r border-gray-700">{txn.id}</td>
|
| 165 |
+
<td className="p-3 border-r border-gray-700">{txn.description}</td>
|
| 166 |
+
<td className="p-3 border-r border-gray-700 text-green-400">${txn.amount}</td>
|
| 167 |
+
<td className="p-3 border-r border-gray-700">{txn.status}</td>
|
| 168 |
+
<td className="p-3">{txn.date || '-'}</td>
|
| 169 |
+
</tr>
|
| 170 |
+
))}
|
| 171 |
+
</tbody>
|
| 172 |
+
</table>
|
| 173 |
+
</div>
|
| 174 |
);
|
| 175 |
}
|
| 176 |
|
| 177 |
function TransactionsChart({ transactions }) {
|
| 178 |
const chartData = transactions.map(txn => ({ date: txn.date || txn.id, amount: txn.amount }));
|
| 179 |
+
|
| 180 |
return (
|
| 181 |
+
<div style={{ width: '100%', height: 300, marginTop: '20px' }}>
|
| 182 |
+
<ResponsiveContainer width="100%" height="100%">
|
| 183 |
+
<LineChart data={chartData}>
|
| 184 |
+
<XAxis dataKey="date" stroke="#f9fafb" />
|
| 185 |
+
<YAxis stroke="#f9fafb" />
|
| 186 |
+
<Tooltip
|
| 187 |
+
contentStyle={{ backgroundColor: '#1f2937', border: '1px solid #374151' }}
|
| 188 |
+
itemStyle={{ color: '#fff' }}
|
| 189 |
+
/>
|
| 190 |
+
<CartesianGrid stroke="#374151" strokeDasharray="5 5" />
|
| 191 |
+
<Line type="monotone" dataKey="amount" stroke="#3b82f6" strokeWidth={2} />
|
| 192 |
+
</LineChart>
|
| 193 |
+
</ResponsiveContainer>
|
| 194 |
+
</div>
|
| 195 |
);
|
| 196 |
}
|
| 197 |
|
| 198 |
function App() {
|
| 199 |
+
const { loginWithRedirect, logout, isAuthenticated, getAccessTokenSilently, user, isLoading } = useAuth0();
|
| 200 |
const [transactions, setTransactions] = React.useState([]);
|
| 201 |
|
| 202 |
React.useEffect(() => {
|
| 203 |
if (isAuthenticated) {
|
| 204 |
getAccessTokenSilently()
|
| 205 |
.then(token => fetchTransactions(token))
|
| 206 |
+
.then(data => setTransactions(data.data || []))
|
| 207 |
+
.catch(err => {
|
| 208 |
+
// Fallback if silent token fails
|
| 209 |
+
fetchTransactions("mock_token").then(data => setTransactions(data.data || []));
|
| 210 |
+
});
|
| 211 |
}
|
| 212 |
}, [isAuthenticated]);
|
| 213 |
|
| 214 |
+
if (isLoading) return <div className="text-white text-center mt-20 text-2xl animate-pulse">Initializing Sovereign Banking...</div>;
|
|
|
|
|
|
|
| 215 |
|
| 216 |
+
return (
|
| 217 |
+
<div className="card w-full max-w-4xl mx-auto p-6 bg-gray-800 rounded-lg shadow-2xl mt-10">
|
| 218 |
+
<h1 className="text-3xl font-bold mb-4 text-blue-400 border-b border-gray-700 pb-2">
|
| 219 |
+
<i className="fas fa-university mr-2"></i> Sovereign AI Banking Nexus
|
| 220 |
+
</h1>
|
| 221 |
+
|
| 222 |
{!isAuthenticated ? (
|
| 223 |
+
<div className="text-center py-10">
|
| 224 |
+
<p className="mb-6 text-gray-300 text-lg">Secure identity federation required for financial data access.</p>
|
| 225 |
+
<button className="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-6 rounded transition duration-200" onClick={() => loginWithRedirect()}>
|
| 226 |
+
<i className="fas fa-fingerprint mr-2"></i> Authenticate Identity
|
| 227 |
+
</button>
|
| 228 |
+
</div>
|
| 229 |
) : (
|
| 230 |
<>
|
| 231 |
+
<div className="flex justify-between items-center mb-6 bg-gray-700 p-4 rounded">
|
| 232 |
+
<div className="flex items-center">
|
| 233 |
+
{user.picture && <img src={user.picture} alt="Profile" className="w-10 h-10 rounded-full mr-3 border border-blue-400" />}
|
| 234 |
+
<span className="text-gray-200 font-semibold">{user.name}</span>
|
| 235 |
+
</div>
|
| 236 |
+
<button className="bg-red-600 hover:bg-red-700 text-white py-1 px-4 rounded text-sm transition" onClick={() => logout({ returnTo: window.location.origin })}>
|
| 237 |
+
Logout
|
| 238 |
+
</button>
|
| 239 |
+
</div>
|
| 240 |
+
|
| 241 |
+
<div className="bg-gray-900 p-4 rounded mb-6 border border-gray-700">
|
| 242 |
+
<h2 className="text-xl font-semibold mb-2 text-blue-300">Portfolio Analytics</h2>
|
| 243 |
+
<TransactionsChart transactions={transactions} />
|
| 244 |
+
</div>
|
| 245 |
+
|
| 246 |
+
<div className="bg-gray-900 p-4 rounded border border-gray-700">
|
| 247 |
+
<h2 className="text-xl font-semibold mb-2 text-blue-300">Recent Transactions</h2>
|
| 248 |
+
<TransactionsTable transactions={transactions} />
|
| 249 |
+
</div>
|
| 250 |
+
|
| 251 |
+
<div className="mt-6 pt-4 border-t border-gray-700">
|
| 252 |
+
<button className="bg-green-600 hover:bg-green-700 text-white w-full py-3 rounded font-bold transition flex items-center justify-center" onClick={() => alert('Plaid Link initialized')}>
|
| 253 |
+
<i className="fas fa-link mr-2"></i> Link External Accounts (Plaid)
|
| 254 |
+
</button>
|
| 255 |
+
</div>
|
| 256 |
</>
|
| 257 |
)}
|
| 258 |
</div>
|
| 259 |
);
|
| 260 |
}
|
| 261 |
|
| 262 |
+
// Auth0 Configuration
|
| 263 |
const domain = "citibankdemobusinessinc.us.auth0.com";
|
| 264 |
const clientId = "rsBLCcuq5MVA9Dj84NEVdDqpOFePLsjI";
|
| 265 |
|
| 266 |
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
| 267 |
+
root.render(
|
| 268 |
<Auth0Provider
|
| 269 |
domain={domain}
|
| 270 |
clientId={clientId}
|
|
|
|
| 275 |
);
|
| 276 |
</script>
|
| 277 |
</body>
|
| 278 |
+
</html>
|