Skip to main content

Overview

Autonome is built with modern, type-safe technologies prioritizing developer experience, performance, and real-time capabilities. This page documents every major dependency, its version, and its specific role in the architecture.

Core Framework

TanStack Start (React 19)

Version: 1.132.0
Package: @tanstack/react-start
TanStack Start is a full-stack React framework built on React 19 with:
  • Server-side rendering (SSR) for fast initial loads
  • File-based routing via TanStack Router
  • Streaming SSR for progressive page rendering
  • Automatic code splitting and tree shaking
// app.config.ts
import { defineConfig } from "@tanstack/react-start/config";

export default defineConfig({
  server: {
    preset: "vercel",
  },
});

React 19

Version: 19.2.0
Packages: react, react-dom
Latest React with:
  • React Compiler: Automatic memoization (via babel-plugin-react-compiler)
  • Concurrent rendering: Better responsiveness under load
  • Improved Suspense: Better async data handling
// vite.config.ts - React Compiler enabled
react({
  babel: {
    plugins: ["babel-plugin-react-compiler"],
  },
})

Backend Framework

Hono

Version: 4.7.12
Package: hono
Ultra-fast web framework for the API server:
  • Express-like API with better TypeScript support
  • Built-in CORS, logger, and SSE streaming
  • Zero dependencies, runs on Bun/Node/Deno
// api/src/index.ts
import { Hono } from "hono";
import { cors } from "hono/cors";
import { logger } from "hono/logger";
import { streamSSE } from "hono/streaming";

const app = new Hono();
app.use("*", logger());
app.use("*", cors({ /* ... */ }));

Bun Runtime

Version: >= 1.1
Purpose: Package manager + JavaScript runtime
  • 3-5x faster npm install via Bun’s package manager
  • Hot reload for API server: bun --bun run --hot api/src/index.ts
  • Native TypeScript support without transpilation
// package.json scripts
{
  "dev:api": "bun --bun run --hot api/src/index.ts",
  "build:api": "bun build api/src/index.ts --outdir api/dist --target bun",
  "start:api": "bun run api/src/index.ts"
}

Data Layer

oRPC

Version: 1.7.5
Packages: @orpc/client, @orpc/server, @orpc/tanstack-query, @orpc/zod
Type-safe RPC framework (alternative to tRPC):
  • Full-stack type safety: Procedure inputs/outputs inferred
  • Zod validation: Runtime schema validation
  • TanStack Query integration: Auto-generate queryOptions()
  • OpenAPI generation: Auto-generate REST docs
// Backend: Define procedure
import { os } from "@orpc/server";

export const getPositions = os
  .input(z.object({ modelId: z.string().optional() }))
  .output(z.array(positionSchema))
  .handler(async ({ input }) => {
    return await fetchPositions(input.modelId);
  });
// Frontend: Use procedure
import { useQuery } from "@tanstack/react-query";
import { orpc } from "@/server/orpc/client";

const { data } = useQuery(
  orpc.trading.getPositions.queryOptions({ input: {} })
);

TanStack Query

Version: 5.66.5
Package: @tanstack/react-query
Powerful async state management:
  • Automatic caching: Reduces redundant API calls
  • Background refetching: Keeps data fresh
  • Optimistic updates: Instant UI feedback
  • Devtools: Inspect cache, queries, and mutations
Cache durations:
  • Positions: 15s staleTime (fast updates)
  • Models: 5min staleTime (rarely changes)
  • Portfolio history: 30s staleTime (moderate updates)

PostgreSQL + Drizzle ORM

Version: 0.39.0 (Drizzle)
Packages: drizzle-orm, pg, drizzle-kit
Type-safe PostgreSQL ORM:
  • Schema-first: TypeScript schemas generate migrations
  • Quoted identifiers: Capitalized table names ("Models", "Orders")
  • Relational queries: Type-safe joins and relations
// src/db/schema.ts
export const orders = pgTable("Orders", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  modelId: text("modelId").notNull().references(() => models.id),
  symbol: text("symbol").notNull(),
  side: orderSideEnum("side").notNull(),
  quantity: numeric("quantity", { precision: 18, scale: 8 }).notNull(),
  status: orderStatusEnum("status").notNull().default("OPEN"),
  // ...
});
Migration workflow:
bun run db:generate   # Generate SQL from schema
bun run db:migrate    # Apply migrations
bun run db:studio     # Launch Drizzle Studio GUI

AI & Trading Integrations

AI SDK

Version: 6.0.0-beta.99 (Vercel AI SDK v6)
Packages: ai, @ai-sdk/anthropic, @ai-sdk/google, @ai-sdk/openai, @ai-sdk/mistral
Multi-provider AI orchestration:
  • Streaming: Token-by-token response streaming
  • Tool calling: Structured function execution
  • Provider fallbacks: Switch between Claude, GPT-4, Gemini, Mistral
  • Token counting: Track usage and costs
// src/server/features/trading/agent/tradeAgentFactory.ts
import { generateText } from "ai";
import { createAnthropic } from "@ai-sdk/anthropic";

