BaseFlow is an advanced, interactive codebase visualization and AI-assisted software architect platform. It maps out complex code repositories as structured, interactive 2D mindmaps while integrating an autonomous AI assistant powered by Google Gemini API (using the Google ADK) to help developers inspect components, perform refactoring risk analysis, and orchestrate automated fixes.
- ๐ Multi-Language AST Codebase Parser: Traverses files recursively to construct structural models using the official
typescriptcompiler API for TypeScript/JavaScript/Vue, and regex-based parsers for Python, Java, and C#. - ๐บ๏ธ Interactive 2D Mindmaps: Renders classes, modules, inheritance (
extends), interface implementations (implements), and dependency usages in a clean, hierarchical force-directed graph layout. - ๐ค Autonomous AI Architect Agent: Integrates Google's Agent Development Kit (
@google/adk) with Gemini 3. The agent has 11 tools to inspect code, navigate the UI, highlight mindmap nodes, write files, and interact with DevOps platforms. - ๐๏ธ AI Architecture Diagrams: Auto-generates system architecture and class interaction diagrams using Mermaid.js.
- ๐ Document Q&A: Analyzes markdown documents in your repository and answers questions in context.
GitLab Duo MCP integration โ connects to the official GitLab Duo MCP endpoint at
https://gitlab.com/api/v4/mcp. See GitLab Duo MCP Integration for full setup instructions.
GitHub Copilot MCP integration โ connects to the official GitHub MCP endpoint at
https://api.githubcopilot.com/mcp/. See GitHub Copilot MCP Integration for full setup instructions.
- ๐ DevOps Health Score: Computes a real-time score (0โ100) across open issues, MRs, and pipeline success rate. The AI agent produces a full narrative report with charts and prioritized recommendations.
- ๐ค AI Issue Resolver & Auto-Create MR: Click any GitLab/GitHub issue โ the agent reads it via MCP, finds relevant codebase classes, writes a structured fix playbook, and automatically creates a Merge Request with the fix.
- ๐ ๏ธ Gemini CLI Modified Files Navigator: Renders files modified by the Gemini CLI inside assistant chat bubbles as clickable links. Clicking a file link instantly navigates to and highlights the file in the Codebase Explorer.
- ๐ฅ Interactive Code Review & Diff Viewer: Displays inline color-coded diff highlights comparing local workspace changes against Git HEAD (supporting both tracked and new untracked files) directly inside the codebase explorer view.
- ๐พ Header Source Downloader: Quick download button in the CodeViewer header panel to retrieve any text-based code file directly.
- ๐ AI MR Code Review: BaseFlow fetches the MR diff via GitLab MCP and posts inline AI review comments directly to GitLab with a single click.
- ๐ก๏ธ Codebase Security Audit: Scans your codebase structure for vulnerabilities. Risky components are instantly highlighted in RED on the interactive mindmap with warning shields.
- ๐ CI/CD Watchdog: Click any failed pipeline โ the agent fetches the job log via
gitlab_get_job_trace, cross-references it with your codebase, highlights affected classes on the mindmap, and generates root-cause analysis. - ๐ค Multi-Agent GitLab Duo AI Catalog & GitHub Copilot Integration: Formats any generated skill file as a Custom Agent system prompt and prepares it for publication to the GitLab Duo AI Catalog and GitHub Copilot.
- ๐ Real-Time Remote DevOps Metrics: Automatically fetches and caches (24h) live commit activity, stars, and forks from the GitHub/GitLab REST APIs to power the Dashboard Activity charts.
- ๐ฌ Context-Aware Document Analysis: Chat directly with AI about any Markdown document or Playbook using the integrated "Ask Agent" feature with pre-generated contextual suggestions.
- ๐ Dual MCP Integration: GitLab Duo MCP + GitHub MCP running concurrently in the same agent session.
- ๐ Modern Responsive UI: Vue 3, Vite, Element Plus โ Dark/Light mode, EN/VI localisation, SSE streaming. Optimized with
markRawfor rendering massive codebase graphs without UI freezing. - ๐ณ Docker + Cloud Run Ready: Single-container deployment to Google Cloud Run. See Cloud Run Deployment for full setup instructions.
Compute live commit metrics, total class counts, language percentages, and Git activity trends.

Traverse package directory trees visually. Auto-focus node cameras and switch between Mindmap and Neural Map layouts.

Single-click class nodes to inspect fields/methods or double-click to draw UML Entity-Relationship dialogues.

