A modern web application for AI model inference and chat interactions, providing a unified interface for both cloud-based and local AI models.
Konexion is a full-stack web application that enables seamless interaction with multiple AI providers through an intuitive chat interface. The project consists of two main components:
βββββββββββββββββββ WebSocket/HTTP βββββββββββββββββββ
β β βββββββββββββββββββΊ β β
β SvelteKit β β FastAPI β
β Frontend β β Backend β
β β β β
βββββββββββββββββββ βββββββββββββββββββ
β
β HTTP/API
βΌ
βββββββββββββββββββ
β AI Providers β
β β
β βββββββ βββββββββ
β βGroq β βOllamaββ
β βββββββ βββββββββ
βββββββββββββββββββ
git clone <repository-url>
cd source
cd konexion_backend
# Install UV if not already installed
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
uv venv --python 3.12
source .venv/bin/activate
uv sync
# Configure environment
cp example.env .env
# Edit .env with your configuration
# Start the backend
uv run main.py
cd ../konexion_frontend
# Install dependencies
npm install
# or
pnpm install
# Start development server
npm run dev
# or
pnpm dev
source/
βββ konexion_backend/ # FastAPI backend application
β βββ main.py # Application entry point
| βββ vision.py # Complete vision processing module
β βββ config.py # Configuration management
β βββ pyproject.toml # Python dependencies
β βββ ai_models/ # AI provider implementations
β β βββ groq.py # Groq integration
β β βββ ollama.py # Ollama integration
β βββ models/ # Data models and schemas
β
βββ konexion_frontend/ # SvelteKit frontend application
β βββ src/
β β βββ routes/ # SvelteKit routes
β β βββ lib/ # Shared components and utilities
β β β βββ components/ # Svelte components
β β β βββ api.js # API client
β β β βββ websocket.js # WebSocket management
β β β βββ stores.js # Svelte stores
β β βββ app.html # HTML template
β βββ package.json # Node.js dependencies
β βββ vite.config.js # Vite configuration
β
βββ README.md # This file
The backend uses environment variables for configuration. See konexion_backend/example.env
for all available options:
The frontend automatically connects to the backend API. Configuration can be adjusted in:
vite.config.js
: Vite and build settingssvelte.config.js
: SvelteKit configurationtailwind.config.js
: Tailwind CSS customizationcd konexion_backend
# Activate virtual environment
source .venv/bin/activate
# Run with auto-reload
uv run main.py
# Run tests (if available)
# uv run pytest
cd konexion_frontend
# Start development server with hot-reload
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Lint and format
npm run lint
npm run format
konexion_backend/ai_models/
config.py
main.py
# Backend
cd konexion_backend
uv sync --no-dev
# Frontend
cd konexion_frontend
npm run build
make pre-commit
make pre-commit-strict
make format
make lint
Ensure all required environment variables are set in production:
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)/docs
endpointMIT License
Copyright (c) 2025 Konexion Project
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.