Skip to content

Commit a9671f7

Browse files
committed
fix: docs
1 parent 95b7aa8 commit a9671f7

14 files changed

Lines changed: 784 additions & 228 deletions

File tree

README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,19 @@ GENERATION (streaming)
164164

165165
### Recommended models
166166

167-
The default (`OLLAMA_LLM_MODEL=tinyllama`) keeps the stack runnable on a laptop
168-
but **does not reliably tool-call** — the agent will often answer without ever
169-
querying the knowledge base. For a useful experience switch to a model that
170-
supports tool calling:
167+
The default (`OLLAMA_LLM_MODEL=llama3.1:8b`) supports tool calling reliably —
168+
the agent will search the knowledge base when relevant and cite sources. If you
169+
need a lighter alternative:
171170

172171
```bash
173172
# In .env
174-
OLLAMA_LLM_MODEL=qwen2.5:7b-instruct # or llama3.1:8b
173+
OLLAMA_LLM_MODEL=llama3.1:8b # default — good balance, 8 GB VRAM
174+
# OLLAMA_LLM_MODEL=qwen2.5:7b-instruct # fast alternative
175175
```
176176

177+
Smaller models such as `tinyllama` do **not** support tool calling and will
178+
ignore the knowledge base entirely.
179+
177180
Embeddings (`nomic-embed-text`, 768 dims) work well as-is.
178181

179182
### Admin endpoints
@@ -353,11 +356,13 @@ POST /api/search/inspect # embedding debug + latency info
353356
### Admin (signed-in session or `ADMIN_API_KEY`)
354357

355358
```http
356-
GET /api/admin/stats # document/chunk/query counts
357-
GET /api/admin/usage # recent query log + latency stats
358-
GET /api/admin/users # list users, manage roles
359-
GET /api/admin/settings # read runtime settings (by category)
360-
POST /api/admin/settings # update a runtime setting
359+
GET /api/admin/metrics # Prometheus text exposition (request counters, latency)
360+
GET /api/admin/stats # document/chunk/query counts
361+
GET /api/admin/usage # recent query log + latency stats
362+
GET /api/admin/users # list users, manage roles
363+
PATCH /api/admin/users/:id # promote / demote a user (body: { role })
364+
GET /api/admin/settings # read runtime settings (by category)
365+
POST /api/admin/settings # update a runtime setting
361366
```
362367

363368
---

