Docs /architecture/technology-stack

Technology Stack

Complete guide to every technology used in Izri and why we chose it

๐Ÿ“Š Stack at a Glance

Category Technology Version Purpose
Frontend Framework React Router v7 Modern React framework with SSR
UI Library React v19 User interface components
Styling Tailwind CSS v3 Utility-first CSS framework
Component Library shadcn/ui Latest Accessible UI components
Build Tool Vite v6 Fast build and dev server
Backend Framework Hono v4 Lightweight web framework
API Layer tRPC v11 Type-safe RPC framework
ORM Drizzle ORM Latest TypeScript-first ORM
Database PostgreSQL 15 Relational database
Cache Redis 7 In-memory data store
AI Backend FastAPI Latest Python async framework
Runtime Node.js 18+ JavaScript runtime
Package Manager pnpm 10+ Fast, disk-efficient PM
Monorepo Tool Turbo v2 Build system orchestrator
Language TypeScript 5.3+ Static type checking

๐ŸŽจ Frontend Technologies

React Router v7

What it is: Modern full-stack React framework with file-based routing

Why we chose it:

  • โœ… Server-side rendering ready
  • โœ… File-based routing with excellent DX
  • โœ… Built-in data loading patterns
  • โœ… Better bundle optimization than competitors
  • โœ… Active development and community
  • โœ… Smooth migration path from React Router v6

Alternatives considered:

  • Next.js: Too opinionated, vendor lock-in concerns
  • Remix: React Router v7 is the evolution of Remix
  • Create React App: No SSR, deprecated

Key Features:

// Type-safe route definitions
import { type Route } from "./+types/projects"

export async function loader({ params }: Route.LoaderArgs) {
  return { project: await getProject(params.id) }
}

export default function Project({ loaderData }: Route.ComponentProps) {
  return <div>{loaderData.project.name}</div>
}

React 19

What it is: Latest version of the React library

Why we use it:

  • โœ… Improved concurrent features
  • โœ… Better server components support
  • โœ… Enhanced performance
  • โœ… New compiler optimizations

Tailwind CSS

What it is: Utility-first CSS framework

Why we chose it:

  • โœ… Rapid UI development
  • โœ… Consistent design system
  • โœ… Small production bundle (purged)
  • โœ… No CSS naming conflicts
  • โœ… Excellent IntelliSense support

Configuration:

// tailwind.config.js
export default {
  content: ['./app/**/*.{js,jsx,ts,tsx}'],
  theme: {
    extend: {
      colors: {
        // Custom brand colors
      }
    }
  }
}

shadcn/ui

What it is: Copy-paste component library built on Radix UI

Why we chose it:

  • โœ… Accessible by default (Radix UI)
  • โœ… Fully customizable (you own the code)
  • โœ… Consistent with Tailwind
  • โœ… No runtime dependency bloat
  • โœ… TypeScript support

Components used:

  • Button, Input, Select, Dialog
  • Table, Card, Badge, Avatar
  • DropdownMenu, Tooltip, Toast
  • Form components with validation

Vite

What it is: Next-generation frontend build tool

Why we use it:

  • โœ… Lightning-fast HMR (<100ms)
  • โœ… ESM-based dev server
  • โœ… Optimized production builds
  • โœ… Built-in TypeScript support
  • โœ… Rich plugin ecosystem

โš™๏ธ Backend Technologies

Hono

What it is: Ultra-fast web framework for edge and Node.js

Why we chose it:

  • โœ… Fastest Node.js framework (benchmarks)
  • โœ… Express-like API (familiar)
  • โœ… Excellent TypeScript support
  • โœ… Built-in middleware ecosystem
  • โœ… Edge runtime compatible
  • โœ… Tiny bundle size (~10KB)

Alternatives considered:

  • Express: Slower, older architecture
  • Fastify: Good but more complex
  • Koa: Less active community

Example:

import { Hono } from 'hono'
import { logger } from 'hono/logger'
import { cors } from 'hono/cors'

const app = new Hono()
app.use('*', logger())
app.use('*', cors())

app.get('/health', (c) => c.json({ status: 'ok' }))

