How chaitin/pandawiki works
Project type and purpose
• PandaWiki is a full-stack, AI-driven knowledge base system.
• Purpose: let administrators build and manage “knowledge bases” (product docs, FAQs, blogs) with AI-powered content creation, Q&A, search, and import from third-party sources.
• It consists of:
• A backend in Go exposing REST/HTTP APIs, message-queue consumers, CLI tools (migrations).
• Two frontend applications:
– web/admin: React + TypeScript SPA for administrators
– web/app: Next.js-based public wiki site
• An SDK (Go) for RAG integrations.
File structure
• Top-level:
• .github, CI/CD workflows
• backend/ (Go service)
• web/admin/ (admin portal)
• web/app/ (user-facing wiki)
• sdk/ (Go client library)
• backend/ is structured along Clean Architecture:
• cmd/ – entrypoints (api server, consumer, migrate)
• config/, consts/, middleware/, log/, apm/, telemetry/
• handler/ – HTTP handlers split into versioned APIs (v1) and share endpoints for the public site
• usecase/ – business logic
• domain/ – domain models
• repo/ and store/ – persistence (Postgres, Redis, S3, ipdb, NATS)
• mq/ – message queue abstraction and NATS implementation
• migration/ – DB migration functions
• web/admin/ and web/app/ include Dockerfiles, build configs, source code, and template engines.
• CI/CD workflows build/test the backend, the admin, and the web app.
README for additional insights
• Describes:
• AI-driven features (creation, Q&A, search)
• Third-party integration (bots, web widget)
• Deployment via Docker
Final advice
• Be exhaustive: capture every data flow (HTTP calls, MQ messages, DB reads/writes).
• Call out important configuration (Docker, migrations) in side-notes or as artifacts.