A modern chat interface for Large Language Models (LLMs) built with React, TypeScript, and Vite.
- Clean and intuitive chat interface
- Model selection capability
- Real-time chat interactions
- Markdown support with syntax highlighting
- Settings configuration through modal window
- Responsive sidebar for chat management
- React 19
- TypeScript
- Vite 6
- Markdown rendering with markdown-to-jsx
- Syntax highlighting via starry-night
- Modern ESLint configuration
- Node.js (Latest LTS version recommended)
- npm or yarn package manager
- Clone the repository:
git clone https://github.com/valaises/llm-chat.git
cd llm-chatui- Install dependencies:
npm installTo start the development server:
npm run devThis will start the Vite development server with hot module replacement.
To create a production build:
npm run buildThe built files will be in the dist directory.
To preview the production build locally:
npm run previewThis project includes Docker and Docker Compose configurations for both development and production environments.
To start the development environment with host network mode:
docker-compose up app-devThis will start the Vite development server using the host's network, making it available on port 5173 with hot module replacement enabled. The server is configured to accept connections from any hostname (allowedHosts is set to 'all').
If you prefer using port mapping instead of host network:
docker-compose --profile ports up app-dev-portsTo build and run the production version with host network mode:
docker-compose up app-prodThis will build the application and serve it using Nginx, making it available directly on the host's port 80.
If you prefer using port mapping instead of host network:
docker-compose --profile ports up app-prod-portsTo build the Docker image manually:
# For production
docker build -t llm-chatui:latest .
# For development
docker build -t llm-chatui:dev -f Dockerfile.dev .# Run production container
docker run -p 80:80 llm-chatui:latest
# Run development container
docker run -p 5173:5173 -v $(pwd):/app -v /app/node_modules llm-chatui:devThe project is organized into several key directories:
- src/: Contains the main application code, including components, hooks, and utilities.
- public/: Holds static assets such as images and the main HTML file.
- tests/: Includes unit and integration tests for the application.
- dist/: The output directory for production builds.
- .github/: Contains GitHub-specific files, including workflows for CI/CD.