tRPC

What it is: End-to-end type-safe RPC framework

Why we chose it:

  • โœ… No code generation needed
  • โœ… Full type safety from DB to UI
  • โœ… Excellent DX with autocomplete
  • โœ… Automatic request/response validation
  • โœ… Built-in error handling
  • โœ… WebSocket support

Alternatives considered:

  • REST: No type safety, boilerplate
  • GraphQL: Code generation, complexity
  • gRPC: Protocol buffers, overkill

Architecture:

// Backend: Define procedures
export const projectRouter = router({
  list: publicProcedure.query(async ({ ctx }) => {
    return ctx.db.select().from(projects)
  }),
  
  create: protectedProcedure
    .input(createProjectSchema)
    .mutation(async ({ ctx, input }) => {
      return ctx.db.insert(projects).values(input)
    })
})

// Frontend: Type-safe calls
const projects = await trpc.projects.list.query()
await trpc.projects.create.mutate({ name: 'New Project' })

Drizzle ORM

What it is: TypeScript ORM that feels like writing SQL

Why we chose it:

  • โœ… SQL-like syntax (familiar)
  • โœ… Zero runtime overhead
  • โœ… Full TypeScript inference
  • โœ… No magic, no proxies
  • โœ… Excellent migration system
  • โœ… Drizzle Studio for visualization

Alternatives considered:

  • Prisma: Runtime overhead, code generation
  • TypeORM: Complex, heavy
  • Kysely: Great but less ecosystem

Example:

// Define schema
import { ulid } from 'ulid';

export const projects = pgTable('projects', {
  id: varchar('id', { length: 191 }).primaryKey(), // ULID stored as varchar
  name: text('name').notNull(),
  organizationId: varchar('organization_id', { length: 191 }).references(() => organizations.id),
  createdAt: timestamp('created_at').defaultNow()
})

// Query with type safety
const result = await db
  .select()
  .from(projects)
  .where(eq(projects.organizationId, orgId))
  .leftJoin(testRuns, eq(testRuns.projectId, projects.id))

// When inserting, generate ULID
const projectId = ulid();
await db.insert(projects).values({
  id: projectId,
  name: 'My Project',
  // ...
})

๐Ÿ’พ Data Storage

PostgreSQL 15

What it is: Advanced open-source relational database

Why we chose it:

  • โœ… ACID transactions
  • โœ… JSONB support (flexible schemas)
  • โœ… Excellent indexing options
  • โœ… Rich extension ecosystem
  • โœ… Proven at scale
  • โœ… Strong community support

Features we use:

  • JSONB columns for flexible data
  • Full-text search
  • Partial indexes
  • Foreign key constraints
  • Transactions

Configuration:

# docker-compose.yml
postgres:
  image: postgres:15-alpine
  environment:
    POSTGRES_DB: izri
    POSTGRES_USER: postgres
    POSTGRES_PASSWORD: postgres
  ports:
    - "5433:5432"
  volumes:
    - postgres_data:/var/lib/postgresql/data

Redis 7

What it is: In-memory data structure store

Why we use it:

  • โœ… Ultra-fast caching (<1ms reads)
  • โœ… Session storage
  • โœ… Rate limiting support
  • โœ… Pub/sub messaging
  • โœ… Simple to operate

Use cases:

  • Session management (Lucia)
  • API response caching
  • Rate limiting (planned)
  • Background job queues (planned)

๐Ÿค– AI & Analysis

Python 3.12

Why Python for AI:

  • โœ… Best ecosystem for ML/AI
  • โœ… LangChain and AI frameworks
  • โœ… Tree-sitter for code parsing
  • โœ… Excellent async support

FastAPI

What it is: Modern Python web framework

Why we chose it:

  • โœ… Async/await support
  • โœ… Automatic API documentation
  • โœ… Type hints with Pydantic
  • โœ… Fast performance
  • โœ… Easy to test

Example:

from fastapi import FastAPI
from pydantic import BaseModel

app = FastAPI()

class AnalysisRequest(BaseModel):
    repo_url: str
    branch: str = "main"

