The DeepWiki project is structured around a client-server architecture, with a Next.js/React frontend interacting with a FastAPI backend. The frontend provides the user interface for managing projects, viewing generated wikis, and engaging in chat. The backend serves as the central hub, handling API requests, orchestrating data processing, and integrating with various AI services for content generation and retrieval. Configuration is managed centrally, ensuring consistent settings across the application. Data ingestion involves cloning repositories, processing documents, and generating embeddings, which are then stored and retrieved by the wiki persistence layer. The AI Core Services component leverages multiple LLM providers for RAG and conversational AI, providing intelligent responses to user queries.
Components
Frontend Application
The user-facing web interface, built with Next.js and React, enabling users to view processed wikis, manage projects, and interact via chat. It handles user input and displays generated content.
Referenced Source Code
Backend API Server
The core FastAPI backend, exposing RESTful endpoints for project management, wiki export, and configuration, alongside WebSocket endpoints for real-time chat. It acts as the central orchestrator for backend operations.
Referenced Source Code
Configuration Management
Manages the loading and resolution of application, LLM provider, embedder, repository, and language configurations from JSON files and environment variables, ensuring consistent settings across the system.
Referenced Source Code
Data Ingestion & Processing
Orchestrates the entire data ingestion and processing workflow, including cloning repositories, parsing and chunking documents, and generating vector embeddings for semantic search.
Referenced Source Code
AI Core Services
Provides a standardized, pluggable interface for interacting with various Large Language Models and orchestrates the Retrieval Augmented Generation (RAG) process, managing conversational memory, and synthesizing context-aware responses.
Referenced Source Code
Wiki Persistence & Retrieval
Manages the persistence, indexing, and retrieval of the generated wiki content, project metadata, and vector embeddings, implicitly handling interactions with the underlying vector database and other storage mechanisms.