Compute DevOps health indexes, generate onboarding guides, and run codebase security audits (vulnerability warning nodes highlighted in RED).

Deconstruct imports and module interaction maps automatically into zoomable, fullscreen Mermaid flowcharts.

Read repository Markdown files, prompt agent Q&A chat drawers, and prepare skill playbooks for Copilot/Duo.

Expand folder trees in the sidebar, view source code with line-highlighting, and select text to invoke SRE chat bubble.

Slide open the Gemini assistant sidebar to optimize classes, write test suites, or ask freeform queries.

BaseFlow runs as a unified containerized service hosting both backend API services and frontend assets.
graph TD
subgraph Client [Browser - Vue 3 SPA]
G6-Graph[Neural / Mindmap]
Chat[ADK Agent Chat]
Inspector[Class Inspector]
end
subgraph Container [Docker Container - Node 20 Server]
Express[Express.js Server]
SQLite[(SQLite DB - connections.db)]
ADK[ADK Runner & Agent]
AST[AST Engine - TS Compiler]
end
subgraph External [External APIs]
Gemini[Google Gemini API]
GitLab[GitLab API & MCP]
GitHub[GitHub API & MCP]
end
Client -- HTTPS & SSE --> Express
Express -- Connection Profile --> SQLite
Express -- Parse Request --> AST
ADK -- Tool Executions --> AST
ADK -- Model Calls --> Gemini
Express -- Webhooks / MCP --> GitLab
Express -- Webhooks / MCP --> GitHub
Express -- Serve Static Assets --> Client
- Backend (backend/):
- Express: Exposes authentication, connection configurations, and repository details endpoints.
- SQLite: Manages connection configurations inside an encrypted SQLite database using
sqlite3andsqlite. - AST Engine: Gathers structural metrics and maps components to custom mindmap coordinates.
- ADK Agent: Orchestrates LLM actions using the
@google/adkpackage (with MCP toolsets for GitHub/GitLab).
- Frontend (frontend/):
- Vue 3 / Vite: Hot-reloadable single-page application framework.
- Pinia: Core state engine managing active repositories, connection profiles, and authentication states.
- Element Plus: Responsive UI library powering forms, layouts, drawers, and notifications.
- G6 Graph : Graph visualization engine. It provides basic capabilities for graph visualization and analysis such as drawing, layout, analysis, interaction
- E2E Tests (tests/):
- Automated user flows validated through headed Playwright scripts.
- Node.js (v20+ recommended)
- Git installed and available in your environment path
- Google Cloud Agent API Key (from Google Cloud Agent)
- Navigate to the backend directory:
cd backend - Install dependencies:
npm install
- Create a
.envfile inside thebackend/folder:PORT=5000 PASSWORD=admin GOOGLE_API_KEY=your_google_agent_api_key_here AGENT_MODEL=gemini-3.1-flash-lite GOOGLE_GENAI_USE_VERTEXAI=1
- Run the server in development (hot-reload) mode:
The backend will start on http://localhost:5000.
npm run dev
- Navigate to the frontend directory:
cd ../frontend - Install dependencies:
npm install
- Start the Vite dev server:
Open the browser at http://localhost:5173 to view the console.
npm run dev
E2E UI flows are managed by Playwright inside the tests/ directory.
To run the automated tests locally:
- Ensure both your frontend (port 5173) and backend (port 5000) dev servers are running.
- Navigate to the tests directory:
cd tests - Install the testing dependencies:
npm install
- Run the test suite:
npm run test
This will launch a headed Chromium instance, log in with admin, create a connection profile, perform toggle interactions, and output test reports alongside page screenshots.
BaseFlow is optimized to deploy to Google Cloud Run in a single consolidated container.
- Installed Google Cloud SDK (
gcloudCLI). - Authenticated account:
gcloud auth login
- An active GCP Project ID with Billing, Cloud Run API, and Cloud Build API enabled.
Open the deploy script matching your operating system inside the project root:
- Windows (Command Prompt): Run deploy-cloud-run.cmd
- Unix / macOS: Run deploy-cloud-run.sh
The deployment script executes a remote container build via Cloud Build utilizing the multi-stage Dockerfile and registers the service at port 5000.
Important
Once deployed, configure the Environment Variables in the Google Cloud Run panel for GOOGLE_API_KEY, PASSWORD, and AGENT_MODEL to enable the AI Architect features.
- Name: Minh Truong
- GitHub: @camtruong512
- Name: Tan Do
- GitHub: @dmtan90
This project is licensed under the MIT License - see the LICENSE file for details.
