Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
16892d6
refactor(app): unify RAG app into single Nuxt project and rood Docker…
albegosu May 2, 2026
8f90b0b
Merge pull request #23 from albegosu/feat/unify-nuxt
albegosu May 2, 2026
f41667d
refactor(sdk): add ai sdk and workflows sdk with deep changes
albegosu May 3, 2026
c1d2c17
Merge pull request #24 from albegosu/feat/ai-sdk-vercel
albegosu May 3, 2026
bce2fb4
docs(guides): update guides
albegosu May 3, 2026
3d639f6
fix(wizards): sync rag and wizards envs
albegosu May 3, 2026
94f5f1c
Enhance README with banner and badges
albegosu May 3, 2026
e83ba92
Fix banner image link in README.md
albegosu May 3, 2026
603652d
feat(pages): deploy guides in github pages
albegosu May 3, 2026
857fe54
fix(pages-workflow): define job build
albegosu May 3, 2026
257bb18
fix(pages-workflow): define job build
albegosu May 3, 2026
bd7f143
fix(pages-workflow): define job build
albegosu May 3, 2026
e5d5349
feat(runtime-envs): wire steps 3-6 to runtime + DB-backed settings UI
albegosu May 5, 2026
f383def
feat(runtime): add settings to modify parameters in runtime
albegosu May 5, 2026
7c65a0e
Merge pull request #28 from albegosu/feat/runtime-envs
albegosu May 8, 2026
2eef977
docs(landing): rebuild home with three pillars and roadmap track
albegosu May 8, 2026
0862f20
docs(landing): paraboloid animation
albegosu May 9, 2026
114d2d5
Merge pull request #29 from albegosu/docs/landing-and-roadmap
albegosu May 9, 2026
89d6aba
Update attribution in README to reflect new source
albegosu May 9, 2026
d5865e5
fix(docs): hero canvas and ScrollTrigger on mobile
albegosu May 9, 2026
e2dbdc8
Merge pull request #30 from albegosu/fix/vitepress-mobile-animations
albegosu May 9, 2026
30c5dfa
chore(workflows): remove and fix workflows
albegosu May 9, 2026
f49f07e
Merge pull request #31 from albegosu/chore/fix-workflows
albegosu May 9, 2026
93ad6c2
styles(micro): add micrographics
albegosu May 9, 2026
72f5aa2
styles(micro): fix micrographics in mobile
albegosu May 9, 2026
2e2f8e4
Merge pull request #32 from albegosu/styles/micrographics
albegosu May 9, 2026
a6ebcf7
styles(hero): fix breakpoints
albegosu May 10, 2026
2a204a6
Merge pull request #33 from albegosu/style/fix-landing-styles
albegosu May 10, 2026
50de973
feat(login): add login
albegosu May 12, 2026
0b21dfb
Merge pull request #34 from albegosu/feat/auth
albegosu May 12, 2026
3050398
chore: baseline post-VitePress refactor + gitignore hygiene
albegosu May 12, 2026
0f50b3b
chore: remove unused files and gsap dependency
albegosu May 12, 2026
582f860
chore(i18n): drop orphan home.* namespace from locales
albegosu May 12, 2026
6148d2d
fix(agent): preserve base system prompt in all modes + expose AGENT_M…
albegosu May 12, 2026
e990979
fix(ui): align pipeline trace candidate count with actual fetchLimit
albegosu May 12, 2026
714ceea
fix(chat): split KB pill into 'searched' and 'cited'
albegosu May 12, 2026
94f85f2
fix(chat): defer user message persistence until stream is alive
albegosu May 12, 2026
94c0f6f
fix(embedding): invalidate cache on (re)ingest
albegosu May 12, 2026
71364fd
feat(chat): surface active search mode in header
albegosu May 12, 2026
29cf813
docs(readme): post-refactor cleanup + 'What is RAG?' + glossary
albegosu May 12, 2026
14b0cd9
docs: archive 2 agents-plans into docs/, drop 3 ephemeral notes
albegosu May 12, 2026
d785513
chore: fix 3 pre-existing typecheck errors
albegosu May 12, 2026
e2ab01e
fix(UI): save settings
albegosu May 12, 2026
d458d7e
docs: updated docs
albegosu May 12, 2026
1ed887a
fix
albegosu May 12, 2026
f672088
feat: add workspaces
albegosu May 13, 2026
a06e08d
fix: enotfound ollama models
albegosu May 13, 2026
702c2ec
Harden production: security, CI, metrics, eval harness
albegosu May 18, 2026
6c2b08c
feat: brand identity refresh and Ollama Cloud host fix
albegosu May 18, 2026
39d20af
fix(chat): sanitize UI messages before model conversion
albegosu May 18, 2026
60fbac0
feat: add husky to the project
albegosu May 18, 2026
afb8a6d
fix: fix quota error
albegosu May 18, 2026
da3556f
chore(deps-dev): bump globals from 16.5.0 to 17.6.0
dependabot[bot] May 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
112 changes: 112 additions & 0 deletions .cursor/debug-de37c6.log

