---
title: "My Stack"
description: "The databases, ORM, rendering model, dev tools, and styling used day to day"
url: "https://www.leowe.com/n/stack"
published: 2025-01-01
---

# My Stack

Here's where I'm currently most productive:

![A desk with a large monitor, a laptop, a keyboard, headphones and a coffee cup.](https://www.leowe.com/_next/static/immutable/media/desk.1ck5w-v_olo41.png)

## 1. DB

I've found serverless Postgres for general and Mysql for heavy duty lifting, and libsql for near-edge hosting, to be incredibly powerful.

- Mysql for performance
- Libsql for low-latency
- Postgres for everything else

## 2. ORM

For TypeScript, I've found Drizzle ORM the best to work with in fast iteration cycles

```typescript
import { numeric, pgTable, serial, timestamp } from "drizzle-orm/pg-core";

export const metrics = pgTable("metrics", {
  id: serial("id").primaryKey(),
  timestamp: timestamp("timestamp").notNull(),
  value: numeric("value", { precision: 18, scale: 8 }).notNull(),
  volatility: numeric("volatility", { precision: 10, scale: 4 }),
  volume: numeric("volume", { precision: 16, scale: 2 }),
});
```

## 3. Rendering

I use React Server Components extensively, enhanced with tRPC for end-to-end type safety:

```typescript
// Financial data fetching with tRPC
export default async function Dashboard() {
  const data = await api.metrics.getDaily.query({
    metrics: ['volatility', 'volume'],
    timeframe: '24h'
  });

  return (
    <DataGrid
      metrics={data}
      components={{
        VolumeChart: () => <VolumeAnalysis data={data.volume} />,
        VolatilitySeries: () => <VolatilityIndicator data={data.volatility} />
      }}
    />
  )
}
```

## 4. Dev Tools

- Bun for the fastest build times and smallest bundle sizes
- Typebox for runtime type validation
- Redis for high-performance caching
- Python + NumPy for complex financial computations

## 5. Style

- Performance-first mindset, especially for financial data processing
- Strong type safety throughout the stack
- Careful attention to numerical precision in financial calculations
- Real-time capabilities through WebSocket integrations
- Comprehensive testing for calculation accuracy
