Modern React TypeScript web interface for the NGINX Declarative API v5.5.
- � Create and manage NGINX configurations
- 🎨 Modern, responsive UI with dark theme
- 🔄 Real-time status monitoring
- 🧪 Automated test suite with Vitest
- 🚀 Built with React 19, TypeScript, and Vite
- React 19 - UI library
- TypeScript - Type safety
- Vite - Build tool and dev server
- React Router - Client-side routing
- Monaco Editor - JSON editor with schema validation
- Vitest - Testing framework
- React Testing Library - Component testing
- Node.js 24+
- npm or yarn
npm installnpm run devThe app will be available at http://localhost:3000
For the best development experience, run the Web UI locally while keeping backend services (Redis, NGINX DAPI, DevPortal) in Docker containers:
1. Start backend services:
cd ../contrib/docker-compose
docker-compose -f docker-compose.dev.yaml up -d2. Run Web UI locally:
cd ../../webui # or back to webui directory
npm install # first time only
npm run devThis setup provides:
- ⚡ Instant hot-reload for UI changes
- 🐛 Full browser DevTools debugging
- 🔧 Backend isolation in containers
- 🚀 Faster iteration cycles
The Vite proxy automatically forwards /v5.5 API requests to the containerized backend.
Important: If you started the backend with a custom port using nginx-dapi.sh -a <port>, you must set VITE_DAPI_PORT to match:
# Example: Backend running on port 8088
cd ../contrib/docker-compose
./nginx-dapi.sh -c start -m dev -a 8088
# Start webui with matching port
cd ../../webui
VITE_DAPI_PORT=8088 npm run devUsing a custom DAPI port:
If your NGINX Declarative API is running on a custom port (e.g., 8080), set the environment variable:
# Linux/macOS
export VITE_DAPI_PORT=8080
npm run dev
# Or inline
VITE_DAPI_PORT=8080 npm run dev
# Windows (PowerShell)
$env:VITE_DAPI_PORT=8080
npm run devOr create a .env.local file:
VITE_DAPI_PORT=8080# Run tests once
npx vitest run
# Run tests in watch mode
npm test
# Run tests with UI
npm run test:ui
# Generate coverage report
npm run test:coveragenpm run buildnpm run previewdocker build -t nginx-dapi-webui .docker run -p 8080:80 nginx-dapi-webui- Use JSON editor to create configurations
- Based on v5.5 API schema
- Support for NIM and NGINX One outputs
The web UI uses the following v5.5 API endpoints:
POST /v5.5/config- Create configurationGET /v5.5/config/{configUid}- Get configurationPATCH /v5.5/config/{configUid}- Update configurationDELETE /v5.5/config/{configUid}- Delete configurationGET /v5.5/config/{configUid}/status- Get statusGET /v5.5/config/{configUid}/submission/{submissionUid}- Get submission status
The Vite dev server proxies API requests to the backend:
'/v5.5': {
target: 'http://localhost:5000', // NGINX Declarative API
changeOrigin: true,
}You can customize the backend port using the VITE_DAPI_PORT environment variable:
VITE_DAPI_PORT=8080 npm run devThis is especially useful when:
- Running the backend on a custom port
- Developing locally with Docker backend services
- Testing against different API instances
In production, NGINX handles the proxy configuration (see nginx.conf).
webui/
├── src/
│ ├── components/ # Reusable components
│ ├── pages/ # Page components
│ ├── test/ # Test files
│ ├── types/ # TypeScript type definitions
│ ├── App.tsx # Main app component
│ ├── main.tsx # Entry point
│ └── index.css # Global styles
├── public/ # Static assets
├── Dockerfile # Production Docker image
├── nginx.conf # NGINX configuration for production
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Dependencies and scripts
- Enable HTTPS/TLS in production
- Configure CORS headers appropriately on the backend
- Add rate limiting to API endpoints
- Enable security headers (CSP, HSTS, X-Frame-Options)
- Validate and sanitize all user inputs
See the main project CONTRIBUTING.md for guidelines.
Apache License 2.0 - See LICENSE.md