Overview
AiVault uses several configuration files to customize the build process, styling, and development environment. This guide covers the key configuration files you’ll work with.Next.js Configuration
Thenext.config.ts file contains the Next.js configuration.
Configuration Options
next.config.ts
Key Settings Explained
Enables React’s Strict Mode for additional development checks and warnings.
Skips ESLint checks during production builds to speed up deployment.
Enforces TypeScript type checking during builds. Set to
false to maintain code quality.Configures allowed external image sources for Next.js Image optimization:
- picsum.photos - Placeholder images
- logos.hunter.io - Logo images for AI tools
Generates a standalone build optimized for Docker containers and serverless deployments.
Packages to transpile. Currently transpiling
motion (Framer Motion) for compatibility.Adding Remote Image Domains
To add a new remote image source:Tailwind CSS Configuration
AiVault uses Tailwind CSS 4 with the new CSS-first configuration approach.Global Styles
The main Tailwind configuration is inapp/globals.css:
app/globals.css
Features
- Tailwind CSS 4 - Latest version with CSS-first configuration
- tw-animate-css - Extended animation utilities
- shadcn/ui - Pre-configured component styles
- Custom dark mode - Custom variant for dark theme
- CSS variables - Design tokens for colors and spacing
shadcn/ui Configuration
Thecomponents.json file configures shadcn/ui components:
components.json
Convex Configuration
Convex is configured through theconvex/ directory in your project.
Development Setup
Start the Convex development server:- Connect to your Convex deployment
- Watch for schema changes
- Push updates automatically
- Provide real-time logs
Production Deployment
The build script automatically handles Convex deployment:package.json
- If
CONVEX_DEPLOY_KEYis set (production), Convex is deployed before building - Otherwise (development), only Next.js is built
Convex Environment Variables
Convex automatically syncs environment variables. Add them in the Convex dashboard or via CLI:TypeScript Configuration
Thetsconfig.json configures TypeScript compilation:
tsconfig.json
Running the Development Server
To run AiVault in development mode, you need two terminal windows:Terminal 1: Convex Backend
Terminal 2: Next.js Frontend
Available Scripts
Frompackage.json:
Starts the Next.js development server
Builds the application for production with conditional Convex deployment
Starts the production server (after building)
Runs ESLint to check for code quality issues
Runs the Vitest test suite
Cleans the Next.js build cache
Hot Module Replacement (HMR)
HMR is disabled in AI Studio environments to prevent flickering during agent edits. This is controlled by the
DISABLE_HMR environment variable.Next Steps
Database Schema
Learn about the Convex database schema
Convex Backend
Explore the Convex backend architecture