Architecture Overview
A high-level overview of Shiru’s technology for those curious about how the platform works.
Platform Components
Section titled “Platform Components”┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐│ Shiru Frontend │────▶│ Shiru API │────▶│ Database ││ (xiru.vercel.app) │ (Backend) │ │ ││ Next.js │ │ REST API │ │ PostgreSQL │└─────────────────┘ └──────────────────┘ └─────────────────┘ │ ┌──────────────────┐ │ Blockchain │ │ Networks (4) │ │ via RPC │ └──────────────────┘Frontend (What Users See)
Section titled “Frontend (What Users See)”| Component | Technology | Purpose |
|---|---|---|
| Framework | Next.js 16 | Web application, routing, SSR |
| Language | TypeScript | Type-safe code |
| Styling | Tailwind CSS + shadcn/ui | UI components and design |
| State | Zustand + React Query | Client state + server data caching |
| Web3 | Wagmi + Reown AppKit | Wallet connection and blockchain interaction |
| Auth | SIWE (Sign-In with Ethereum) | Wallet-based authentication |
Authentication Flow
Section titled “Authentication Flow”Email Authentication
Section titled “Email Authentication”User → Email + Password → API verifies → PIN sent to email → User enters PIN → Session token issuedWallet Authentication (SIWE)
Section titled “Wallet Authentication (SIWE)”User → Connects wallet → Signs message (free) → API verifies signature → Session token issuedBoth methods result in a JWT (JSON Web Token) that authenticates all subsequent requests.
Security Measures
Section titled “Security Measures”- HTTPS everywhere — all communication encrypted in transit
- JWT tokens — auto-expire, cleared on logout or suspicious activity
- SIWE standard — industry-standard wallet authentication (EIP-4361)
- Input validation — all user input validated on frontend and backend
- No private key access — Shiru never has access to your wallet’s private keys
- Role-based access — admin features restricted to authorized users only
Supported Chains
Section titled “Supported Chains”| Chain | Chain ID | Type |
|---|---|---|
| Ethereum | 1 | L1 |
| Arbitrum | 42161 | L2 (Optimistic) |
| Base | 8453 | L2 (Optimistic) |
| BNB Chain | 56 | L1 |
The backend REST API handles:
- User registration and authentication
- KYC/KYB document submission and review
- Survey response storage and processing
- Portfolio data aggregation across chains
- AI recommendation generation
- Admin operations (user management, analytics)
Data Privacy
Section titled “Data Privacy”- User data stored in secure database with encryption at rest
- KYC documents handled per regulatory requirements
- Wallet addresses are public blockchain data (not private information)
- Account deletion removes all stored personal data