A sophisticated Next.js 15 application for managing multi-agent AI simulations. This frontend provides real-time monitoring, visualization, and control over complex AI agent orchestrations.
# Install dependencies
yarn install
# Start development server
yarn dev
# Build for production
yarn build
# Start production server
yarn start
The application runs on port 8888 by default.
- Node.js 18+
- Yarn (modern version with PnP support)
- Running instance of autobox-api backend
- Framework: Next.js 15 with App Router
- Language: TypeScript with strict mode
- Styling: Tailwind CSS + shadcn/ui components
- Icons: Lucide React + Radix UI icons
- Validation: Zod schemas
- Performance: Built-in monitoring and optimization
src/
βββ app/ # Next.js App Router pages and API routes
β βββ api/ # API route handlers
β βββ organizations/ # Organization pages
β βββ projects/ # Project management
β βββ simulations/ # Simulation control
βββ components/ # React components
β βββ ui/ # shadcn/ui components
β βββ ... # Domain-specific components
βββ hooks/ # Custom React hooks
βββ lib/ # Utilities and services
βββ schemas/ # Zod validation schemas
βββ styles/ # Global CSS and Tailwind config
βββ types/ # TypeScript definitions
Organizations
βββ Projects
βββ Simulations
βββ Runs
βββ Agents
βββ Traces
βββ Metrics
- Live simulation status updates via polling
- Request deduplication for performance
- Automatic retry with exponential backoff
- WebSocket-ready architecture
- Virtual Scrolling: Large dataset handling
- Lazy Loading: On-demand component loading
- Image Optimization: Custom OptimizedImage component
- Bundle Splitting: Intelligent code splitting
- HTTP Caching: Smart cache headers and revalidation
# Core Development
yarn dev # Start dev server with hot reload
yarn build # Build production bundle
yarn start # Run production server
yarn lint # Run ESLint checks
# Performance Analysis
yarn analyze # Bundle size analyzer
yarn perf:audit # Complete performance audit
yarn lighthouse # Lighthouse performance metrics
yarn perf:test # Custom performance tests
# Tools
yarn code:prompt # Run code merger utility
Create a .env.local
file:
API_URL=http://localhost:3000 # Backend API URL
ORG_ID=default-org # Default organization ID
The application provides internal API routes that proxy to the backend:
/api/organizations/
- Organization management/api/projects/
- Project CRUD operations/api/simulations/
- Simulation lifecycle/api/runs/
- Run monitoring and control/api/templates/metrics/
- Metric templates
The project uses shadcn/ui for consistent, accessible components:
- Location:
/src/components/ui/
- Configuration:
components.json
- Theming: CSS variables with Tailwind
- Customization: All components are editable
- Forms: Input, Select, Checkbox, RadioGroup
- Feedback: Toast, Alert, Badge
- Overlay: Dialog, Sheet, Popover
- Navigation: Tabs, NavigationMenu
- Display: Card, Table, Avatar
- Actions: Button, DropdownMenu
- Server Components: Data fetching at component level
- Custom Hooks: Encapsulated state logic
- Polling: Real-time updates via
useRunPolling
- Error Boundaries: Graceful error handling
useRunPolling
- Real-time run status updatesuseSimulation
- Simulation state managementuseMetrics
- Performance metrics tracking
- Console timing for critical operations
- Custom performance hooks
- Lighthouse CI integration
- Bundle analyzer reports
- Code Splitting: Dynamic imports for heavy components
- Memoization: React.memo for expensive renders
- Virtualization: Large list optimization
- Prefetching: Strategic data preloading
- Caching: HTTP and component-level caching
# Run all tests (when implemented)
yarn test
# Run performance tests
yarn perf:test
# Lighthouse audit
yarn lighthouse
# 1. Install dependencies
yarn install
# 2. Build the application
yarn build
# 3. Start production server
yarn start
- Set appropriate environment variables
- Configure reverse proxy (nginx/Apache)
- Enable HTTPS with SSL certificates
- Set up monitoring and logging
- Configure CDN for static assets
FROM node:18-alpine
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
RUN yarn build
EXPOSE 8888
CMD ["yarn", "start"]
- Strict mode enabled
- Path aliases:
@/*
β./src/*
- Module resolution: Bundler mode
- Dark theme default
- Custom color palette
- System font stack
- Responsive breakpoints
- App Router enabled
- Server Components default
- Image optimization
- Font optimization
- autobox-api - Backend API server
- autobox-mocks - Mock data generator
- autobox-mocks-api - Mock API endpoints
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open Pull Request
- ESLint configuration enforced
- Prettier formatting
- TypeScript strict mode
- Component naming conventions
[License Type] - See LICENSE file for details
For issues and questions:
- Check existing GitHub issues
- Create new issue with reproduction steps
- Contact development team