Skip to main content

UOM Assistant Frontend: Setup, Operations, & Contribution Guide

This guide describes how to configure, run, and contribute to the UOM Assistant frontend dashboard, separating development and production environments.

1. Environment Configurations

The frontend uses environment files located at the root of the uom-translator-ui directory:
  • .env.development: Default variables for local developer runs.
  • .env.production: Production fallback configurations.
  • .env.local: User overrides (contains additional local settings).

Key Variables


2. Local Development Environment Setup

2.1 Prerequisites

  • Node.js: Version 24+ (Recommended: Node.js 24.16.0 LTS).
  • Package Manager: pnpm (Version 11+ is recommended for faster installs. Alternatively, npm is supported; if changing, update the package.json config).

2.2 Getting Started (Step-by-Step)

  1. Configure Environment Variables: Establish your local environment configuration by copying the template file:
    Modify .env.development to specify your local database ports, Ollama settings, or Metacentrum SSH keys.
  2. Install Project Dependencies:
  3. Start the Development Server: You can choose to start the entire developer stack (Next.js Dev Server + LangGraph Dev Server + LLMock mock LLM server for request/response fixtures) with:
    Or launch only the Next.js frontend separately (if you already have the backend running independently on port 2024):
  4. Verify Application Access: Open your browser to http://localhost:3001 (since Daytona daemon binds to port 3000 by default). Next.js will route and proxy all client-side API requests from /api/* to the LangGraph backend API on http://localhost:2024.

3. Production Environment Setup

3.1 Prerequisites

  • Docker Engine: Version 25+
  • Docker Compose V2: Supported

3.2 Getting Started (Step-by-Step)

  1. Configure Production Variables: Establish your production environment configuration by copying the template file:
    Configure the actual production backend service endpoints (based on your networking setup) and database authorization credentials within .env.production.
  2. Multi-Stage Dockerfile Compilation: The production environment compiles the Next.js dashboard using a multi-stage Dockerfile to optimize image footprint and isolate environment configurations based on Next.js Official Example patterns. The stages include: (Note: The Dockerfile stages shown below are simplified conceptual representations of the actual multi-stage build process.)
    • Stage 1 (Dependencies): Installs production and development node packages using frozen lockfile validation:
    • Stage 2 (Builder): Compiles the Next.js pages and generates the optimized static server bundle:
    • Stage 3 (Runner): Copies compiled Next.js standalone assets, configures container health checks via curl, drops root privileges to run as user node, and starts the production server.
  3. Build and Run the Container: Build the production image and run it locally mapping standard ports:

4. Developer Contribution Guidelines

We enforce code style guidelines and compile checks to maintain codebase quality.

4.1 Linter & Code Formatting (Biome)

The project uses Biome for fast formatting and linting. Before committing changes, run:

4.2 Type Checking & Compilations

To verify that your changes do not introduce type safety errors:
Ensure all diagnostics return clean build outputs prior to pushing updates to the repository.