> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ibex.ajna.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Ajna Data Platform UI Library

> Shared React Component Library and BI User Interface

# Ajna Data Platform UI Library

Under the hood, the Ibex visual layer relies on the `ajna_data_platform_ui_lib`, a robust, Vite-powered React component library.

This repository serves a dual purpose: it acts as the underlying package providing standard UI components to other apps (like `ibex-platform-ui`), and serves as the deployable application for the core BI workflow.

## Architectural Information

This frontend application sits behind AWS CloudFront and communicates directly with the `api.triviz.cloud` endpoint where Traefik proxies requests.

* **Framework**: Built on React 19 + TypeScript.
* **Bundler**: Vite with a dual-build setup (`vite.app.config.ts` for the BI app, `vite.config.ts` for the library export).
* **Styling**: TailwindCSS combined with Radix UI (shadcn/ui style components) ensures a modern, accessible interface.
* **Data Visualization**: Heavily utilizes `react-plotly.js` for rendering complex analytical dashboards, line charts, and metric aggregations.
* **State & Data Fetching**: Managed globally using Zustand and React Query (`@tanstack/react-query`).

## High-Level Working

When deployed, the resulting SPA allows users to:

1. View unified Database Connections.
2. Build and manage SQL Lab Queries via `SQL_LAB_FEATURE`.
3. Interact with AI agents in a streaming chat format (using `@microsoft/fetch-event-source` for SSE streaming).
4. Render personalized dashboards utilizing a drag-and-drop grid layout (`react-grid-layout`).

*Because the application is entirely decoupled from the backend logic, it relies implicitly on the `ibex-bi-backend` and `ibex-identity-service` for data marshaling and JWT validation.*
