Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0ad1ad0
feat(ngui-e2e): split server/client architecture and update deploymen…
Sep 20, 2025
b089981
Merge branch 'main' into NGUI-330/test_app_deployment
Oct 1, 2025
654d7f1
feat(ngui-e2e): add environment configuration and error handling comp…
Oct 1, 2025
158e8d3
Run pants tailor to fix missing targets
Oct 1, 2025
798330d
refactor: remove unused import from main.py
Oct 1, 2025
d908e13
fix: add missing newline in main.py for better readability
Oct 1, 2025
5c83aa5
refactor: clean up imports and improve formatting in main.py
Oct 1, 2025
1eefbfd
feat: add default values for LLM_MODEL and LLM_BASE_URL in main.py
Oct 1, 2025
1826bc4
fix: add missing comma in ChatOpenAI instantiation for correct syntax
Oct 1, 2025
c1126d6
refactor: simplify state initialization and improve icon size in Chat…
Oct 1, 2025
3002dec
feat: add dependencies for langchain and langgraph in BUILD file
Oct 1, 2025
5af5e13
fix: enhance external dependencies handling in vite.config.ts
Oct 1, 2025
ed855c2
feat: add README documentation for NGUI E2E server and update main RE…
Oct 1, 2025
9e1cac0
Revert "fix: enhance external dependencies handling in vite.config.ts"
Oct 1, 2025
f394e43
feat(NGUI-330): add API key support for models.corp in e2e server
Oct 1, 2025
ce561c3
fix(NGUI-330): refactor ChatOpenAI initialization to improve API key …
Oct 1, 2025
a3ad06f
fix(NGUI-330): use SecretStr for API key in ChatOpenAI initialization
Oct 1, 2025
92e5aec
Merge branch 'main' into NGUI-330/test_app_deployment
Oct 1, 2025
6760a41
refactor(NGUI-330): standardize error response handling in generate_r…
Oct 2, 2025
deb1bf3
chore(NGUI-330): move Python dependencies to /libs/3rdparty/python
Oct 2, 2025
d250be2
chore(NGUI-330): update dependencies and enhance error response handling
Oct 2, 2025
9c8ec06
Merge branch 'main' into NGUI-330/test_app_deployment
Oct 2, 2025
54398de
chore(NGUI-330): rename Python requirements for E2E server
Oct 3, 2025
4c082ad
chore(NGUI-330): remove unused dependencies from langgraph BUILD file
Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libs/3rdparty/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ python_requirements(
name="custom-renderers",
source="custom-renderers-requirements.txt",
)

