# Moxiegen AI Chat Interface with OpenAI and Ollama support. ## Features - **AI Chat Interface**: Chat with AI models from OpenAI or Ollama - **File Uploads**: Attach files to your chat messages - **Admin Panel**: Manage AI endpoints and users - **Multi-Endpoint Support**: Configure multiple AI backends - **User Authentication**: Secure login system with SQLite database ## Tech Stack - **Backend**: Python (FastAPI) - **Frontend**: SvelteKit - **Database**: SQLite - **Auth**: JWT tokens ## Quick Start ### Backend Setup ```bash cd backend # Create virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Run the server uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 ``` ### Frontend Setup ```bash cd frontend # Install dependencies npm install # Run development server npm run dev ``` ### Access the Application - Frontend: http://localhost:5173 - Backend API: http://localhost:8000 - API Docs: http://localhost:8000/docs ### Default Admin Login - Email: `admin@moxiegen.local` - Password: `admin123` ## Configuration ### Adding AI Endpoints 1. Login as admin 2. Go to Admin Panel → AI Endpoints 3. Click "Add Endpoint" 4. Configure: **For OpenAI:** - Type: OpenAI Compatible - Base URL: `https://api.openai.com/v1` - API Key: Your OpenAI API key - Model: `gpt-3.5-turbo` or `gpt-4` **For Ollama:** - Type: Ollama - Base URL: `http://localhost:11434` - API Key: Leave empty - Model: Your Ollama model name (e.g., `llama2`) ## Project Structure ``` moxiegen/ ├── backend/ │ ├── app/ │ │ ├── api/ # API routes │ │ ├── models/ # Database models │ │ ├── schemas/ # Pydantic schemas │ │ ├── core/ # Config, auth, database │ │ └── main.py # FastAPI app │ ├── uploads/ # Uploaded files │ └── requirements.txt ├── frontend/ │ ├── src/ │ │ ├── lib/ # Utilities, API client │ │ ├── routes/ # SvelteKit routes │ │ └── app.css # Global styles │ └── package.json └── README.md ``` ## License MIT