docs/.vitepress/cache/deps/_metadata.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
{
2-
"hash": "5ba4582b",
3-
"configHash": "b2b32ec5",
4-
"lockfileHash": "133d1cae",
5-
"browserHash": "fe05ea88",
2+
"hash": "cd8881db",
3+
"configHash": "93945333",
4+
"lockfileHash": "dbaa5d63",
5+
"browserHash": "ef8571f7",
66
"optimized": {
77
"vue": {
88
"src": "../../../../node_modules/.pnpm/vue@3.5.33_typescript@5.9.3/node_modules/vue/dist/vue.runtime.esm-bundler.js",
99
"file": "vue.js",
10-
"fileHash": "5fe72a48",
10+
"fileHash": "4899add0",
1111
"needsInterop": false
1212
},
1313
"vitepress > @vue/devtools-api": {
1414
"src": "../../../../node_modules/.pnpm/@vue+devtools-api@7.7.9/node_modules/@vue/devtools-api/dist/index.js",
1515
"file": "vitepress___@vue_devtools-api.js",
16-
"fileHash": "75358d72",
16+
"fileHash": "5daca717",
1717
"needsInterop": false
1818
},
1919
"vitepress > @vueuse/core": {
2020
"src": "../../../../node_modules/.pnpm/@vueuse+core@12.8.2_typescript@5.9.3/node_modules/@vueuse/core/index.mjs",
2121
"file": "vitepress___@vueuse_core.js",
22-
"fileHash": "114253f2",
22+
"fileHash": "c522d060",
2323
"needsInterop": false
2424
},
2525
"vitepress > @vueuse/integrations/useFocusTrap": {
2626
"src": "../../../../node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0_fuse.js@7.3.0_typescript@5.9.3/node_modules/@vueuse/integrations/useFocusTrap.mjs",
2727
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
28-
"fileHash": "2d26b4a6",
28+
"fileHash": "132c9eac",
2929
"needsInterop": false
3030
},
3131
"vitepress > mark.js/src/vanilla.js": {
3232
"src": "../../../../node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/vanilla.js",
3333
"file": "vitepress___mark__js_src_vanilla__js.js",
34-
"fileHash": "ff282234",
34+
"fileHash": "78413619",
3535
"needsInterop": false
3636
},
3737
"vitepress > minisearch": {
3838
"src": "../../../../node_modules/.pnpm/minisearch@7.2.0/node_modules/minisearch/dist/es/index.js",
3939
"file": "vitepress___minisearch.js",
40-
"fileHash": "5a2b01a5",
40+
"fileHash": "6c611c6a",
4141
"needsInterop": false
4242
},
4343
"gsap": {
4444
"src": "../../../../node_modules/.pnpm/gsap@3.15.0/node_modules/gsap/index.js",
4545
"file": "gsap.js",
46-
"fileHash": "917c9adf",
46+
"fileHash": "13a6312c",
4747
"needsInterop": false
4848
},
4949
"gsap/ScrollTrigger": {
5050
"src": "../../../../node_modules/.pnpm/gsap@3.15.0/node_modules/gsap/ScrollTrigger.js",
5151
"file": "gsap_ScrollTrigger.js",
52-
"fileHash": "fdd6a44b",
52+
"fileHash": "7ec922dc",
5353
"needsInterop": false
5454
}
5555
},

docs/.vitepress/config.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const enNav = [
2525
]
2626

2727
const esNav = [
28-
{ text: 'Guía', link: '/guide/getting-started' },
28+
{ text: 'Guía', link: '/es/guide/getting-started' },
2929
{ text: 'Features', link: '/features/rag-pipeline' },
3030
{ text: 'API', link: '/api/reference' },
3131
{ text: 'Arquitectura', link: '/architecture' },
@@ -42,6 +42,7 @@ const enSidebar = [
4242
{ text: 'Docker (development)', link: '/guide/docker' },
4343
{ text: 'Production Deployment', link: '/guide/production' },
4444
{ text: 'Environment Variables', link: '/guide/env' },
45+
{ text: 'Glossary', link: '/guide/glossary' },
4546
],
4647
},
4748
{
@@ -60,7 +61,6 @@ const enSidebar = [
6061
{ text: 'RAG Pipeline', link: '/features/rag-pipeline' },
6162
{ text: 'Hybrid Search & HyDE', link: '/features/search' },
6263
{ text: 'Memory & Commands', link: '/features/memory' },
63-
{ text: 'Learning Quest (legacy)', link: '/features/learning-quest' },
6464
],
6565
},
6666
{
@@ -78,6 +78,7 @@ const enSidebar = [
7878
items: [
7979
{ text: 'ADR: Monorepo unification', link: '/decisions/monorepo-unification' },
8080
{ text: 'RFC: Auth phases (2026)', link: '/rfcs/2026-auth-phases' },
81+
{ text: 'Learning Quest (legacy)', link: '/features/learning-quest' },
8182
],
8283
},
8384
]
@@ -86,16 +87,17 @@ const esSidebar = [
8687
{
8788
text: 'Guía',
8889
items: [
89-
{ text: 'Primeros pasos', link: '/guide/getting-started' },
90-
{ text: 'Docker (desarrollo)', link: '/guide/docker' },
91-
{ text: 'Despliegue en producción', link: '/guide/production' },
92-
{ text: 'Variables de entorno', link: '/guide/env' },
90+
{ text: 'Primeros pasos', link: '/es/guide/getting-started' },
91+
{ text: 'Docker (desarrollo)', link: '/es/guide/docker' },
92+
{ text: 'Despliegue en producción', link: '/es/guide/production' },
93+
{ text: 'Variables de entorno', link: '/es/guide/env' },
94+
{ text: 'Glosario', link: '/guide/glossary' },
9395
],
9496
},
9597
{
9698
text: 'Usuarios y acceso',
9799
items: [
98-
{ text: 'Autenticación', link: '/guide/auth' },
100+
{ text: 'Autenticación', link: '/es/guide/auth' },
99101
{ text: 'Workspaces', link: '/guide/workspaces' },
100102
{ text: 'Roles y permisos', link: '/guide/roles-and-permissions' },
101103
{ text: 'Settings', link: '/guide/settings' },
@@ -108,7 +110,6 @@ const esSidebar = [
108110
{ text: 'Pipeline RAG', link: '/features/rag-pipeline' },
109111
{ text: 'Búsqueda híbrida y HyDE', link: '/features/search' },
110112
{ text: 'Memoria y comandos', link: '/features/memory' },
111-
{ text: 'Learning Quest (legacy)', link: '/features/learning-quest' },
112113
],
113114
},
114115
{
@@ -126,6 +127,7 @@ const esSidebar = [
126127
items: [
127128
{ text: 'ADR: Unificación de monorepo', link: '/decisions/monorepo-unification' },
128129
{ text: 'RFC: Fases de auth (2026)', link: '/rfcs/2026-auth-phases' },
130+
{ text: 'Learning Quest (legacy)', link: '/features/learning-quest' },
129131
],
130132
},
131133
]

docs/DOCKER.md

Lines changed: 2 additions & 190 deletions
Original file line numberDiff line numberDiff line change
@@ -1,193 +1,5 @@
11
# Docker Deployment Guide
22

3-
> **See also:** the shorter [Docker (development)](/guide/docker) guide in the sidebar covers the essentials. This page is the expanded reference with all environment variables, troubleshooting, and production notes.
3+
This page has been consolidated into the main [Docker guide](/guide/docker), which now includes all environment variables, troubleshooting, and production notes.
44

5-
## Architecture
6-
7-
```
8-
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
9-
│ Nuxt 3 App │────▶│ PostgreSQL 16 │ │ Ollama │
10-
│ (app, :3000) │ │ + pgvector │ │ (optional, │
11-
│ UI + API │ │ (postgres,:5432)│ │ :11434) │
12-
└─────────────────┘ └──────────────────┘ └─────────────────┘
13-
```
14-
15-
Everything in one container — no separate frontend/backend split.
16-
17-
---
18-
19-
## Quick Start
20-
21-
### 1. Configure
22-
23-
```bash
24-
cp .env.example .env
25-
# Edit .env — set GOOGLE_API_KEY (recommended) or OPENAI_API_KEY at minimum
26-
# For Ollama Cloud: set OLLAMA_API_KEY + OLLAMA_URL (local Ollama needs no key)
27-
# Optional: uncomment COMPOSE_PROFILES=full in .env so `docker compose up -d --build`
28-
# starts app + postgres + ollama without passing --profile each time.
29-
```
30-
31-
### 2. Start
32-
33-
```bash
34-
# App + database + local Ollama
35-
docker compose --profile full up -d --build
36-
37-
# App + database only (omit Ollama; use cloud Ollama/Google/OpenAI)
38-
docker compose --profile full up -d --build app postgres
39-
```
40-
41-
### 3. Access
42-
43-
| Service | URL |
44-
|---|---|
45-
| App (UI + API) | http://localhost:3000 |
46-
| PostgreSQL | localhost:5432 |
47-
| Ollama (if running) | http://localhost:11434 |
48-
49-
---
50-
51-
## Profiles
52-
53-
| Profile | Services started |
54-
|---|---|
55-
| `full` | postgres + ollama + app |
56-
| `api` | postgres + ollama (no app) |
57-
| `all` | same as `full` |
58-
59-
```bash
60-
docker compose --profile full up -d --build
61-
docker compose --profile full down
62-
docker compose --profile full down -v # ⚠️ deletes volumes
63-
```
64-
65-
---
66-
67-
## Environment Variables
68-
69-
For the full variable reference including all provider options, see [Environment variables guide](./guide/env.md).
70-
71-
### Minimum required
72-
73-
| Variable | Default | Description |
74-
|---|---|---|
75-
| `PORT` | 3000 | App port |
76-
| `DATABASE_URL` || Full Postgres connection string (pgvector or Supabase) |
77-
78-
### PostgreSQL container (docker-compose only)
79-
80-
| Variable | Default | Description |
81-
|---|---|---|
82-
| `POSTGRES_USER` | rag | DB user |
83-
| `POSTGRES_PASSWORD` | rag_password | DB password |
84-
| `POSTGRES_DB` | rag_db | DB name |
85-
| `POSTGRES_PORT` | 5432 | Postgres port |
86-
87-
### Provider selection
88-
89-
| Variable | Default | Description |
90-
|---|---|---|
91-
| `EMBEDDING_PROVIDER` | auto-detect | `gemini` / `openai` / `voyage` / `ollama-local` |
92-
| `LLM_PROVIDER` | auto-detect | `anthropic` / `openai` / `mistral` / `ollama-cloud` / `ollama-local` |
93-
94-
### AI providers (set at least one pair)
95-
96-
| Variable | Default | Description |
97-
|---|---|---|
98-
| `GOOGLE_API_KEY` || Gemini embedding |
99-
| `OPENAI_API_KEY` || OpenAI embedding or chat |
100-
| `OPENAI_LLM_MODEL` | gpt-4.1-mini | OpenAI chat model |
101-
| `VOYAGE_API_KEY` || Voyage AI embedding |
102-
| `ANTHROPIC_API_KEY` || Anthropic chat (Claude) |
103-
| `ANTHROPIC_MODEL` | claude-sonnet-4-6 | Anthropic model |
104-
| `MISTRAL_API_KEY` || Mistral chat |
105-
| `MISTRAL_MODEL` | mistral-medium-latest | Mistral model |
106-
| `OLLAMA_URL` | http://ollama:11434 | Ollama endpoint (embedding + chat) |
107-
| `OLLAMA_API_KEY` || Ollama Cloud auth |
108-
| `OLLAMA_MODEL` | nomic-embed-text | Ollama embedding model |
109-
| `OLLAMA_LLM_MODEL` | llama3.1:8b | Ollama chat model (use a tool-calling model; `tinyllama` will skip KB search) |
110-
| `OLLAMA_CHAT_TIMEOUT_MS` | 180000 | LLM response timeout ms |
111-
| `OLLAMA_PLANNER_TIMEOUT_MS` | 60000 | Planner timeout ms |
112-
| `EMBEDDING_DIMENSIONS` | 768 | Must match pgvector column |
113-
114-
### Application
115-
116-
| Variable | Default | Description |
117-
|---|---|---|
118-
| `MEMORY_SCOPE` | local_per_user | `local_per_user` / `global` / `disabled` |
119-
| `MEMORY_PROACTIVE` | true | Auto-save user facts |
120-
121-
---
122-
123-
## Useful Commands
124-
125-
```bash
126-
# Logs
127-
docker compose logs -f app
128-
docker compose logs -f postgres
129-
docker compose logs -f ollama
130-
131-
# Shell access
132-
docker compose exec app sh
133-
docker compose exec postgres psql -U rag -d rag_db
134-
135-
# Rebuild after code changes
136-
docker compose --profile full up -d --build
137-
138-
# Pull latest Ollama model manually
139-
docker compose exec ollama ollama pull nomic-embed-text
140-
```
141-
142-
---
143-
144-
## Data Volumes
145-
146-
| Volume | Contents |
147-
|---|---|
148-
| `postgres_data` | PostgreSQL data files |
149-
| `ollama_data` | Downloaded Ollama models |
150-
151-
---
152-
153-
## First Run
154-
155-
On first start, the Ollama container downloads the configured models — this can take a few minutes. Watch progress with:
156-
157-
```bash
158-
docker compose logs -f ollama
159-
```
160-
161-
---
162-
163-
## Troubleshooting
164-
165-
**App can't reach database:**
166-
```bash
167-
docker compose exec postgres pg_isready -U rag
168-
docker compose logs postgres
169-
```
170-
171-
**Port already in use:**
172-
Change `PORT` or `POSTGRES_PORT` in `.env`.
173-
174-
**Rebuild from scratch:**
175-
```bash
176-
docker compose --profile full down -v
177-
docker system prune -a
178-
docker compose --profile full up -d --build
179-
```
180-
181-
---
182-
183-
## Production Notes
184-
185-
- Change all default passwords in `.env` before deploying
186-
- Use a managed PostgreSQL service (Railway, Supabase, Neon) instead of the Docker container in production
187-
- The app runs `prisma migrate deploy` automatically on startup via `docker-entrypoint.sh`
188-
- Add a reverse proxy (nginx, Caddy) in front for HTTPS
189-
190-
**Backup database:**
191-
```bash
192-
docker compose exec postgres pg_dump -U rag rag_db > backup_$(date +%Y%m%d).sql
193-
```
5+
Go to **[Docker guide →](/guide/docker)**

0 commit comments

Comments
 (0)