python_requirements(
name="ngui-e2e-server",
source="ngui-e2e-server-requirements.txt",
)
5 changes: 5 additions & 0 deletions libs/3rdparty/python/ngui-e2e-server-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Server dependencies
python-dotenv>=1.0.0
fastapi
pydantic
uvicorn
3 changes: 3 additions & 0 deletions libs/next_gen_ui_langgraph/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ python_sources(
python_tests(
name="tests",
dependencies=[
":lib",
"libs/3rdparty/python:langchain",
"libs/3rdparty/python:langgraph",
"libs/3rdparty/python:pytest",
],
)
Expand Down
4 changes: 4 additions & 0 deletions tests/ngui-e2e/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Environment variables
.env
.env.local
.env.*.local
4 changes: 0 additions & 4 deletions tests/ngui-e2e/BUILD

This file was deleted.

143 changes: 0 additions & 143 deletions tests/ngui-e2e/NGUI-e2e/README.md

This file was deleted.

44 changes: 0 additions & 44 deletions tests/ngui-e2e/NGUI-e2e/src/hooks/useFetch.tsx

This file was deleted.

27 changes: 27 additions & 0 deletions tests/ngui-e2e/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# NGUI End-to-End Testing Application

This directory contains a complete end-to-end testing application for the Next Gen UI (NGUI) system, demonstrating AI-driven UI component generation with a split server/client architecture.

## Structure

```
ngui-e2e/
β”œβ”€β”€ server/ # FastAPI backend with NGUI agent
└── client/ # React frontend application
```

## Components

- **`server/`** - FastAPI backend that provides AI-powered UI generation APIs using LangGraph integration
- **`client/`** - React frontend application that consumes the backend APIs and renders dynamic UI components

## Getting Started

Each subfolder contains its own README with detailed setup, installation, configuration, and running instructions:

- See [`server/README.md`](server/README.md) for backend setup and configuration
- See [`client/README.md`](client/README.md) for frontend setup and configuration

## Purpose

This application serves as a comprehensive testing and demonstration platform for the NGUI system, allowing contributors to understand the complete workflow from AI model inference to dynamic UI component rendering.
2 changes: 2 additions & 0 deletions tests/ngui-e2e/client/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# API Configuration
VITE_API_ENDPOINT=http://localhost:8000/generate
File renamed without changes.
135 changes: 135 additions & 0 deletions tests/ngui-e2e/client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# NGUI E2E Client

[![Module Category](https://img.shields.io/badge/Module%20Category-Testing/Evaluation-darkmagenta)](https://github.com/RedHat-UX/next-gen-ui-agent)
[![Module Status](https://img.shields.io/badge/Module%20Status-Tech%20Preview-orange)](https://github.com/RedHat-UX/next-gen-ui-agent)

This module is part of the [Next Gen UI Agent project](https://github.com/RedHat-UX/next-gen-ui-agent).

React frontend application for the NGUI end-to-end testing application. Demonstrates dynamic UI component rendering and provides a ChatBot interface for interacting with the AI-powered backend.

## Provides

* React-based frontend application
* Dynamic UI component rendering using NGUI components
* ChatBot interface for AI interaction
* Vite-based development environment
* Integration with NGUI `dynamicui` package
* Error boundary handling for robust UI

## Installation

### Prerequisites

1. **Node.js** (version 18 or higher)
2. **npm** or **yarn** package manager
3. **`dynamicui` package** - Available locally for development

### Install Dependencies

```bash
cd tests/ngui-e2e/client
npm install
npm link dynamicui
```

**Note**: The `dynamicui` package will be available via npm in the future. For now, it's available locally for development purposes.

## Configuration

The client is configured to connect to the backend server running on `localhost:8000`. This can be modified in the API configuration if needed.

### Vite Configuration

The application uses Vite for development and building. Configuration is in `vite.config.ts`:

- Development server runs on port `5173`
- Proxy configuration for API calls to backend
- TypeScript support enabled

## Running

### Development Mode

```bash
cd tests/ngui-e2e/client
npm run dev
```

The application will be available at [http://localhost:5173](http://localhost:5173)

### Build for Production

```bash
npm run build
```

Built files will be available in the `dist/` directory.

## Application Structure

```
src/
β”œβ”€β”€ components/
β”‚ β”œβ”€β”€ ChatBot.tsx # Main chat interface component
β”‚ β”œβ”€β”€ DynamicComponent.tsx # Dynamic UI component renderer
β”‚ └── ErrorBoundary.tsx # Error handling component
β”œβ”€β”€ hooks/
β”‚ └── useFetch.tsx # Custom hook for API calls
β”œβ”€β”€ App.tsx # Main application component
└── main.tsx # Application entry point
```

## Features

- **Dynamic Component Rendering**: Renders UI components generated by the AI backend
- **Chat Interface**: Interactive chat interface for testing AI responses
- **Error Handling**: Robust error boundary for graceful error handling
- **Responsive Design**: Modern UI with responsive design patterns

## Troubleshooting

### Common Issues

**1. Module Not Found: "dynamicui"**
- **Cause**: The `dynamicui` package is not built or linked properly
- **Solution**: Build the package from `libs_js/next_gen_ui_react/` and run `npm link dynamicui`

**2. API Connection Errors**
- **Cause**: Backend server is not running or not accessible
- **Solution**: Ensure the backend server is running on `localhost:8000`

**3. Port Conflicts**
- **Frontend runs on**: `localhost:5173` (default Vite dev server)
- **Backend runs on**: `localhost:8000`

### Verification Steps

```bash
# Check if frontend is running
curl -I http://localhost:5173

# Check if backend is accessible from frontend
curl -I http://localhost:8000/docs
```

## Development

### Available Scripts

- `npm run dev` - Start development server
- `npm run build` - Build for production
- `npm run preview` - Preview production build
- `npm run lint` - Run ESLint

### Dependencies

- **React** - UI framework
- **Vite** - Build tool and dev server
- **TypeScript** - Type safety
- **dynamicui** - NGUI React components package

## Links

* [Documentation](https://redhat-ux.github.io/next-gen-ui-agent/)
* [Source Codes](https://github.com/RedHat-UX/next-gen-ui-agent/tree/main/tests/ngui-e2e/client)
* [Contributing](https://redhat-ux.github.io/next-gen-ui-agent/development/contributing/)
File renamed without changes.
Loading