Tech Stack & Dependencies
Relevant source files
The following files were used as context for generating this wiki page:
LV.AI is an autonomous AI expert for the construction industry in the D/A/CH region. It focuses on Bill of Quantities (LV), tendering, awarding, and billing (AVA) processes. The system integrates real-time AI capabilities with a structured database to manage complex construction projects according to regional standards like GAEB, VOB, ÖNORM, and SIA.
Sources: README.md:1-12, CLAUDE.md:1-10
Core Framework and Runtime
The application runs on the Next.js framework, utilizing the App Router architecture for handling routes and server-side rendering. It targets Node.js 20+ and uses pnpm for package management.
Key Technologies
- Next.js 16: Powers the frontend and backend API routes.
- React 19: Provides the UI component framework.
- TypeScript: Ensures type safety across the codebase.
Sources: package.json:115-125, README.md:21-25, CLAUDE.md:12-25
AI and Language Model Integration
The AI architecture relies on the Vercel AI SDK and the 9Router gateway. This setup allows the system to interact with multiple LLM backends while maintaining OpenAI compatibility.
AI Architecture Components
- Vercel AI SDK 6: Manages streaming text and tool calls.
- 9Router: Acts as a multi-provider gateway (NeXify).
- Default Model:
nexifyai-combo-llm, which uses a round-robin approach with DeepSeek V4 models. - Headroom: Optimizes context and handles token caching.
Sources: CLAUDE.md:46-57, package.json:44-51
AI Workflow Diagram
This diagram illustrates how user requests move from the UI through the AI SDK to the router and models.
Sources: CLAUDE.md:46-57, lib/ai/prompts.ts:1-20
Database and Data Modeling
LV.AI uses a PostgreSQL database hosted on Neon, managed through Drizzle ORM. The schema is designed to represent construction-specific entities like Leistungsverzeichnisse (LV) and GAEB structures.
Data Infrastructure
- Neon Postgres: Primary relational database.
- Drizzle ORM: Provides type-safe database queries and migrations.
- mem0: Manages project-level and global memory scopes for the AI.
Sources: README.md:21-25, CLAUDE.md:12-25, lib/db/schema.ts:1-50
Entity Relationship Overview
The database structure links users to projects, which contain chats, documents, and construction-specific entities.
Sources: lib/db/schema.ts:52-250
Frontend and UI Components
The user interface is built with Tailwind CSS 4 and shadcn/ui. It includes specialized editors for different "artifacts" like code, text, and spreadsheets.
UI Stack
- Tailwind CSS 4: Utility-first styling.
- shadcn/ui: Accessible UI components.
- Framer Motion: Handles animations and transitions.
- Lucide React: Provides the icon set.
Sources: package.json:62-65, README.md:21-25, app/layout.tsx:1-30
Project Dependencies
Primary Dependencies
| Category | Library | Version |
|---|---|---|
| Framework | next | 16.2.0 |
| UI | react | 19.0.1 |
| AI | ai | 6.0.116 |
| Database | drizzle-orm | 0.34.0 |
| Styling | tailwindcss | 4.1.13 |
| Auth | next-auth | 5.0.0-beta.25 |
Sources: package.json:33-100
Development and Testing
The project uses Vitest for unit testing and Playwright for end-to-end testing.
Sources: package.json:102-113, CLAUDE.md:12-25
Environment Configuration
The application requires specific environment variables for AI and database connectivity.
| Variable | Description |
|---|---|
AUTH_SECRET | Secret key for Auth.js |
OPENAI_API_KEY | 9Router API Key |
OPENAI_BASE_URL | 9Router Endpoint URL |
POSTGRES_URL | Connection string for PostgreSQL |
MEM0_API_KEY | API Key for mem0 integration |
Sources: README.md:65-75, CLAUDE.md:46-57
Conclusion
LV.AI's tech stack is centered around a modern TypeScript-based infrastructure using Next.js 16 and React 19. By leveraging the Vercel AI SDK and Drizzle ORM, it maintains a clean separation between AI-driven interactions and structured construction data. The integration of 9Router and mem0 provides the necessary intelligence and memory persistence required for managing long-term construction projects in the D/A/CH region.
Sources: README.md:130-145, CLAUDE.md:75-90