Frontend Services
Overview
The frontend is an npm-workspaces monorepo under modules/fe/ with three packages:
| Package | Directory | Purpose |
|---|---|---|
chainr-frontend-public | fe/public/ | Public-facing application |
chainr-frontend-shared | fe/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-section | Description |
|---|---|
| Agents | Custom 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. |
| Skills | Custom 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. |
| Workers | Custom 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:
| Type | Storage | Description |
|---|---|---|
graph | Neo4j | Entity/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
| Layer | Library | Version |
|---|---|---|
| Build | Vite | 7.3.2 |
| Styling | Tailwind CSS | 4.1.8 |
| Data fetching | TanStack Query | 5.x |
| Tables | TanStack Table | 8.x |
| Routing | React Router | 7.x |
| Forms | React Hook Form + Zod | 7.x / 3.x |
| Node-based graphs | XYFlow (React Flow) | 12.x |
| Component primitives | Radix UI | various |
| Auth | Auth0 React SDK | 2.x |
| HTTP | Axios | 1.x |
| Notifications | react-hot-toast | 2.x |
| Markdown | react-markdown | 10.x |
| Grid layout | react-grid-layout | 1.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:
| Variable | Purpose |
|---|---|
VITE_AUTH0_CLIENT_ID | Auth0 client ID |
VITE_AUTH0_AUDIENCE | Auth0 API audience |