Technical Stack Layers

Technical Stack

The Lancy tech stack is built on a foundation of open-source technologies.

Upstream Foundation

SME-KT-ZH Collaboration RAG — Swiss Data Science Center (SDSC), ETH Zürich / EPFL

The upstream project this fork is built on. Contributed the conversational toolkit, RAG pipeline, main frontend chat UI, workshop notebooks and structured evidence output design. Originated for the SME AI Innovation Program from Kanton Zürich.

Vonlanthen INSIGHT — Production Extensions

Extended the foundation with a full production-ready stack. Added numerous production-critical features, including the RAG configuration sidepanel for parameter tuning and admin settings.

Backend

  • FastAPI: async Python web framework powering the API layer.
  • Ollama: local LLM inference server. Primary backend for chat and embedding models.
  • ChromaDB: embedded vector database used as the default vector store per KB.
  • pgvector: PostgreSQL extension for vector similarity search; optional per-KB backend.
  • Sentence Transformers: HuggingFace library for local embedding model inference.
  • Docling: IBM document understanding library for parsing complex formats.
  • rank_bm25: BM25 lexical retrieval combined with semantic search via RRF.
  • LiteLLM: optional LLM backend proxy supporting 100+ providers.
  • OpenAI Python SDK: used for OpenAI and OpenAI-compatible endpoints.
  • ldap3: LDAP / Active Directory authentication library; handles directory bind, group membership checks, and user identity resolution for Mode 3 SSO.

Frontend

  • Next.js: React framework for the web UI; handles routing and server-side API proxying.
  • Tailwind CSS: utility-first CSS framework for rapid styling.
  • Radix UI: unstyled, accessible UI primitives.
  • i18next / react-i18next: internationalization framework supporting DE, EN, FR, and IT.
  • react-markdown: renders LLM responses with math (KaTeX) and syntax highlighting.
  • Recharts: charting library for KB analytics and retrieval statistics.
  • TanStack Table: headless table library for the chunk browser and admin views.
  • oidc-client-ts: browser-side OIDC/PKCE protocol handler for SSO login; manages code challenge, state, and the token exchange with the identity provider.
  • jose: server-side JWT validation and JWKS fetching; verifies OIDC ID tokens against the identity provider's published public keys.