const anthropic = createAnthropic({ apiKey: env.ANTHROPIC_API_KEY });

const result = await generateText({
  model: anthropic("claude-4-sonnet-20250514"),
  system: SYSTEM_PROMPT,
  messages,
  tools: { createPosition, closePosition, updateExitPlan },
  maxSteps: 5,
});
Supported providers:
  • Anthropic Claude (primary): claude-4-sonnet, claude-3.5-sonnet
  • Google Gemini: gemini-2.5-flash, gemini-2.5-pro
  • OpenAI: gpt-4.5-turbo, gpt-4o
  • Mistral: mistral-large-2, ministral-8b
  • NVIDIA NIM: meta/llama-4-nemotron-instruct (via @ai-sdk/openai-compatible)
  • OpenRouter: Aggregated access to 150+ models (via @openrouter/ai-sdk-provider)
  • Aihubmix: Additional proxy provider (via @aihubmix/ai-sdk-provider)

Lighter SDK

Version: 1.0.7-alpha14
Package: @reservoir0x/lighter-ts-sdk
zkLighter exchange REST API client:
  • Generated TypeScript SDK for zkLighter DEX
  • Order book data, order placement, account management
  • Real-time market data for BTC, ETH, SOL perpetuals
// src/server/integrations/lighter/client.ts
import { createLighterClient } from "@reservoir0x/lighter-ts-sdk";

export const lighterClient = createLighterClient({
  baseUrl: env.LIGHTER_BASE_URL,
  apiKey: getApiKey(),
});

export const orderApi = lighterClient.order;
export const accountApi = lighterClient.account;

Styling & UI

Tailwind CSS v4

Version: 4.0.6
Package: tailwindcss, @tailwindcss/vite
Utility-first CSS framework (v4 is a complete rewrite):
  • Vite plugin: First-class Vite integration
  • JIT compiler: Generate classes on-demand
  • CSS variables: Better dark mode support
// vite.config.ts
import tailwindcss from "@tailwindcss/vite";

export default defineConfig({
  plugins: [tailwindcss()],
});

shadcn/ui

