Files
legal-ai/web-ui/next.config.ts
Chaim 64724656af Phase 1: scaffold Next.js 16 web-ui + Coolify staging
- create-next-app with TypeScript, Tailwind v4, App Router
- Port design-system.css tokens into Tailwind @theme (navy/gold/parchment, Heebo)
- Install TanStack Query, react-hook-form, zod, lucide-react, react-dropzone
- layout.tsx: RTL Hebrew + Heebo via next/font/google
- AppShell component with navy header + gold rule + nav
- next.config.ts: output:standalone + rewrites to proxy /api/* to production FastAPI
- Dockerfile: multi-stage Node 20 Alpine build for Next.js standalone
  (branch-local override of the FastAPI Dockerfile; main is unaffected)
- Switch .taskmaster to claude-code provider (no API key required)
- Add 7 phase tasks (83-89) tracking the full rewrite plan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:47:05 +00:00

34 lines
885 B
TypeScript

import type { NextConfig } from "next";
/**
* Staging config — proxies /api/* and /openapi.json to the production FastAPI
* at legal-ai.nautilus.marcusgroup.org. This lets the new Next.js UI call the
* existing backend without CORS and without running a second FastAPI instance.
*
* When the rewrite branch is cut over to production, set NEXT_PUBLIC_API_BASE_URL
* and/or move the FastAPI in front of this app via traefik routing.
*/
const API_ORIGIN =
process.env.NEXT_PUBLIC_API_ORIGIN ??
"https://legal-ai.nautilus.marcusgroup.org";
const nextConfig: NextConfig = {
output: "standalone",
async rewrites() {
return [
{
source: "/api/:path*",
destination: `${API_ORIGIN}/api/:path*`,
},
{
source: "/openapi.json",
destination: `${API_ORIGIN}/openapi.json`,
},
];
},
};
export default nextConfig;