Wieland-AI is a full-featured, locally hosted AI chat assistant powered by Ollama. Built with React, Express, and SQLite, it provides a complete solution for offline AI interactions with text and image support, user authentication, chat history, and admin dashboards.
Features โข Tech Stack โข Installation โข Usage โข Configuration โข Contributing
- ๐ User Authentication - Secure JWT-based authentication with bcrypt password hashing
- ๐ฌ AI Chat Interface - Interactive chat with live streaming responses
- ๐ผ๏ธ Image Support - Upload and process images with vision-capable models
- ๐ Chat History - Persistent chat storage with automatic and manual titles
- ๐ฏ Intent Recognition - Automatic intent detection and memory management using NLU
- ๐ Multilingual Support - Built-in i18n support (English, German, Italian)
- ๐ Admin Dashboard - Comprehensive dashboard for user management and analytics
- ๐ณ Payment Integration - Support for payment processing and subscription management
- ๐๏ธ Data Export - Download chat history and data exports
- ๐ฑ Responsive Design - Mobile-friendly interface with modern UI
- ๐ก๏ธ Privacy First - Runs locally with no cloud dependencies
- โก Multiple AI Models - Support for multiple Ollama models
- React 19 - Modern UI library with hooks
- Vite - Lightning-fast build tool
- React Router - Client-side routing
- i18next - Internationalization framework
- Three.js - 3D graphics and visualizations
- GSAP - Animation library
- Recharts - Data visualization
- Multer - File upload handling
- Express.js 5.2 - Web framework
- Node.js >= 18 - Runtime environment
- SQLite 3 - Database with async/await support
- JWT - Token-based authentication
- Bcrypt - Password hashing
- CORS - Cross-origin resource sharing
- ESLint - Code quality
- Concurrently - Run multiple processes
- Nodemon - Auto-reload during development
- Archiver - Data backup and export
- Node.js >= 18.x
- npm or yarn package manager
- Ollama - Running locally (default:
http://localhost:11434) - SQLite - Included with Node.js
git clone https://github.com/yourusername/wieland-ai.git
cd wieland-ainpm installnpm run server:installCreate a .env file in the root directory:
# Server Configuration
PORT=3001
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_KEEP_ALIVE=30m
# Authentication
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production
JWT_EXPIRES=7d
BCRYPT_ROUNDS=12
# Database
SQLITE_PATH=./server/data/wieland.sqlite
# AI Model Configuration
INTENT_NLU_ENABLED=true
INTENT_NLU_DEBUG=false
INTENT_NLU_MODEL=qwen3-vl:2b-instruct
INTENT_NLU_TIMEOUT_MS=2800
INTENT_NLU_MAX_MESSAGE_CHARS=520
INTENT_NLU_MAX_MEMORY_ITEMS=3
# Ollama Prewarming (Optional)
OLLAMA_STARTUP_PREWARM=true
OLLAMA_PREWARM_TIMEOUT_MS=90000
OLLAMA_STARTUP_PREWARM_DELAY_MS=0
OLLAMA_STARTUP_PREWARM_MODELS=qwen3-vl:4b-instruct,qwen3-vl:2b-instructollama servenpm run devThis will start both frontend (Vite on port 5173) and backend (Express on port 3001) concurrently.
# Start both frontend and backend
npm run dev
# Start only frontend
npm run dev:frontend
# Start only backend
npm run dev:backend
# Build for production
npm build
# Preview production build
npm run preview
# Run linter
npm run lint# Start the application
npm start
# Access the app
# Frontend: http://localhost:5173
# Backend API: http://localhost:3001wieland-ai/
โโโ src/ # Frontend React application
โ โโโ components/ # React components
โ โ โโโ ChatInterface.jsx # Main chat component
โ โ โโโ Header.jsx # Navigation header
โ โ โโโ Sidebar.jsx # Chat sidebar
โ โ โโโ AuthModal.jsx # Authentication modal
โ โ โโโ dashboard/ # Admin dashboard components
โ โ โ โโโ UsersTable.jsx
โ โ โ โโโ ChatsTable.jsx
โ โ โ โโโ ChatViewer.jsx
โ โ โ โโโ ActivityChart.jsx
โ โ โโโ ...
โ โโโ pages/ # Page components
โ โ โโโ ChatPage.jsx # Main chat page
โ โ โโโ Dashboard.jsx # Admin dashboard
โ โ โโโ Profile.jsx # User profile
โ โ โโโ Pricing.jsx # Pricing page
โ โ โโโ ...
โ โโโ context/ # React context
โ โ โโโ AuthContext.jsx # Authentication context
โ โโโ locales/ # i18n translations
โ โ โโโ en.json
โ โ โโโ de.json
โ โ โโโ it.json
โ โโโ styles/ # CSS modules
โ โโโ utils/ # Utility functions
โโโ server/ # Backend Express application
โ โโโ server.js # Main server file
โ โโโ data/ # SQLite database
โ โโโ contacts/ # Contact data
โ โโโ history/ # Chat history storage
โ โโโ scripts/ # Utility scripts
โโโ wieland-extension/ # Browser extension
โโโ package.json # Frontend dependencies
โโโ vite.config.js # Vite configuration
POST /api/auth/register- Register new userPOST /api/auth/login- Login userPOST /api/auth/refresh- Refresh JWT tokenGET /api/auth/verify- Verify token validity
POST /api/chat- Send chat messageGET /api/chats- Get user's chat historyDELETE /api/chats/:id- Delete chatGET /api/chat/:id- Get specific chat
GET /api/user/profile- Get user profilePUT /api/user/profile- Update user profileDELETE /api/user/account- Delete user account
GET /api/admin/users- List all usersGET /api/admin/stats- Get database statisticsDELETE /api/admin/users/:id- Remove user
GET /api/models- List available Ollama modelsPOST /api/chat/stream- Stream AI response
- ๐ฌ๐ง English
- ๐ฉ๐ช German (Deutsch)
- ๐ฎ๐น Italian (Italiano)
- OLLAMA_KEEP_ALIVE - How long to keep model in memory (default: 30m)
- OLLAMA_STARTUP_PREWARM - Preload models on startup
- OLLAMA_PREWARM_TIMEOUT_MS - Timeout for prewarming (default: 90s)
- INTENT_NLU_ENABLED - Enable automatic intent detection
- INTENT_NLU_MODEL - Model for intent recognition
- INTENT_NLU_MAX_MEMORY_ITEMS - Number of memory context items
- JWT Authentication - Secure token-based authentication
- Bcrypt Password Hashing - Industry-standard password security
- CORS Protection - Cross-origin request validation
- SQL Injection Prevention - Using parameterized queries
- Offline-First Design - No external API dependencies
- Input Validation - Server-side validation of all inputs
id- Unique user identifieremail- User email (unique)password- Bcrypt hashed passwordusername- Display namecreated_at- Account creation timestampupdated_at- Last update timestamp
id- Chat unique identifieruser_id- Reference to usertitle- Chat titlecreated_at- Chat creation timestampupdated_at- Last message timestamp
id- Message unique identifierchat_id- Reference to chatrole- 'user' or 'assistant'content- Message contentcreated_at- Message timestamp
# Check if Ollama is running
curl http://localhost:11434/api/tags
# Start Ollama service
ollama serve# Reset database (CAUTION: Deletes all data)
rm server/data/wieland.sqlite# Change port in .env
PORT=3002# Reinstall all dependencies
rm -rf node_modules package-lock.json
npm install
npm run server:installContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Use ESLint for code quality
- Follow React best practices
- Add meaningful commit messages
- Include comments for complex logic
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Ryhox
For questions or issues:
- ๐ฌ Discussions: GitHub Discussions
- ๐ Issues: GitHub Issues
- Ollama - AI model runtime
- React - UI library
- Express.js - Web framework
- Three.js - 3D graphics
- Community contributors and testers
Made with โค๏ธ by Ryhox
