Spaces:
Paused
NVR Universal Deep Research - Frontend
A Next.js frontend application for the NVR Universal Deep Research system that provides an interactive interface for intelligent research and reporting capabilities.
This software is provided exclusively for research and demonstration purposes. It is intended solely as a prototype to demonstrate research concepts and methodologies in artificial intelligence and automated research systems.
- This software is not intended for production deployment, commercial use, or any real-world application where reliability, accuracy, or safety is required.
- This software contains experimental features, unproven methodologies, and research-grade implementations that may contain bugs, security vulnerabilities, or other issues.
- The software is provided "AS IS" without any warranties. Neither NVIDIA Corporation nor the authors shall be liable for any damages arising from the use of this software to the fullest extent permitted by law.
By using this software, you acknowledge that you have read and understood the complete DISCLAIMER file and agree to be bound by its terms. For the complete legal disclaimer, please see the DISCLAIMER file in this directory.
Features
- Interactive research interface with real-time progress tracking
- Configurable research strategies
- Support for both V1 and V2 API endpoints
- Dry run mode for testing
- Real-time report generation and viewing
Configuration
The frontend application is highly configurable through environment variables. Copy the example environment file and customize it for your deployment:
cp env.example .env.local
Environment Variables
Backend API Configuration
NEXT_PUBLIC_BACKEND_BASE_URL: The base URL of your backend server (default:http://localhost)NEXT_PUBLIC_BACKEND_PORT: The port your backend server is running on (default:8000)NEXT_PUBLIC_API_VERSION: API version to use -v1orv2(default:v2)
Runtime Configuration
NEXT_PUBLIC_DRY_RUN: Enable dry run mode -trueorfalse(default:false)NEXT_PUBLIC_ENABLE_V2_API: Enable V2 API -trueorfalse(default:true)
Frontend Configuration
NEXT_PUBLIC_FRONTEND_PORT: The port for the frontend development server (default:3000)NEXT_PUBLIC_FRONTEND_HOST: The host for the frontend development server (default:localhost)
Example Configuration
For a production deployment with a backend on a different server:
NEXT_PUBLIC_BACKEND_BASE_URL=http://your-backend-server.com
NEXT_PUBLIC_BACKEND_PORT=8000
NEXT_PUBLIC_API_VERSION=v2
NEXT_PUBLIC_DRY_RUN=false
NEXT_PUBLIC_ENABLE_V2_API=true
For local development:
NEXT_PUBLIC_BACKEND_BASE_URL=http://localhost
NEXT_PUBLIC_BACKEND_PORT=8000
NEXT_PUBLIC_API_VERSION=v2
NEXT_PUBLIC_DRY_RUN=true
NEXT_PUBLIC_ENABLE_V2_API=true
Getting Started
Install dependencies:
npm installConfigure environment variables:
cp env.example .env.local # Edit .env.local with your configurationRun the development server:
npm run devOpen your browser: Navigate to http://localhost:3000 to see the application.
Available Scripts
npm run dev- Start the development server with Turbopacknpm run build- Build the application for productionnpm run start- Start the production servernpm run lint- Run ESLint
Project Structure
src/
βββ app/ # Next.js app directory
β βββ page.tsx # Main application page
β βββ layout.tsx # Root layout
β βββ globals.css # Global styles
βββ components/ # React components
β βββ PromptBar.tsx # Main input interface
β βββ ResearchProgressList.tsx # Progress tracking
β βββ ReportViewer.tsx # Report display
β βββ ... # Other UI components
βββ config/ # Configuration management
β βββ index.ts # App configuration
βββ types/ # TypeScript type definitions
βββ ApplicationState.ts
Backend Requirements
This frontend requires a compatible backend server running the NVR Universal Deep Research API. The backend should:
- Support both
/api/research(V1) and/api/research2(V2) endpoints - Accept POST requests with JSON payloads
- Return Server-Sent Events (SSE) for real-time progress updates
- Support the dry run mode parameter
Deployment
The application can be deployed to any platform that supports Next.js:
- Build the application:
npm run build - Start the production server:
npm run start - Set the appropriate environment variables for your deployment
Example Deployment Platforms
- Vercel: Connect your Git repository and set environment variables in the dashboard
- Netlify: Build and deploy with environment variable configuration
- Railway: Deploy with automatic environment variable management
- Self-hosted: Run on your own server with proper environment configuration
Troubleshooting
Common Issues
Backend Connection Errors: Ensure your backend server is running and the
NEXT_PUBLIC_BACKEND_BASE_URLandNEXT_PUBLIC_BACKEND_PORTare correctly configured.CORS Errors: Make sure your backend server allows requests from your frontend domain.
API Version Issues: If you're experiencing API compatibility issues, try switching between
v1andv2using theNEXT_PUBLIC_API_VERSIONenvironment variable.
Development Tips
- Use
NEXT_PUBLIC_DRY_RUN=trueduring development to avoid making actual API calls - The application supports hot reloading - changes to your code will be reflected immediately
- Check the browser console for detailed error messages
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License and Disclaimer
This software is provided for research and demonstration purposes only. Please refer to the DISCLAIMER file for complete terms and conditions regarding the use of this software. You can find the license in LICENSE.
Do not use this code in production.