@app.post("/analyze")
async def analyze_repo(request: AnalysisRequest):
    # Perform analysis
    return {"status": "success"}

๐Ÿ› ๏ธ Development Tools

pnpm

What it is: Fast, disk space efficient package manager

Why we chose it:

  • โœ… 3x faster than npm
  • โœ… Efficient disk usage (symlinks)
  • โœ… Strict dependency resolution
  • โœ… Built-in monorepo support
  • โœ… Workspace protocol

Workspace structure:

# pnpm-workspace.yaml
packages:
  - 'apps/*'
  - 'packages/*'

Turbo

What it is: High-performance build system for monorepos

Why we chose it:

  • โœ… Intelligent caching
  • โœ… Parallel execution
  • โœ… Remote caching support
  • โœ… Task pipelines
  • โœ… Simple configuration

Configuration:

{
  "pipeline": {
    "build": {
      "dependsOn": ["^build"],
      "outputs": ["dist/**", "lib/**"]
    },
    "dev": {
      "cache": false,
      "persistent": true
    }
  }
}

TypeScript 5.3+

Why TypeScript:

  • โœ… Static type checking
  • โœ… Better IDE support
  • โœ… Catch errors at compile time
  • โœ… Self-documenting code
  • โœ… Refactoring confidence

Configuration highlights:

{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "moduleResolution": "bundler",
    "verbatimModuleSyntax": true
  }
}

๐Ÿงช Testing & Quality

Biome

What it is: Fast formatter and linter (Rust-based)

Why we use it:

  • โœ… 10x faster than ESLint+Prettier
  • โœ… Single tool for format + lint
  • โœ… Drop-in replacement
  • โœ… Minimal configuration

ESLint (Legacy)

Current state: Transitioning to Biome

Still used for:

  • React-specific linting
  • Import order enforcement

๐Ÿณ Infrastructure & DevOps

Docker & Docker Compose

Why we use it:

  • โœ… Consistent development environment
  • โœ… Easy service orchestration
  • โœ… Production parity
  • โœ… Simplified onboarding

Services:

services:
  postgres:
    image: postgres:15-alpine
  redis:
    image: redis:7-alpine
  api:
    build: ./docker/api
  web:
    build: ./docker/web

๐Ÿ“Š Comparison with Alternatives

Why Not Next.js?

Feature React Router v7 Next.js
SSR โœ… Yes โœ… Yes
File Routing โœ… Flexible โœ… Pages/App dir
Vendor Lock-in โœ… None โŒ Vercel-optimized
Edge Functions โœ… Yes โœ… Yes
Learning Curve โœ… Lower โš ๏ธ Higher
Bundle Size โœ… Smaller โš ๏ธ Larger

Why tRPC Over GraphQL?

Feature tRPC GraphQL
Type Safety โœ… Native TS โš ๏ธ Code generation
Setup Complexity โœ… Minimal โŒ High
Learning Curve โœ… Easy โŒ Steep
Over-fetching โš ๏ธ Can happen โœ… Prevented
Tooling โœ… Great โœ… Excellent
Ecosystem โœ… Growing โœ… Mature

Why Drizzle Over Prisma?

Feature Drizzle Prisma
Runtime Overhead โœ… Zero โŒ 4MB+
SQL-like API โœ… Yes โŒ DSL
Type Inference โœ… Native โš ๏ธ Generated
Migrations โœ… SQL files โœ… Own format
Studio โœ… Yes โœ… Yes
Edge Compatible โœ… Yes โŒ No

๐ŸŽ“ Learning Resources

Official Documentation

Internal Guides

๐Ÿ”„ Keeping Up to Date

Monitoring Updates

# Check for outdated packages
pnpm outdated

# Update all to latest within version ranges
pnpm update

# Update specific package
pnpm update react-router

Upgrade Strategy

  1. Patch versions: Auto-update (security fixes)
  2. Minor versions: Review changelog, test, update
  3. Major versions: Plan migration, test extensively, update docs

๐Ÿ”— Next Steps


Questions about a specific technology? Check the official docs linked above or ask the team.

Reading this with an agent? /docs/architecture/technology-stack.md serves the raw markdown.

All docs