Large diffs are not rendered by default.

64 changes: 25 additions & 39 deletions .env.docker
Original file line number Diff line number Diff line change
@@ -1,73 +1,59 @@
# =============================================================================
# Docker Compose environment template (copy to ".env" in the repo root)
# Compose loads ".env" from the same directory as docker-compose.yml
# from-zero-rag Docker template
# Copy to ".env" in the repo root before running docker compose up
# =============================================================================

# Default profile for local full stack (app + postgres + ollama). Lets you run
# `docker compose up -d --build` without repeating `--profile full` each time.
COMPOSE_PROFILES=full

PORT=3000

# -----------------------------------------------------------------------------
# PostgreSQL (rag-postgres container)
# PostgreSQL
# -----------------------------------------------------------------------------
POSTGRES_USER=rag
POSTGRES_PASSWORD=rag_password
POSTGRES_DB=rag_db
POSTGRES_PORT=5432
DATABASE_URL=postgresql://rag:rag_password@postgres:5432/rag_db

# -----------------------------------------------------------------------------
# Ollama — URL and credentials used by the BACKEND (embeddings + chat + agent)
# Ollama — embeddings + chat + agent
# -----------------------------------------------------------------------------

# --- LOCAL MODEL (Ollama container) ---
# Tip: leave OLLAMA_API_KEY empty if your local Ollama has no auth.
# OLLAMA_URL=http://ollama:11434
# OLLAMA_API_KEY=your_key_from_ollama
# OLLAMA_PORT=11434
# OLLAMA_API_KEY=
# OLLAMA_MODEL=nomic-embed-text
# OLLAMA_LLM_MODEL=tinyllama

# --- CLOUD MODE (Ollama Cloud) ---
# Set OLLAMA_API_KEY to your Ollama Cloud API key.
# --- CLOUD MODE ---
OLLAMA_URL=https://ollama.com
OLLAMA_API_KEY=your_key_from_https://ollama.com/settings/keys
OLLAMA_LLM_MODEL=gpt-oss:120b
# OLLAMA_MODEL=nomic-embed-text # only if that host exposes this embedding model

# Backend timeouts for Ollama calls (ms)
OLLAMA_CHAT_TIMEOUT_MS=180000
OLLAMA_PLANNER_TIMEOUT_MS=60000

# -----------------------------------------------------------------------------
# Chat memory (local dev)
# -----------------------------------------------------------------------------
# local_per_user | global | disabled
MEMORY_SCOPE=local_per_user

# When enabled, the agent stores user preferences/facts in local chat memory (no /remember).
MEMORY_PROACTIVE=true

# Embedding dimensions. Must match the pgvector column type (currently vector(768)).
# nomic-embed-text and OpenAI text-embedding-3-small both default to 768.
# If you change this, write a migration that ALTERs "Chunk".embedding accordingly.
EMBEDDING_DIMENSIONS=768

# Embedding provider (priority: Google > OpenAI > Ollama)
# -----------------------------------------------------------------------------
# Backend API (Nest)
# -----------------------------------------------------------------------------
BACKEND_PORT=3001

# Embeddings provider (priority: Google > OpenAI > Ollama)
# Get your free Google API key at: https://aistudio.google.com/app/apikey
# Google Gemini offers 10M tokens/min free tier - perfect for most projects
# https://aistudio.google.com/app/apikey (10M tokens/min free tier)
GOOGLE_API_KEY=

# When Google is empty and OPENAI_API_KEY is set, embeddings use OpenAI (otherwise Google takes precedence).
OPENAI_API_KEY=

# -----------------------------------------------------------------------------
# Frontend (Nuxt)
# -----------------------------------------------------------------------------
FRONTEND_PORT=3000
# Must match the pgvector column (vector(768)). Change requires a migration.
EMBEDDING_DIMENSIONS=768

# -----------------------------------------------------------------------------
# Note: running the API outside Docker (e.g. npm run start:dev in rag-api)
# Chat memory
# -----------------------------------------------------------------------------
# OLLAMA_URL=http://127.0.0.1:11434
# Same cloud pattern: OLLAMA_URL=https://ollama.com + OLLAMA_API_KEY (no /v1 - native API is /api/...)
# local_per_user | global | disabled
MEMORY_SCOPE=local_per_user
MEMORY_PROACTIVE=true

# ─── Public URLs (Nuxt app) ────────────────────────────────────────────────────
# Header link to the published docs / marketing site (GitHub Pages, etc.).
NUXT_PUBLIC_DOCS_SITE_URL=https://albegosu.github.io/from-zero-rag/
109 changes: 109 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# ─── Provider selection ────────────────────────────────────────────────────────
# Explicit provider selection. If omitted, the runtime auto-detects based on
# which API keys are present (see fallback order in docs/guide/env.md).
# EMBEDDING_PROVIDER=gemini # gemini | openai | voyage | ollama-local
# LLM_PROVIDER=anthropic # anthropic | openai | mistral | ollama-cloud | ollama-local

