Architecture Overview
Understanding the structure and components of the AI Evaluation Platform
Project Structure
ai-evaluation-platform/ ├── src/app/ # Next.js App Router pages │ ├── api/ # REST API routes (55+ endpoints) │ │ ├── evaluations/ # Eval CRUD, runs, test-cases, publish │ │ ├── llm-judge/ # LLM Judge evaluate, configs, alignment │ │ ├── traces/ # Distributed tracing + spans │ │ └── ... ├── src/packages/sdk/ # TypeScript SDK (@evalgate/sdk) ├── src/lib/ # Core services, utilities, templates ├── src/db/ # Database layer (Drizzle ORM schema) └── drizzle/ # Database migrations
Next.js App Router
Modern React framework with App Router for optimal performance and developer experience.
- • Server-side rendering with React Server Components
- • 55+ API endpoints for evaluations, traces, and LLM judge
- • Authentication middleware and protected routes
- • Responsive UI with Tailwind CSS
TypeScript SDK
Published as @evalgate/sdk to npm for easy integration.
- • Full TypeScript support with type definitions
- • OpenAI integration helpers
- • Evaluation runners and assertions
- • Tracing and monitoring capabilities
Database Layer
Drizzle ORM with PostgreSQL for efficient data management.
- • Type-safe database operations
- • Automatic migrations in drizzle/ directory
- • Optimized for evaluation results and traces
- • Support for both local and cloud deployment
API Endpoints
Evaluations
- • CRUD operations for evaluations
- • Test case management
- • Run execution and results
- • Publishing and sharing
LLM Judge
- • Judge configuration
- • Evaluation execution
- • Alignment and scoring
- • Custom rubrics
Tracing
- • Distributed tracing
- • Span management
- • Performance monitoring
- • Error tracking
Core Services
- • Authentication & authorization
- • Organization management
- • API key handling
- • Webhook processing
Technology Stack
Frontend
- • Next.js 14+ (App Router)
- • React 18+
- • TypeScript
- • Tailwind CSS
- • shadcn/ui components
Backend
- • Node.js
- • Next.js API routes
- • Drizzle ORM
- • PostgreSQL
- • NextAuth.js
Development
- • pnpm package manager
- • Vitest for testing
- • Playwright for e2e
- • ESLint & Biome
- • GitHub Actions CI
Explore the Architecture
Dive deeper into specific components and integration patterns