Environment variables in DRTC Fluvial Admin control one critical thing: where the application finds the NestJS backend. The panel uses a single variable,Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Bran258/drtc-fluvial-admin/llms.txt
Use this file to discover all available pages before exploring further.
NEXT_PUBLIC_API_URL, to construct the proxy destination in next.config.ts. Without this variable set correctly, every API call in the panel — from authentication to vessel registration — will fail.
Required variable
| Variable | Type | Required | Description |
|---|---|---|---|
NEXT_PUBLIC_API_URL | string | Yes | Base URL of the NestJS backend, including scheme and port (no trailing slash). Used in next.config.ts to proxy all /api/* requests to /api/v1/* on the backend. Example: http://localhost:3001 |
The
NEXT_PUBLIC_ prefix makes this variable available in both server-side code (like next.config.ts) and in client-side React components. Without this prefix, the variable would only be accessible in server-side contexts.Setting up your .env.local file
Next.js automatically loads variables from .env.local during development. Create this file at the project root:
.env.local
.gitignore already excludes all .env* files, so this file will never be committed to version control.
How the proxy rewrite works
Thenext.config.ts file uses Next.js rewrites to transparently forward API calls from the frontend to the NestJS backend:
next.config.ts
/api/auth/login, Next.js rewrites it internally to http://localhost:3001/api/v1/auth/login. The browser never sees the backend URL directly — it only talks to the Next.js server.
Development vs. production configuration
- Development
- Production
Point the variable to your locally running NestJS instance:Then start the development server:
.env.local