Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

digdir/digdir-rag-frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1 Commit

Repository files navigation

RAG Chat Application

Note: This project is a demonstration and is of alpha quality. It is not intended for production use without further development and testing.

A chat application with Retrieval Augmented Generation (RAG) capabilities, consisting of a React frontend and a Node.js backend-for-frontend (BFF) that proxies requests to a Headless RAG API.

Architecture

┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ │ │ │ │ │
│ React Frontend │────▶│ Node.js BFF │────▶│ Headless RAG │
│ (Vite + TS) │ │ (Express) │ │ (RAG + Data) │
│ │ │ │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
  • Frontend: React 19 with TypeScript, Vite, TanStack Query, Zustand, and Tailwind CSS
  • Backend BFF: Node.js/Express providing authentication and API proxying
  • Headless RAG API: External RAG service (not included in this repository)

Quick Start

Prerequisites

  • Node.js 18+
  • A running Headless RAG API backend with an API key

Setup

  1. Install dependencies for both projects:
cd frontend && npm install
cd ../backend-bff && npm install
  1. Configure the backend:
cd backend-bff
cp .env.example .env
# Edit .env with your configuration
  1. Start both services:
# Terminal 1 - Backend BFF
cd backend-bff && npm run dev
# Terminal 2 - Frontend
cd frontend && npm run dev
  1. Access the application:

Project Structure

rag-frontend/
├── frontend/ # React frontend application
│ └── README.md # Frontend-specific documentation
├── backend-bff/ # Node.js backend-for-frontend
│ └── README.md # Backend-specific documentation
└── README.md # This file

Documentation

For detailed information about each component, see:

Features

  • Domain-based email authentication
  • Session management
  • Conversation management
  • RAG-powered chat with streaming responses
  • Markdown and LaTeX rendering
  • Norwegian Design System UI components

License

MIT

About

Headless RAG demo app

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Languages

AltStyle によって変換されたページ (->オリジナル) /