How 53ai/53aihub works
Project Type and Purpose
• This is a full-stack, open-source AI portal (“53AI Hub”) comprising:
• A Go-based monolithic API server (the api/ directory)
• A Vue-powered web administration console (web/console/)
• An Electron/Vite-based desktop/web front-end application (web/front/)
• Docker orchestration for local/cloud deployment (docker/ folders)
• Its purpose is to provide an operational AI portal: managing AI agents, prompts, tools, users, permissions, SSO, and integrations with LLM platforms and cloud services.
File-Structure Analysis
• Top-level “api/” directory contains subfolders:
• common/, config/, controller/, middleware/, model/, router/, service/, tasks/, and Docker/Makefiles.
• Controllers route HTTP requests → Services implement business logic → Models map to database → Common utilities handle cache, storage, email, JWT, logging, etc.
• service/hub_adaptor/ holds adapters for third-party AI platforms (OpenAI, Dify, Coze, etc.).
• tasks/ contains background/cron jobs.
• Two front-end apps under “web/”:
• web/console/: an admin portal built with Vue 3, Vite, TypeScript, Vuex/Pinia, Vue Router, and UEditor/Vditor for rich text.
• web/front/: an Electron-backed desktop client (also usable as SPA) with similar structure to console but scoped for end-user chat & agent interaction.
• Shared Docker Compose files under api/docker/ and project-level docker/ orchestrate multi-container stacks (API, DB, Redis, storage).
Key README Insights
• Emphasizes one-click deployment via Docker Compose
• Lists integrations: Coze, Dify, FastGPT, RAGFlow, 53AI Studio
• Mentions enterprise features: SSO (WeCom, DingTalk, Feishu), multi-style theming, permissions, user management
• Guides to use .env for custom config