Elysia is a modern AI-powered platform built as a single-page application (SPA) that provides an intuitive interface for AI interactions, data exploration, and configuration management. This frontend application serves as the user interface for the broader Elysia ecosystem.
Framework & Core Technologies:
- Next.js 14 - React framework with App Router
- React 18 - JavaScript library for building user interfaces
- TypeScript - Type-safe JavaScript development
- Tailwind CSS - Utility-first CSS framework
UI Libraries & Components:
- Radix UI - Accessible, unstyled UI primitives
- Shadcn - Beautiful & consistent component library
- Framer Motion - Production-ready motion library
- React Markdown - Markdown component for React
- React Syntax Highlighter - Syntax highlighting component
3D Graphics & Visualization:
- Three.js - 3D graphics library
- React Three Fiber - React renderer for Three.js
- React Three Drei - Useful helpers for React Three Fiber
- React Three Postprocessing - Postprocessing effects
Data Visualization:
- Recharts - Composable charting library
- XYFlow React - Flow chart and node-based UI library
Development Tools:
- ESLint - Code linting
- Prettier - Code formatting
- Cross-env - Cross-platform environment variables
- Node.js (version 18 or higher)
- npm (comes with Node.js)
- Modern web browser with ES2017+ support
-
Clone the repository
git clone <repository-url> cd elysia-frontend
-
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:3000
elysia-frontend/
βββ app/ # Next.js app directory
β βββ api/ # API route handlers
β βββ components/ # React components
β β βββ chat/ # Chat-related components
β β β βββ components/ # Shared chat components
β β β βββ displays/ # Various display types
β β β βββ nodes/ # Flow node components
β β βββ configuration/ # Settings and config components
β β βββ contexts/ # React context providers
β β βββ debugging/ # Debug tools and utilities
β β βββ dialog/ # Modal and dialog components
β β βββ evaluation/ # Evaluation and feedback components
β β βββ explorer/ # Data exploration components
β β βββ navigation/ # Navigation and sidebar components
β β βββ threejs/ # 3D graphics components
β βββ pages/ # Main page components
β βββ types/ # TypeScript type definitions
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout component
β βββ page.tsx # Homepage component
βββ components/ # Shared UI components
β βββ ui/ # Reusable UI primitives
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions
βββ public/ # Static assets
βββ configuration files # Config files (tsconfig, tailwind, etc.)
app/api/
- Contains server-side API routes for backend communicationapp/components/
- Core application components organized by featureapp/pages/
- Main page components (Chat, Data, Settings, etc.)app/types/
- TypeScript interfaces and type definitionscomponents/ui/
- Reusable UI components built with Radix UIhooks/
- Custom React hooks for shared logicpublic/
- Static files like images and icons
Elysia is built as a SPA using Next.js with client-side routing. The main navigation happens through React context (RouterContext
) without page reloads, providing a smooth user experience.
- Chat - AI conversation interface
- Data - Data exploration and visualization
- Settings - Configuration management
- Evaluation - AI model evaluation tools
- Explorer - Advanced data browsing
- Real-time chat with AI models
- Interactive data visualizations
- 3D graphics and globe visualizations
- Configurable AI model settings
- Data collection management
- Feedback and evaluation systems
# Development
npm run dev # Start development server
# Building
npm run build # Build for production
npm run build:clean # Clean build (removes cache first)
# Export & Assembly
npm run export # Export static files to backend
npm run assemble # Build and export in one command
npm run assemble:clean # Clean build and export
# Other
npm start # Start production server
npm run lint # Run ESLint
The application uses a custom build process designed for static export:
- Build: Creates an optimized production build
- Export: Generates static files in the
out/
directory - Assembly: Copies exported files to the backend's static directory
The export.sh
script handles copying the built static files to ../elysia/api/static
for integration with the backend server.
The application supports various environment variables:
NEXT_PUBLIC_IS_STATIC
- Enables static export mode
- Tailwind CSS for utility-first styling
- CSS Custom Properties for dynamic theming
- Custom fonts: Space Grotesk (text) and Manrope (headings)
- Responsive design with mobile-first approach
- Dark mode support via CSS classes
- Context-based state management for global state
- Component composition with Radix UI primitives
- Custom hooks for shared logic
- TypeScript interfaces for type safety
- Modular component organization by feature
Elysia is an open-source project, and we welcome contributions from the community! Whether you're fixing bugs, adding features, improving documentation, or suggesting enhancements, your contributions help make Elysia better for everyone.
- π Bug Reports - Help us identify and fix issues
- β¨ Feature Requests - Suggest new functionality
- π» Code Contributions - Submit pull requests with improvements
- π Documentation - Help improve our docs and examples
- π§ͺ Testing - Help us test new features and report issues
- Fork the repository and create your feature branch
- Make your changes following our coding standards
- Ensure all tests pass and the build is successful
- Submit a pull request with a clear description of your changes
IMPORTANT: Before submitting any contribution, you MUST ensure that the build process completes successfully:
npm run build
This command must run without errors before your pull request will be accepted. This ensures:
- All TypeScript types are valid
- Components render correctly
- Dependencies are properly resolved
- The application can be successfully deployed
If the build fails, please fix all issues before submitting your contribution.
- Open an issue for bug reports or feature requests
- Join our Weaviate community discussions
- Check out the existing issues for contribution opportunities
We appreciate every contribution, no matter how small. Thank you for helping make Elysia better! π