VeztaVezta
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/)

TechnologyVersionPurpose
Next.js16App Router, SSR, API proxy rewrites
React19UI rendering with Server Components
Tailwind CSSv4CSS-first utility styling via @theme block in globals.css
TanStack Queryv5Server state management, caching (5min staleTime, 10min gcTime)
Kubb--OpenAPI code generation (types, Zod schemas, fetch clients, hooks)
Socket.IO Clientv4Real-time WebSocket connection to /ws namespace
Jotai--Atomic state for WebSocket data
Zustand--Terminal sidebar panel state
shadcn/uinew-yorkComponent primitives (dark mode, neutral base, sharp corners)
Lightweight Chartsv5TradingView 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 in next.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/)

TechnologyVersionPurpose
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
PostgreSQL17Primary 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 } via GlobalExceptionFilter.
  • 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/)

TechnologyVersionPurpose
Expo SDK55Managed workflow with EAS Build
React Native0.83Cross-platform mobile rendering
Expo Router--File-based routing with typed routes
NativeWindv4Tailwind CSS for React Native via className prop
React Native Reanimatedv4High-performance animations (tick flash, skeleton shimmer)
TanStack Queryv5Server 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/, and lib/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.

On this page