Skip to content

Configuration Files

Juca has 11 configuration files at the project root. This page documents each one’s purpose and key settings.

FilePurpose
next.config.tsNext.js framework configuration
tsconfig.jsonTypeScript compiler options
tailwind.config.tsTailwind CSS v4 (minimal — tokens in CSS)
postcss.config.mjsPostCSS with Tailwind plugin
vitest.config.tsUnit test configuration
playwright.config.tsE2E test configuration
eslint.config.mjsESLint flat config with Next.js rules
.env.exampleEnvironment variables template
.env.localLocal environment (gitignored)
DockerfileMulti-stage production build
docker-compose.ymlLocal Neo4j dev service

Key settings in next.config.ts:

SettingValuePurpose
output'standalone'Optimized Docker builds
serverExternalPackages['better-sqlite3']Native module support
Console removalProduction only (keeps warn/error/info)Cleaner production logs
Security headersX-Frame-Options, X-Content-Type-Options, etc.OWASP best practices
API cacheno-store, max-age=0Prevent stale API responses

Tailwind v4 uses a CSS-first configuration approach. Design tokens are defined in src/app/globals.css as CSS custom properties, not in tailwind.config.ts:

/* src/app/globals.css — design tokens */
:root {
--color-primary: #000000;
--color-accent: #fff06d;
--color-bg-primary: #ffffff;
--color-bg-secondary: #f5f5f5;
--color-text-primary: #000000;
--color-text-secondary: #666a6f;
--radius-sm: 4px;
--radius-full: 9999px;
/* ... 50+ tokens for IRAC colors, confidence levels, KG themes, shadows */
}

The tailwind.config.ts file is minimal — it exists primarily for plugin registration.

The tsconfig.json configures a single path alias:

{
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
}
}

All imports throughout the codebase use @/ instead of relative paths:

import { auth } from '@/lib/auth';
import { getBlocksDB } from '@/lib/db/sessions';

Custom hooks in .githooks/:

HookAction
pre-commitRuns ESLint on staged files
pre-pushRuns the full Vitest test suite
post-checkoutCleanup tasks
post-commitCleanup tasks
post-mergeCleanup tasks

Configured via package.json:

{ "scripts": { "prepare": "git config core.hooksPath .githooks" } }

The Dockerfile uses a 3-stage build:

  1. depsnpm ci with production dependencies
  2. buildnext build with standalone output
  3. runtime — Minimal Node.js image with only production artifacts

The docker-compose.yml provides a local Neo4j Community 5 instance for development. This will be deprecated after the Valter migration is complete.