Elysia Frontend
August 11, 2025 ยท View on GitHub
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.
๐๏ธ Built With
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
๐ Requirements
- Node.js (version 18 or higher)
- npm (comes with Node.js)
- Modern web browser with ES2017+ support
๐ Getting Started
-
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
๐ Project Structure
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.)
Key Directories Explained:
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
๐ฏ Application Features
Single Page Application (SPA)
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.
Main Sections:
- Chat - AI conversation interface
- Data - Data exploration and visualization
- Settings - Configuration management
- Evaluation - AI model evaluation tools
- Explorer - Advanced data browsing
Key Capabilities:
- 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
๐ง Available Scripts
# 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
๐จ Build Process
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.
๐ Environment Configuration
The application supports various environment variables:
NEXT_PUBLIC_IS_STATIC- Enables static export mode
๐จ Styling & Theming
- 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
๐งฉ Architecture Patterns
- 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
๐ Open Source & Contributing
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.
Ways to Contribute:
- ๐ 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
Contribution Guidelines:
- 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
๐จ Before Contributing - Build Requirement
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.
Getting Help
- 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! ๐