δΈζ | English
A modern local AI chat application built with React + TypeScript + Vite, specifically designed for local Ollama AI services. Provides a ChatGPT-like conversation experience with real-time interaction with local AI models like DeepSeek-R1:8b.
- π€ Local AI Model Integration - Direct communication with local Ollama service, no cloud API required
- π¬ Real-time Chat Interface - Smooth chat experience with streaming and non-streaming responses
- π± Responsive Design - Perfect adaptation for desktop and mobile devices
- π Theme Switching - Support for dark/light themes, personalized interface
- πΎ Local Data Storage - Chat history saved locally, privacy protection
- π¨ Modern UI - Beautiful interface design based on shadcn/ui
- β‘ Zero Backend Dependencies - Pure frontend application, simple deployment
- π Privacy Protection - Data completely localized, no external service communication
- Frontend Framework: React 18 + TypeScript + Vite
- UI Component Library: shadcn/ui + Radix UI
- Styling Solution: Tailwind CSS
- State Management: Zustand
- Build Tool: Vite 6.3.5
- Package Manager: pnpm
- AI Service: Local Ollama + DeepSeek-R1:8b model
Before getting started, please ensure your system has the following software installed:
- Node.js 18+
- pnpm package manager
- Ollama local AI service
- Visit Ollama Official Website to download and install
- Start Ollama service:
ollama serve
- Download DeepSeek-R1 model:
ollama pull deepseek-r1:8b
git clone <repository-url>
cd local-aipnpm installpnpm devOpen your browser and visit http://localhost:5173
# Start development server
pnpm dev
# Build production version
pnpm build
# Preview build results
pnpm preview
# Code linting
pnpm lint
# Type checking
pnpm checksrc/
βββ components/ # React components
β βββ chat/ # Chat-related components
β β βββ ChatInterface.tsx # Main chat interface
β β βββ MessageList.tsx # Message list
β β βββ MessageInput.tsx # Message input box
β β βββ Message.tsx # Single message component
β β βββ Sidebar.tsx # Sidebar
β βββ settings/ # Settings-related components
β βββ ui/ # Basic UI components (shadcn/ui)
β βββ theme-provider.tsx # Theme provider
β βββ theme-toggle.tsx # Theme toggle
βββ hooks/ # Custom hooks
β βββ useConversations.ts # Conversation management
β βββ useSettings.ts # Settings management
β βββ useTheme.ts # Theme management
βββ services/ # Service layer
β βββ ollama.ts # Ollama API client
βββ store/ # State management
β βββ useAppStore.ts # Global state
βββ types/ # TypeScript type definitions
βββ utils/ # Utility functions
βββ pages/ # Page components
βββ App.tsx # Main application component
- β Real-time AI conversation
- β Message history
- β Multi-line text input
- β Markdown rendering support
- β Code syntax highlighting
- β Auto-scroll to latest message
- β Create new conversation
- β Delete conversation
- β Browse conversation history
- β Export conversation records
- β Ollama service address configuration
- β AI model selection
- β Connection status detection
- β Theme switching
- β Font size adjustment
Default configuration:
- Service Address:
http://localhost:11434 - Default Model:
deepseek-r1:8b
You can modify these configurations in the settings page to suit your environment.
The application supports all Ollama-compatible models, including but not limited to:
- DeepSeek-R1:8b
- Llama 2/3
- Mistral
- CodeLlama
- Other Ollama-supported models
# Build application
pnpm build
# Build artifacts are located in the dist/ directory- Static Hosting: Vercel, Netlify, GitHub Pages
- Self-hosting: Nginx + static file service
- Containerization: Docker + Nginx
FROM node:18-alpine as builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]- Local First: All conversation data is stored locally in the browser
- No Cloud Dependencies: No data sent to any external services
- Open Source Transparency: Code is completely open source and auditable
- Data Control: Users have complete control over their data
We welcome contributions of any kind!
- Fork this repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Use TypeScript for type-safe development
- Follow ESLint code standards
- Use functional programming style for components
- Use Zustand for state management
- Follow responsive design principles
If you encounter any issues or have feature suggestions, please:
- Check Issues for existing related issues
- If none exist, create a new Issue
- Describe the problem or suggestion in detail
- Provide reproduction steps (if it's a bug)
This project is licensed under the MIT License - see the LICENSE file for details.
Thanks to the following open source projects:
- React - User interface library
- Vite - Build tool
- shadcn/ui - UI component library
- Tailwind CSS - CSS framework
- Ollama - Local AI service
- Zustand - State management
Enjoy your conversation experience with local AI! π parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, }, })