# ─── Google Gemini (embedding) ─────────────────────────────────────────────────
GOOGLE_API_KEY=

# ─── OpenAI (embedding and/or chat) ────────────────────────────────────────────
OPENAI_API_KEY=
# OPENAI_LLM_MODEL=gpt-4.1-mini

# ─── Voyage AI (embedding) ─────────────────────────────────────────────────────
VOYAGE_API_KEY=

# ─── Anthropic (chat) ──────────────────────────────────────────────────────────
ANTHROPIC_API_KEY=
# ANTHROPIC_MODEL=claude-sonnet-4-6

# ─── Mistral (chat) ────────────────────────────────────────────────────────────
MISTRAL_API_KEY=
# MISTRAL_MODEL=mistral-medium-latest

# ─── Ollama (local or cloud — embedding + chat) ────────────────────────────────
OLLAMA_URL=http://ollama:11434
OLLAMA_API_KEY=

# Embedding model — nomic-embed-text produces 768-dimensional vectors
OLLAMA_MODEL=nomic-embed-text

# LLM for chat — IMPORTANT: tinyllama does NOT support tool calling.
# Use llama3.1:8b or qwen2.5:7b-instruct for reliable RAG.
OLLAMA_LLM_MODEL=llama3.1:8b

OLLAMA_CHAT_TIMEOUT_MS=180000
OLLAMA_PLANNER_TIMEOUT_MS=60000

# ─── Embedding shared ──────────────────────────────────────────────────────────
# EMBEDDING_MODEL= # override model for the active provider
EMBEDDING_DIMENSIONS=768 # must match the pgvector column

# ─── Database ──────────────────────────────────────────────────────────────────
# Self-hosted pgvector (docker-compose sets this automatically):
# DATABASE_URL=postgresql://rag:rag_password@localhost:5432/rag_db

# Supabase Vector — direct connection:
# DATABASE_URL=postgresql://postgres:<password>@db.<project-ref>.supabase.co:5432/postgres

# Supabase Vector — transaction pooler (recommended for serverless):
# DATABASE_URL=postgresql://postgres.<project-ref>:<password>@aws-0-<region>.pooler.supabase.com:6543/postgres

# ─── PostgreSQL container (docker-compose only) ────────────────────────────────
POSTGRES_USER=rag
POSTGRES_PASSWORD=CHANGE_ME_STRONG_PASSWORD
POSTGRES_DB=rag_db

# ─── Memory ────────────────────────────────────────────────────────────────────
# local_per_user: each user only sees their own memories
# disabled: chat memories excluded from search
MEMORY_SCOPE=local_per_user
MEMORY_PROACTIVE=true

# ─── Admin API ─────────────────────────────────────────────────────────────────
# Optional bearer for scripts/CI without a browser session. Any signed-in user may call /api/admin/*.
# openssl rand -hex 32
ADMIN_API_KEY=CHANGE_ME_RANDOM_SECRET

# ─── Auth (better-auth) ────────────────────────────────────────────────────────
# Required. Generate with: openssl rand -hex 32 (use the same value for both lines, or only BETTER_AUTH_SECRET).
BETTER_AUTH_SECRET=CHANGE_ME_RANDOM_SECRET
AUTH_SECRET=CHANGE_ME_RANDOM_SECRET

# Public URL of the app (used for OAuth callbacks; in Docker use http://localhost:PORT if that is how you open the app)
BETTER_AUTH_URL=http://localhost:3000

# Google OAuth — create at https://console.cloud.google.com/
# Authorized redirect URI: $BETTER_AUTH_URL/api/auth/callback/google
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

# GitHub OAuth — create at https://github.com/settings/developers
# Authorized callback URL: $BETTER_AUTH_URL/api/auth/callback/github
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

# ─── pgAdmin (docker-compose dev only) ────────────────────────────────────────
PGADMIN_DEFAULT_EMAIL=admin@example.com
PGADMIN_DEFAULT_PASSWORD=CHANGE_ME_PGADMIN_PASSWORD

# ─── Docker Compose (optional) ─────────────────────────────────────────────────
# Uncomment so `docker compose up -d --build` uses this profile without --profile
# COMPOSE_PROFILES=full

# ─── Local dev: pnpm dev with Postgres from `docker compose --profile api up` ──
# OLLAMA_URL=http://localhost:11434
# WORKFLOW_LOCAL_DATA_DIR=./data/workflow

# ─── Public URLs (Nuxt app) ────────────────────────────────────────────────────
# Header link to the published docs / marketing site (GitHub Pages, etc.).
# NUXT_PUBLIC_DOCS_SITE_URL=https://albegosu.github.io/from-zero-rag/

# ─── Production hardening (optional) ───────────────────────────────────────────
# REDIS_URL=redis://localhost:6379 # shared rate limits across replicas
# SKIP_ENV_VALIDATION=true # only for CI/build; never in production

# ─── Production (docker-compose.prod.yml only) ─────────────────────────────────
# Domain for Caddy automatic TLS (e.g. rag.example.com)
DOMAIN=rag.example.com
Loading
Loading