This template should help get you started developing with Vue 3 in Vite.
VS Code + Vue (Official) (and disable Vetur).
- Chromium-based browsers (Chrome, Edge, Brave, etc.):
- Firefox:
TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need Volar to make the TypeScript language service aware of .vue types.
See Vite Configuration Reference.
npm installnpm run devnpm run buildThis project includes an isolated AI navigation-search stack described in goal.md and tz.md.
Main files:
ai-navigation-service/ # standalone HTTP API for navigation search
docker-compose.ai.yml # AI service + llama.cpp embedding server
docker-compose.ai.mock.yml # AI service only, mock embeddings for local API tests
qemu/ # portable QEMU VM scripts and docs
models/ # local GGUF model folder, ignored by git
Required model for the real embedding stack:
models/qwen3-embedding-4b-q5_k_m.gguf
Run local API mock mode without Docker/llama.cpp:
cd ai-navigation-service
npm install
npm run build
$env:EMBEDDING_MOCK="true"; npm startTest:
curl http://localhost:3001/health
curl -X POST http://localhost:3001/api/navigation-search -H "Content-Type: application/json" -d '{"query":"войти","locale":"ru"}'Run real AI stack inside the QEMU Linux VM after Docker and the model are available:
docker compose -f docker-compose.ai.yml up --buildSee qemu/README.md for VM startup, SSH, Docker installation, model placement, and limitations.
The frontend now calls the AI API through same-origin /api by default:
fetch('/api/navigation-search')
Local Vite development proxies /api to:
AI_NAVIGATION_UPSTREAM=http://localhost:3001Production should proxy the LMS domain to the AI VM/Vast service, for example:
https://lms.example.com/api/navigation-search
-> http://AI_VM_OR_VAST_IP:3001/api/navigation-search
See deploy/nginx/mospoli-lms-ai-proxy.conf.
Deployment automation is provided for two targets:
deploy/vast/ # Vast.ai single-container deployment
deploy/vm/ # normal Ubuntu VM/VPS with Docker Compose
Vast.ai recommended mode is one Vast container with two processes inside:
llama.cpp :8080
ai-navigation-service :3001
Generic VM mode uses the existing two-container compose:
ai-navigation-service
llama-embedding-server
Both modes produce or imply the same upstream value for the LMS server proxy:
AI_NAVIGATION_UPSTREAM=http://AI_HOST:3001
VITE_AI_NAVIGATION_URL=The browser should keep using same-origin /api/navigation-search.