Version: latest (component library, not versioned)
Packages: @radix-ui/*, class-variance-authority, clsx, tailwind-merge
Component library built on Radix UI primitives:
  • Copy-paste components: No runtime dependency
  • Accessible: ARIA compliant via Radix UI
  • Customizable: Styled with Tailwind classes
Key components:
  • Button, Dialog, Dropdown, Select, Tooltip
  • Table, Tabs, Collapsible, ScrollArea
  • Avatar, Badge, Separator, Progress
pnpx shadcn@latest add button dialog table

Utility Libraries

  • class-variance-authority (0.7.1): Type-safe component variants
  • clsx (2.1.1) + tailwind-merge (3.0.2): Merge Tailwind classes
  • cva pattern: Standardized component API
import { cva } from "class-variance-authority";
import { cn } from "@/lib/utils";

const buttonVariants = cva("rounded-lg font-semibold", {
  variants: {
    variant: {
      default: "bg-primary text-white",
      outline: "border border-primary text-primary",
    },
    size: {
      sm: "px-3 py-1.5 text-sm",
      lg: "px-6 py-3 text-lg",
    },
  },
});

Icons & Animations

  • Lucide React (0.553.0): Modern icon library (1400+ icons)
  • GSAP (3.13.0): High-performance animations
  • Framer Motion (via [email protected]): Declarative animations
  • @number-flow/react (0.5.10): Animated number transitions

Visualization

Recharts

Version: 3.3.0
Package: recharts
Composable charting library for React:
  • Portfolio performance line charts
  • Win rate bar charts
  • P&L distribution histograms
import { LineChart, Line, XAxis, YAxis, Tooltip } from "recharts";

<LineChart data={portfolioHistory}>
  <XAxis dataKey="timestamp" />
  <YAxis />
  <Line dataKey="netPortfolio" stroke="#8884d8" />
  <Tooltip />
</LineChart>

React Three Fiber

Version: 9.4.0
Packages: @react-three/fiber, three, @shadergradient/react
WebGL rendering for 3D backgrounds:
  • ShaderGradient component for hero section
  • Hardware-accelerated animated gradients

State Management

TanStack Store

Version: 0.7.0
Packages: @tanstack/store, @tanstack/react-store
Lightweight state management:
  • Used for variant selector state (Apex, Trendsurfer, Contrarian, Sovereign)
  • Alternative to Zustand or Jotai
import { Store } from "@tanstack/store";

export const variantStore = new Store({
  selectedVariant: "all" as VariantIdWithAll,
});

Real-Time Communication

Server-Sent Events (SSE)

Native browser EventSource API for real-time updates: Endpoints:
  • /api/events/positions - Position updates every 10s
  • /api/events/trades - Trade execution feed
  • /api/events/conversations - AI chat events
  • /api/events/portfolio - Portfolio snapshots
  • /api/events/workflow - Trading workflow events
Implementation:
// Frontend: Subscribe to events
const eventSource = new EventSource("/api/events/positions");
eventSource.onmessage = (event) => {
  const positions = JSON.parse(event.data);
  queryClient.setQueryData(["positions"], positions);
};
// Backend: Broadcast events
import { streamSSE } from "hono/streaming";

app.get("/api/events/positions", async (c) => {
  return streamSSE(c, async (stream) => {
    const unsubscribe = subscribeToPositionEvents((event) => {
      stream.writeSSE({ data: JSON.stringify(event.data) });
    });
    await new Promise(() => {}); // Keep alive
  });
});

Development Tools

Vite (Rolldown)

Version: rolldown-vite@latest (experimental Rust-based Vite fork)
Package: vite
Why Rolldown?
  • 10x faster builds via Rust (compatible with Vite plugins)
  • Drop-in replacement for Vite
  • Used via npm override:
{
  "overrides": {
    "vite": "npm:rolldown-vite@latest"
  }
}

TypeScript

Version: 5.7.2
Package: typescript
Strict type checking:
{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "exactOptionalPropertyTypes": true
  }
}

Biome

Version: 2.2.4
Package: @biomejs/biome
Fast linter and formatter (Rust-based, replaces ESLint + Prettier):
  • 80-100x faster than ESLint
  • Format + lint in single pass
Rules:
  • Indentation: Tabs
  • Quotes: Double
  • Line width: 80 characters
bun run lint      # Check for issues
bun run format    # Auto-fix formatting
bun run check     # Lint + type check

Vitest

Version: 3.0.5
Package: vitest
Vite-native test runner:
  • Same Vite config as main app
  • Instant hot reload for tests
  • Compatible with Jest API
bun run test      # Run all tests

TanStack Devtools

Packages:
  • @tanstack/react-query-devtools (5.84.2)
  • @tanstack/react-router-devtools (1.132.0)
  • @tanstack/devtools-vite (0.3.11)
Visual debugging tools:
  • Query Devtools: Inspect cache, refetch queries, view staleness
  • Router Devtools: View route tree, params, search state

Observability

Sentry

Version: 10.28.0
Packages: @sentry/react, @sentry/tanstackstart-react
Error tracking and performance monitoring:
  • Breadcrumbs: Trace user actions before errors
  • Spans: Measure oRPC procedure performance
  • Session replay: Reproduce bugs visually
import * as Sentry from "@sentry/react";

export const myProcedure = os.handler(async ({ input }) =>
  Sentry.startSpan({ name: "myProcedure" }, async () => {
    // Timed logic here
  })
);

Vercel Analytics

Version: 1.6.1
Package: @vercel/analytics
Web vitals tracking:
  • Core Web Vitals (LCP, FID, CLS)
  • Custom events (trades executed, positions opened)

Deployment

Vercel (Frontend)

Preset: vercel (via Nitro) Automatic deployments on git push:
  • Edge network: Global CDN for fast initial loads
  • Serverless functions: SSR on demand
  • Preview deployments: Per-branch URLs

VPS (Backend)

Runtime: Bun
Process manager: PM2 or systemd
Long-running stateful process:
  • Schedulers (AI agents, price tracking)
  • ExchangeSimulator singleton
  • SSE event broadcasting

Environment Configuration

T3 Env

Version: 0.13.8
Package: @t3-oss/env-core
Type-safe environment variables:
  • Runtime validation via Zod
  • Compile-time type inference
  • Separate server/client variables
// src/env.ts
import { createEnv } from "@t3-oss/env-core";

export const env = createEnv({
  server: {
    DATABASE_URL: z.string().url(),
    PORT: z.coerce.number().default(8081),
  },
  clientPrefix: "VITE_",
  client: {
    VITE_API_URL: z.string().url().optional(),
  },
  runtimeEnv: { ...process.env, ...import.meta.env },
});

Summary

CategoryTechnologyVersionPurpose
FrameworkTanStack Start1.132.0Full-stack React SSR
React19.2.0UI library with compiler
Hono4.7.12API server framework
DataoRPC1.7.5Type-safe RPC
TanStack Query5.66.5Async state management
Drizzle ORM0.39.0Type-safe SQL
PostgreSQL15+Relational database
AIAI SDK6.0.0-beta.99Multi-provider AI
Anthropic SDK0.52.0Claude API client
Lighter SDK1.0.7-alpha14zkLighter exchange
StylingTailwind CSS4.0.6Utility-first CSS
shadcn/uilatestComponent library
Lucide React0.553.0Icon library
ChartsRecharts3.3.0Composable charts
DevToolsVite (Rolldown)latestRust-based bundler
TypeScript5.7.2Type safety
Biome2.2.4Linter + formatter
Vitest3.0.5Test runner
ObservabilitySentry10.28.0Error tracking
Vercel Analytics1.6.1Web vitals
RuntimeBun1.1+Package manager + runtime

Next Steps

Build docs developers (and LLMs) love