Overview
Tech Stack
Technologies used across frontend, backend, and mobile
Vezta is built on a modern TypeScript stack across all three subprojects. This page lists every major dependency and its role in the system.
Frontend (vezta-fe/)
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 16 | App Router, SSR, API proxy rewrites |
| React | 19 | UI rendering with Server Components |
| Tailwind CSS | v4 | CSS-first utility styling via @theme block in globals.css |
| TanStack Query | v5 | Server state management, caching (5min staleTime, 10min gcTime) |
| Kubb | -- | OpenAPI code generation (types, Zod schemas, fetch clients, hooks) |
| Socket.IO Client | v4 | Real-time WebSocket connection to /ws namespace |
| Jotai | -- | Atomic state for WebSocket data |
| Zustand | -- | Terminal sidebar panel state |
| shadcn/ui | new-york | Component primitives (dark mode, neutral base, sharp corners) |
| Lightweight Charts | v5 | TradingView financial charting (candlestick, area, line) |
| Recharts | -- | Data visualization for portfolio analytics |
| React Three Fiber | -- | 3D globe visualization on the monitor page |
| GSAP | -- | Landing page animations and transitions |
| Vitest | -- | Unit testing with jsdom environment and MSW mocking |
| Playwright | -- | End-to-end browser testing |
Key Patterns
- Kubb fetch alias -- All generated hooks route through a custom fetch wrapper (
lib/api/kubb-fetch.ts) that injects Bearer tokens and handles 401 auto-refresh, without editing generated code. - API proxy rewrite --
/api/:path*is rewritten to the backend URL innext.config.ts, keeping cookies same-origin. - Dark mode only -- Forced via ThemeProvider. Lime-green accent
#D4FF2B, Space Grotesk for headings, JetBrains Mono for prices.
Backend (vezta-be/)
| Technology | Version | Purpose |
|---|---|---|
| NestJS | -- | Module-based application framework with DI |
| Fastify | -- | HTTP server (not Express) with cookie, helmet, rate-limit plugins |
| Prisma | -- | ORM with PostgreSQL, 42+ models, Decimal for financial values |
| PostgreSQL | 17 | Primary database (Docker container on production VM) |
| Redis | -- | Caching, Socket.IO adapter, BullMQ job queue backend |
| BullMQ | -- | Background job processing (market sync, signal ingestion, leaderboard) |
| Socket.IO | -- | WebSocket server at /ws namespace, Redis adapter for scaling |
| tweetnacl | -- | Solana wallet signature verification |
| ethers | -- | EVM wallet signature verification |
| class-validator | -- | DTO validation with decorators |
| Swagger | -- | Auto-generated OpenAPI spec at /docs |
| React Email | -- | Email templates for notifications and waitlist |
| Jest | -- | Unit and E2E testing with Testcontainers |
Key Patterns
- Global JWT guard -- All routes require authentication by default. Use
@Public()to exempt endpoints. - Structured errors -- All exceptions normalize to
{ statusCode, code, message }viaGlobalExceptionFilter. - Decimal precision --
@db.Decimal(18, 2)for USD amounts,@db.Decimal(10, 6)for prices,@db.Decimal(5, 4)for rates.
Never use JavaScript floating-point numbers for financial values. The backend enforces Decimal types in Prisma for all monetary fields.
Mobile (vezta-mobile/)
| Technology | Version | Purpose |
|---|---|---|
| Expo SDK | 55 | Managed workflow with EAS Build |
| React Native | 0.83 | Cross-platform mobile rendering |
| Expo Router | -- | File-based routing with typed routes |
| NativeWind | v4 | Tailwind CSS for React Native via className prop |
| React Native Reanimated | v4 | High-performance animations (tick flash, skeleton shimmer) |
| TanStack Query | v5 | Server state with offline persistence via AsyncStorage |
| Zustand | -- | Local stores for app state |
| Jotai | -- | WebSocket atom state |
| Socket.IO | -- | Real-time data with AppState-aware connect/disconnect |
| expo-secure-store | -- | Secure token storage (refresh tokens) |
| expo-local-authentication | -- | Biometric auth (Face ID / Touch ID) |
| expo-notifications | -- | Push notifications |
| @gorhom/bottom-sheet | -- | Trading sheet and modal presentations |
| Jest + RNTL | -- | Unit testing with React Native Testing Library |
Key Patterns
- SecureStore for tokens -- Refresh tokens are stored in SecureStore, never AsyncStorage.
- AppState handling -- WebSocket disconnects on background, reconnects on foreground.
- Shared code from web --
lib/api/gen/,lib/types/,lib/trading/, andlib/ws/are copied from the frontend and kept in sync manually.
Package Manager
All three subprojects use pnpm. There is no root-level workspace package.json -- each subproject is independent with its own node_modules and lock file.