LightRAG/lightrag_webui
Raphaël MANSUY a6aa073d70 feat(webui): Add single-tenant/multi-tenant mode support
- Add LIGHTRAG_MULTI_TENANT env var to control multi-tenant mode
- Add multi_tenant_enabled flag to /auth-status and /health endpoints
- Update LoginPage to auto-redirect in single-tenant mode
- Update App.tsx to set default tenant/KB in single-tenant mode
- Update TenantSelector to skip API calls in single-tenant mode
- Update SiteHeader to hide tenant selector in single-tenant mode
- Update useTenantInitialization hook to skip in single-tenant mode
- Update AuthStore with multiTenantEnabled state

In single-tenant mode (default):
- No tenant selection UI shown
- Auto-creates default tenant and KB context
- Direct access to all WebUI features

In multi-tenant mode (LIGHTRAG_MULTI_TENANT=true):
- Shows tenant/KB selection UI
- Requires tenant API routes to be configured
2025-12-04 20:37:06 +08:00
..
public Fix linting 2025-05-12 23:27:41 +08:00
src feat(webui): Add single-tenant/multi-tenant mode support 2025-12-04 20:37:06 +08:00
.env.development cherry-pick 04d23671 2025-12-04 19:18:35 +08:00
.gitignore tests: stabilize integration tests + skip external services; fix multi-tenant API behavior and idempotency (#4) 2025-12-04 16:04:21 +08:00
.prettierrc.json
bun.lock cherry-pick 50210e25 2025-12-04 19:18:16 +08:00
components.json
Dockerfile tests: stabilize integration tests + skip external services; fix multi-tenant API behavior and idempotency (#4) 2025-12-04 16:04:21 +08:00
env.development.smaple cherry-pick 04d23671 2025-12-04 19:18:35 +08:00
env.local.sample cherry-pick 04d23671 2025-12-04 19:18:35 +08:00
eslint.config.js
index.html Update favicon.png 2025-05-12 20:02:03 +08:00
package.json cherry-pick 50210e25 2025-12-04 19:18:16 +08:00
README.md cherry-pick a93c1661 2025-12-04 19:19:22 +08:00
tailwind.config.js cherry-pick 50210e25 2025-12-04 19:18:16 +08:00
tsconfig.json Add KaTeX mhchem extension support and improve math rendering 2025-09-28 15:13:04 +08:00
vite.config.ts cherry-pick 04d23671 2025-12-04 19:18:35 +08:00

LightRAG WebUI

LightRAG WebUI is a React-based web interface for interacting with the LightRAG system. It provides a user-friendly interface for querying, managing, and exploring LightRAG's functionalities.

Installation

  1. Install Bun:

    If you haven't already installed Bun, follow the official documentation: https://bun.sh/docs/installation

  2. Install Dependencies:

    In the lightrag_webui directory, run the following command to install project dependencies:

    bun install --frozen-lockfile --production
    
  3. Build the Project:

    Run the following command to build the project:

    bun run build
    

    This command will bundle the project and output the built files to the lightrag/api/webui directory.

Development

  • Start the Development Server:

    If you want to run the WebUI in development mode, use the following command:

    bun run dev
    

Script Commands

The following are some commonly used script commands defined in package.json:

  • bun install: Installs project dependencies.
  • bun run dev: Starts the development server.
  • bun run build: Builds the project.
  • bun run lint: Runs the linter.