MindsHub (formerly MindsDB)
Audited from github.com/mindsdb/mindshub
MindsHub (formerly MindsDB) is an agent workspace: an Electron and React desktop and web app backed by a Python FastAPI server on SQLite and the anton agent runtime, shipped as a superproject over four git submodules.
- Language
- Makefile
- Database
- SQLite
- Hosting
- Docker
- License
- MIT
- Running for
- 4 years
- Team
- 20+ People
Why this architecture
Splitting the client, API and agent into separately versioned git submodules lets each ship on its own cadence (a signed desktop app, a PyPI server package, an agent package), while one Makefile and one docker-compose.yml still bring the whole stack up together.
Tech stack by layer
15 technologies · audited Sep 26, 2026- ElectronDesktop shell for macOS and Windows; its main process starts cowork-server as a local sidecar and talks to it over HTTP on 127.0.0.1:26866.
- ReactThe renderer SPA, identical in the desktop app and the web build (BUILD_TARGET=web).
- ViteBuilds and serves the renderer (vite dev / vite build src/renderer).
- Tailwind CSSStyling for the renderer, through PostCSS.
- KeycloakSign-in for the app through keycloak-js and @react-keycloak/web.
- electron-builderPackages the signed macOS and Windows installers built by the release workflows.
- PythonLanguage of cowork-server (the API) and anton (the agent).
- FastAPIcowork-server: projects, conversations, files, scheduling, memory and agent orchestration.
- UvicornRuns cowork.server:app in development and inside the api container.
- uvSyncs the module virtualenvs in development, installs cowork-server as a uv tool for the desktop app, and installs core_agent and core_api in the api image.
- AnthropicModel provider SDK used by anton, alongside the OpenAI SDK.
- TyperCommand-line interface of anton, which also runs standalone in a terminal.
- Git submodulesPin frontend, core_api, core_agent and data-vault to specific commits; Makefile use, pin and baseline targets manage them.
- GitHub ActionsThe superproject runs CodeQL and docs deployment; the cowork repo builds and uploads macOS and Windows installers.
Key architectural decisions
8 decisions- 01
The repository is a thin superproject over four git submodules
The tree lists frontend, backend/core_api, backend/core_agent and backend/data-vault as submodule entries, declared in .gitmodules as the mindsdb/cowork, cowork-server, anton and data-vault repositories, and the Makefile use, pin and baseline targets manage them. Application source lives in those repositories at the pinned commits.
- 02
The desktop app runs the API as a local sidecar
The cowork README states that the Electron main process spawns cowork-server and talks to it over HTTP on 127.0.0.1:26866; packaged apps install cowork-server from PyPI as a uv tool, which the Makefile server target mirrors.
- 03
Desktop and web clients share one backend process
The Makefile dev and dev-web targets both run uv run --directory backend/core_api uvicorn cowork.server:app --reload, differing only in whether the frontend starts as an Electron app (npm run dev) or a browser build (BUILD_TARGET=web npm run dev:renderer).
- 04
The agent runtime is a separately versioned dependency
cowork-server depends on anton-agent (pyproject.toml, with a git tag source for mindsdb/anton), and the Makefile can install anton from a git reference with uv, so the agent in backend/core_agent updates independently of the API that hosts it.
- 05
Local storage defaults to SQLite, not a client-server database
cowork-server uses SQLModel with Alembic migrations, and docker-compose.yml sets DATABASE_URI to sqlite:////home/cowork/.cowork/cowork.db inside a named cowork-data volume, so the default deployment needs no separate database server.
- 06
The former MindsDB query engine is pinned but not run
backend/data-vault points at mindsdb/data-vault, which contains the mindsdb Python package, the SQL parser dependency and the handler tree of the earlier MindsDB engine. The superproject pins it, but make dev, docker/api.Dockerfile and docker-compose.yml only build frontend, core_api and core_agent.
- 07
The Docker Compose stack serves the web build through Nginx
docker/web.Dockerfile builds the SPA with npm run build:web and copies it into an nginx:alpine image whose docker/nginx.conf proxies /v1/ to api:26866; compose maps host port 3000 to it and starts it only after the api service passes its /health check.
- 08
Per-developer branch overrides are opt-in via an untracked file
The Makefile reads REF, API_REF, AGENT_REF and FRONTEND_REF from an -include dev.env line, and dev.env.example documents the pattern, so contributors can point a checkout at submodule feature branches without changing shared defaults.
How MindsHub (formerly MindsDB) is built
How MindsHub is structured
The mindsdb/mindsdb repository now redirects to mindsdb/mindshub, and the audited commit (main, 780bbcb) is a superproject rather than an application tree. .gitmodules declares four submodules: frontend (the mindsdb/cowork repository), backend/core_api (mindsdb/cowork-server), backend/core_agent (mindsdb/anton) and backend/data-vault (mindsdb/data-vault). The superproject itself holds only glue: a Makefile, docker-compose.yml, docker/api.Dockerfile, docker/web.Dockerfile and docker/nginx.conf, which is why its language statistics are Makefile and Dockerfile. This audit reads each submodule at the commit the superproject pins, so it describes exactly the combination 780bbcb ships.
Frontend
mindsdb/cowork (pinned at 4114336) is an Electron app whose renderer is a React SPA built with Vite and styled with Tailwind CSS. Its package.json shows separate TypeScript builds for the Electron main process (tsconfig.main.json) and the renderer (vite build src/renderer), plus a build:web target that produces the same SPA for browsers. Sign-in goes through Keycloak (keycloak-js, @react-keycloak/web); charts use Chart.js and responses are rendered as Markdown. According to the repository's README, the Electron main process starts cowork-server as a local sidecar and talks to it over HTTP on 127.0.0.1:26866, and both the UI and the server can update over the air. electron-builder.yml and the build-macos-pkg, build-windows-installer and release workflows produce signed installers.
Backend & APIs
mindsdb/cowork-server (pinned at cb075bd) is a FastAPI application, cowork.server:app, run by Uvicorn. Its cowork/ package splits into api, services, handlers, harnesses, models, schemas, db and channels, with a scheduler.py, and optional channels extras add Slack and Discord ingress. Its dependencies include anton-agent and NousResearch's hermes-agent, with [tool.uv.sources] pointing anton at a tagged mindsdb/anton release. The repository has a publish.yml workflow, and the cowork README says packaged desktop apps install the server from PyPI with uv tool install.
mindsdb/anton (pinned at 6b83930) is the agent runtime, packaged as anton-agent. It calls models through the Anthropic and OpenAI SDKs, exposes a Typer CLI so it can also run standalone in a terminal, and keeps its logic in modules such as anton/core, anton/memory, anton/context and anton/tools.py.
Data & persistence
cowork-server stores its data in SQLite through SQLModel, with Alembic migrations (alembic.ini, cowork/migrations.py). The superproject's docker-compose.yml sets DATABASE_URI to sqlite:////home/cowork/.cowork/cowork.db inside the named cowork-data volume, and defines no database service. When the Electron app runs from source, the Makefile's flush target documents the same state under ~/.cowork, with provider keys in ~/.anton.
backend/data-vault is the earlier MindsDB query engine: its tree holds the mindsdb/ Python package with api, integrations and interfaces, and its requirements include Flask, SQLAlchemy, the mindsdb-sql-parser and DuckDB. Its own docker-compose.yml runs the mindsdb/mindsdb image next to pgvector/pgvector PostgreSQL containers and Langfuse. MindsHub pins this submodule, but none of the superproject's run paths build or start it.
Build, test & deploy
The superproject's workflows are codeql.yml and deploy_docs.yml; tests live in the submodules: cowork-server has a tests/ directory, and anton has tests/ with a tests/e2e suite plus tests.yml and tests_e2e_release.yml workflows. The Makefile wraps two paths. setup, dev and dev-web install npm and uv dependencies and run the Electron app or the browser build against a hot-reloading Uvicorn server, watching both core_api and core_agent. docker-build, docker-up and docker-down wrap docker compose. REF, API_REF, AGENT_REF and FRONTEND_REF (default main, overridable in an untracked dev.env) choose which submodule branches those targets use.
Self-hosting notes
docker compose up builds two images. docker/api.Dockerfile installs core_agent and core_api into a virtualenv on python:3.12-slim, runs cowork-server as a non-root user on port 26866 and exposes a /health check. docker/web.Dockerfile builds the SPA on node:22-slim and serves it from nginx:alpine on port 80, mapped to 3000 on the host; docker/nginx.conf proxies /v1/ to api:26866 and falls back to index.html for client routes. Compose starts the web service only after the API is healthy. Data persists in the cowork-data volume. A plain git clone has no working source until the submodules are initialised; the Makefile's baseline target checks them out at the pinned commits.
What to copy (and what not to)
Copy the sidecar pattern if you ship a desktop app with a Python backend: the Electron app installs the server as a versioned package and talks to it over localhost, so the backend can be updated and tested on its own. Copy the per-developer dev.env branch overrides if you do keep code in several repositories. Think twice about the superproject layout itself: a clone yields no source without submodule steps, licenses differ between the pieces, and the pinned data-vault module shows that a pin alone does not tell a reader which parts actually run.
Sources & repo audit
- Makefile (submodule refs, uv/npm targets, Electron packaging)
- .gitmodules (frontend, core_api, core_agent, data-vault)
- docker-compose.yml and docker/api.Dockerfile (api and web services, SQLite path)
- cowork package.json (Electron, React, Vite, Keycloak) at the pinned commit
- cowork-server pyproject.toml (FastAPI, SQLModel, Alembic, anton-agent) at the pinned commit
- anton pyproject.toml (agent runtime, model SDKs) at the pinned commit
- data-vault requirements.txt (former MindsDB engine) at the pinned commit
Independent analysis of repository at github.com/mindsdb/mindshub. Spotted an inaccuracy? Use the claim form to request a correction.
Show this stack on your README or website
[](https://stackitfast.com/project/mindsdb)Paste it into your README. It shows your current stack and links to this page.
Scaffold it with your agent
Paste this prompt into Claude Code, Cursor, Windsurf or AGY to start a project with MindsHub (formerly MindsDB)'s architecture.
- 1Copy the promptThe full markdown spec, with every layer and decision.
- 2Open your AI toolClaude Code, Cursor, Windsurf or Copilot, in a new repo.
- 3Paste and scaffoldUse it as the first instruction; review before you ship.
# MISSION: Scaffold "MindsHub (formerly MindsDB)" Production Architecture
You are an expert Senior Staff Software Architect and Full-Stack Engineer. Your mission is to scaffold and implement a production-grade, highly reliable, and modular codebase following the proven architecture of **MindsHub (formerly MindsDB)**.
---
## 1. PROJECT SPECIFICATIONS & BENCHMARK
- **Reference Architecture**: MindsHub (formerly MindsDB)
- **What It Does**: MindsHub (formerly MindsDB) is an agent workspace: an Electron and React desktop and web app backed by a Python FastAPI server on SQLite and the anton agent runtime, shipped as a superproject over four git submodules.
- **Domain & Category**: Desktop & Web AI Agent Workspace
- **Production Scale**: 20+ People
- **Development Mode**: AI-AGENT
- **Architectural Rationale**: Splitting the client, API and agent into separately versioned git submodules lets each ship on its own cadence (a signed desktop app, a PyPI server package, an agent package), while one Makefile and one docker-compose.yml still bring the whole stack up together.
- **Live Website Reference**: https://mindsdb.com
- **Source Repository**: https://github.com/mindsdb/mindshub
---
## 2. PRODUCTION TECH STACK
- **Full Stack Array**: Python, TypeScript, Electron, React, Vite, Tailwind CSS, FastAPI, Uvicorn, SQLModel, Alembic, SQLite, Keycloak, Anthropic, Docker, Nginx
- **Primary Language(s)**: Makefile, Dockerfile
- **License of the reference repo**: MIT
- **Frontend**: Electron — Desktop shell for macOS and Windows; its main process starts cowork-server as a local sidecar and talks to it over HTTP on 127.0.0.1:26866.; React — The renderer SPA, identical in the desktop app and the web build (BUILD_TARGET=web).; Vite — Builds and serves the renderer (vite dev / vite build src/renderer).; Tailwind CSS — Styling for the renderer, through PostCSS.; Keycloak — Sign-in for the app through keycloak-js and @react-keycloak/web.; electron-builder — Packages the signed macOS and Windows installers built by the release workflows.
- **Backend & APIs**: Python — Language of cowork-server (the API) and anton (the agent).; FastAPI — cowork-server: projects, conversations, files, scheduling, memory and agent orchestration.; Uvicorn — Runs cowork.server:app in development and inside the api container.; uv — Syncs the module virtualenvs in development, installs cowork-server as a uv tool for the desktop app, and installs core_agent and core_api in the api image.; Anthropic — Model provider SDK used by anton, alongside the OpenAI SDK.; Typer — Command-line interface of anton, which also runs standalone in a terminal.
- **Data & persistence**: SQLite — cowork-server data store; docker-compose.yml points DATABASE_URI at a file in a named volume.; SQLModel — ORM layer of cowork-server.; Alembic — Schema migrations for the cowork-server database (alembic.ini, cowork/migrations.py).
- **Infrastructure & deploy**: Docker — docker-compose.yml builds an api image (cowork-server + anton) and a web image (the SPA).; Nginx — Serves the built SPA in the web image and proxies /v1/ requests to the api service.
- **Tooling, testing & ops**: Git submodules — Pin frontend, core_api, core_agent and data-vault to specific commits; Makefile use, pin and baseline targets manage them.; GitHub Actions — The superproject runs CodeQL and docs deployment; the cowork repo builds and uploads macOS and Windows installers.
---
## 3. KEY ARCHITECTURAL DECISIONS (audited from https://github.com/mindsdb/mindshub @ 780bbcb)
1. **The repository is a thin superproject over four git submodules**: The tree lists frontend, backend/core_api, backend/core_agent and backend/data-vault as submodule entries, declared in .gitmodules as the mindsdb/cowork, cowork-server, anton and data-vault repositories, and the Makefile use, pin and baseline targets manage them. Application source lives in those repositories at the pinned commits.
2. **The desktop app runs the API as a local sidecar**: The cowork README states that the Electron main process spawns cowork-server and talks to it over HTTP on 127.0.0.1:26866; packaged apps install cowork-server from PyPI as a uv tool, which the Makefile server target mirrors.
3. **Desktop and web clients share one backend process**: The Makefile dev and dev-web targets both run uv run --directory backend/core_api uvicorn cowork.server:app --reload, differing only in whether the frontend starts as an Electron app (npm run dev) or a browser build (BUILD_TARGET=web npm run dev:renderer).
4. **The agent runtime is a separately versioned dependency**: cowork-server depends on anton-agent (pyproject.toml, with a git tag source for mindsdb/anton), and the Makefile can install anton from a git reference with uv, so the agent in backend/core_agent updates independently of the API that hosts it.
5. **Local storage defaults to SQLite, not a client-server database**: cowork-server uses SQLModel with Alembic migrations, and docker-compose.yml sets DATABASE_URI to sqlite:////home/cowork/.cowork/cowork.db inside a named cowork-data volume, so the default deployment needs no separate database server.
6. **The former MindsDB query engine is pinned but not run**: backend/data-vault points at mindsdb/data-vault, which contains the mindsdb Python package, the SQL parser dependency and the handler tree of the earlier MindsDB engine. The superproject pins it, but make dev, docker/api.Dockerfile and docker-compose.yml only build frontend, core_api and core_agent.
7. **The Docker Compose stack serves the web build through Nginx**: docker/web.Dockerfile builds the SPA with npm run build:web and copies it into an nginx:alpine image whose docker/nginx.conf proxies /v1/ to api:26866; compose maps host port 3000 to it and starts it only after the api service passes its /health check.
8. **Per-developer branch overrides are opt-in via an untracked file**: The Makefile reads REF, API_REF, AGENT_REF and FRONTEND_REF from an -include dev.env line, and dev.env.example documents the pattern, so contributors can point a checkout at submodule feature branches without changing shared defaults.
---
## 4. NON-NEGOTIABLE ARCHITECTURAL GUARDRAILS
1. **Monorepo & Modular Separation**:
- Structure as a Turborepo monorepo with strict package boundaries:
- `apps/web`: Application UI, routing, layouts, and server endpoints.
- `packages/ui`: Shared design tokens, CSS variables, and Radix UI primitive components.
- `packages/db`: Database schemas, client singleton, declarative migrations, and seed scripts.
- `packages/config`: Shared TypeScript, ESLint, and build configurations.
2. **Strict Type Safety & Zero `any` Policy**:
- Enable `strict: true`, `noImplicitAny: true`, and `strictNullChecks: true`.
- Validate ALL external inputs, API request bodies, and query parameters with **Zod** schemas before execution.
3. **Frontend & Rendering Guidelines**:
- Utilize Vite 6 with TanStack Router for fully type-safe routing. Manage server state and caching via TanStack Query v5 with optimistic UI updates.
4. **Design System & Aesthetics**:
- Keep every color, radius, shadow and font in a single token file (CSS variables) and consume tokens everywhere; never hardcode hex values in components.
- Prefer crisp 1px borders and one subtle shadow scale over blurry default shadows. Pair one sans-serif for body/headings with one monospace for tags, badges, metrics, and code.
5. **Data Layer & Reliability**:
- Write declarative schema definitions with foreign keys, composite indexes on queried filters, and automated timestamp triggers.
- Use connection pooling and prepared statements for serverless database execution.
---
## 5. STEP-BY-STEP SCAFFOLDING ROADMAP
- **Phase 1: Workspace & Root Config**: Initialize package manager, monorepo configuration (`turbo.json`, `tsconfig.base.json`, `package.json`).
- **Phase 2: Database Schema & Client**: Set up the data layer (SQLite, SQLModel, Alembic): client, connection pool, models, and migration scripts.
- **Phase 3: Design Tokens & UI Primitives**: Build accessible `Button`, `Input`, `Card`, `Badge`, and layout wrappers inside `packages/ui`.
- **Phase 4: Core Application Routes & Handlers**: Implement primary authentication, user session handling, and application routes.
- **Phase 5: Quality Assurance & Build Verification**: Run `tsc --noEmit`, ESLint, Prettier, and smoke test suites to ensure zero compilation or runtime errors.
---
## 6. EXECUTION INSTRUCTIONS
1. Review all specifications, architectural guardrails, and stack choices above.
2. Present the full monorepo directory tree structure.
3. Systematically generate the complete, production-ready codebase according to the 5-phase roadmap above — starting with the root workspace setup, followed by the database schema, UI design system package, and full-stack application routes until the repository is fully scaffolded and ready to run.Copied 1 time · 1 of 1 reported launches succeeded (100%)
Frequently asked about MindsHub (formerly MindsDB)
What is MindsHub built with?
MindsHub is a superproject over four git submodules. The client is an Electron and React app built with Vite; the API, cowork-server, is Python FastAPI on SQLite through SQLModel and Alembic; the agent, anton, is a Python package that calls model providers through the Anthropic and OpenAI SDKs.
What happened to the MindsDB SQL engine?
The mindsdb/mindsdb repository now redirects to mindsdb/mindshub. The earlier query engine code (the mindsdb Python package, its SQL parser dependency and data source handlers) is in the mindsdb/data-vault repository, which MindsHub pins as the backend/data-vault submodule but does not build or run.
Can I self-host MindsHub?
Yes. docker compose up builds an api image with cowork-server and anton and a web image that serves the SPA through Nginx, with data in a named volume. For development, make setup followed by make dev runs the Electron app and the API from the submodule source.
Which database does MindsHub use?
SQLite. cowork-server stores projects and conversations through SQLModel with Alembic migrations, and the Docker setup points DATABASE_URI at a SQLite file inside a named volume, so no database server is needed.
What license is MindsHub under?
It differs by repository. The superproject and anton are MIT. GitHub reports AGPL-3.0 for cowork and for cowork-server, but cowork-server declares LicenseRef-Proprietary in pyproject.toml, and data-vault has no license GitHub can identify. Check each repository before reusing code.
One email a month: new deep dives and stack trends
New source-audited architectures, head-to-head comparisons and the monthly stack report. No spam, unsubscribe anytime.
Similar architectures
- VoiceStudioHybridLocal AI Voice Cloning & Speech Studio · 2-5 peopleShares Python · FastAPI · Alembic
- OllamaAI-agentLocal AI Inference Engine · 1-5 peopleShares TypeScript · React · SQLite
- Open WebUIAI-agentSelf-Hosted AI Interface & Agent Hub · 2-5 peopleShares Python · TypeScript · FastAPI
- MagnitudeHybridLocal LLM Inference Engine & Hardware Profiler · 2-5 peopleShares TypeScript · Electron · React
- Mem0AI-agentAI Memory & Context Engine · 2-5 peopleShares Python · TypeScript · FastAPI
- LibreChatHybridMulti-Model AI Agent & Chat Workspace · 6-20 PeopleShares TypeScript · React · Vite