Architecture
React 19 + TypeScript SPA connecting to a Calimero node via HTTP REST
Component Tree
Source Structure
Authentication Flow
The dashboard authenticates with the node using JWT tokens.
Login Page
User navigates to ConnectPage, enters the node URL and credentials. The dashboard calls the node's auth endpoint.
Token Storage
JWT access token and refresh token are stored in localStorage. The node URL is also stored for subsequent requests.
Authenticated Requests
All API hooks attach the Authorization: Bearer header to every request. Expired tokens trigger a refresh before retrying.
Logout
Clears stored tokens and node URL, redirects to the login page.
Tech Stack
React 19
Latest React with concurrent features. Uses functional components and hooks throughout — no class components.
TypeScript
Strict mode enabled. All API response types are defined; no implicit any.
Vite
Fast HMR in development, optimized production bundles. Config in vite.config.ts.
React Router
Client-side routing for all pages. Route definitions in App.tsx.
Styled Components / Emotion
CSS-in-JS for component styling. Shared theme tokens for colors, spacing, and typography.
pnpm
Fast, disk-efficient package manager. Lockfile committed for reproducible installs.