chain-rdeveloper portal
build

Frontend Services

Overview

The frontend is an npm-workspaces monorepo under modules/fe/ with three packages:

PackageDirectoryPurpose
chainr-frontend-publicfe/public/Public-facing application
chainr-frontend-sharedfe/shared/Shared components, hooks, and utilities

Both apps are served via nginx virtual-host routing; neither exposes a port to the host in production.

fe-core (Authenticated App)

Served at app.dev.datachainr.com. All routes are protected — nginx enforces authentication via auth_request before the app is reached.

Application Sections

Dashboard (/user/)

Overview of the user's resources, recent activity, and quick-action entry points. Displays token usage graphs, invocation counts, and shortcuts to commonly used agents and knowledge bases.

Activity (/user/activity)

A live log of LLM invocations across all models and agents. Shows per-invocation metadata (model, token counts, latency) and allows filtering by agent or model.

Inference (/user/inference)

The core AI management section, comprising four sub-sections:

Sub-sectionDescription
AgentsCustom AI agents with a fixed identity. Each agent has a system prompt, an assigned model, and optional specialist tools, knowledge bases, and skills. Includes an inline chat interface for prompting agents directly.
SkillsCustom DAGs of worker agents for sequential or conditional multi-agent workflows. Built on named LangGraph templates. Each node in the DAG maps to a worker agent definition.
WorkersCustom worker agents. Each worker extends a built-in WorkerAgentDefinition (e.g. analyzer, reviewer, planner) with an optional system prompt override and a set of assigned tools.

Knowledge (/user/knowledge)

Management of knowledge bases. Each knowledge base has a source_type that determines its storage backend:

TypeStorageDescription
graphNeo4jEntity/relationship graph; nodes and edges are managed via an interactive canvas editor

Knowledge bases are assigned to agents and queried at inference time.

Tools (/user/tools)

Custom tool definitions. Each tool has a name, description, JSON schema, and an implementation reference. Tools can be general (auto-injected by svc-ai into every agent) or specialist (explicitly assigned to specific agents or workers).

Evaluation (/user/evaluation)

A/B experimentation and regression testing:

  • Experiments — compare prompt or config variants with scored runs

  • Test suites — collections of test cases (input + expected output) run against agents or models

A Task Chains section was removed in September 2026 (svc-core never implemented a /taskchains router) and the Pipelines pages in October 2026 (their router was never mounted, and was deleted with its tables).

Projects & Organisations (/user/projects, /user/organisations)

Workspace management. Resources (agents, knowledge, tools, skills, workers) are scoped to a user, project, or organisation. Project and organisation views provide their own model/agent lists and settings.

Developer (/developer/)

A design preview of API key management, key vault and network firewall configuration. The pages render example data with no backend, are out of the navigation, and carry a "Design preview" banner until the governed API ships.

Technology

LayerLibraryVersion
BuildVite7.3.2
StylingTailwind CSS4.1.8
Data fetchingTanStack Query5.x
TablesTanStack Table8.x
RoutingReact Router7.x
FormsReact Hook Form + Zod7.x / 3.x
Node-based graphsXYFlow (React Flow)12.x
Component primitivesRadix UIvarious
AuthAuth0 React SDK2.x
HTTPAxios1.x
Notificationsreact-hot-toast2.x
Markdownreact-markdown10.x
Grid layoutreact-grid-layout1.x

fe-public (Public App)

Served at dev.datachainr.com. No authentication required. Handles the marketing/landing experience and Auth0 login redirect.

Same core stack as fe-core. Auth0 React SDK is included to initiate the login flow.

fe-shared (Shared Package)

Internal npm package published as chainr-frontend-shared, consumed by both apps. Built with the TypeScript compiler (not Vite).

Contains:

  • Reusable React components

  • Custom hooks

  • Utility functions

  • Markdown parsing helpers

  • Localisation support (CLDR)

  • Type definitions shared across both apps

API Communication

Both apps communicate with the backend exclusively through svc-bff:

Frontend → nginx → svc-bff /proxy/{path} → svc-core
Frontend → nginx → svc-bff /ws/{path}    → svc-core (WebSocket)

The Auth0 React SDK handles the session cookie automatically — no explicit token management in frontend code.

Build & Development

# From modules/fe/
npm install           # Install all workspace dependencies
npm run local -w core # Dev server for fe-core (hot reload, port 5173)
npm run local -w public # Dev server for fe-public

# From repo root
make rebuild-shared   # Rebuild and reinstall fe-shared package

In Docker Compose, both apps run in dev mode with the Vite dev server (hot reload enabled). nginx proxies to port 5173 inside each container.

Environment Variables

Frontend env vars are prefixed with VITE_ and baked in at build time. Key variables:

VariablePurpose
VITE_AUTH0_CLIENT_IDAuth0 client ID
VITE_AUTH0_AUDIENCEAuth0 API audience