|
| 1 | +# Minds Platform |
| 2 | + |
| 3 | +## Submodules |
| 4 | + |
| 5 | +This repo has 4 submodules: |
| 6 | + |
| 7 | +| Path | Repo | Tracking | |
| 8 | +|---|---|---| |
| 9 | +| `frontend` | `mindsdb/cowork` | tag-pinned | |
| 10 | +| `backend/core_api` | `mindsdb/cowork-server` | tag-pinned | |
| 11 | +| `backend/core_agent` | `mindsdb/anton` | tag-pinned | |
| 12 | +| `backend/data-vault` | `mindsdb/data-vault` | `main` branch | |
| 13 | + |
| 14 | +### Clone (fresh) |
| 15 | + |
| 16 | +```bash |
| 17 | +git clone --recurse-submodules https://github.com/mindsdb/minds-platform |
| 18 | +``` |
| 19 | + |
| 20 | +### Initialize after cloning without submodules |
| 21 | + |
| 22 | +```bash |
| 23 | +git submodule update --init --recursive |
| 24 | +``` |
| 25 | + |
| 26 | +### Pull — sync to what the parent repo pins (default) |
| 27 | + |
| 28 | +```bash |
| 29 | +git submodule update --recursive |
| 30 | +``` |
| 31 | + |
| 32 | +### Pull — advance all submodules to latest `main` |
| 33 | + |
| 34 | +Only do this if you intend to develop across all repos. You'll need to commit the updated pointers in the parent repo afterward. |
| 35 | + |
| 36 | +```bash |
| 37 | +git submodule foreach 'git checkout main && git pull origin main' |
| 38 | +``` |
| 39 | + |
| 40 | +### Make changes and push inside a submodule |
| 41 | + |
| 42 | +1. Go into the submodule and get on a real branch first (all submodules start in detached HEAD): |
| 43 | + |
| 44 | +```bash |
| 45 | +cd backend/data-vault # or whichever submodule |
| 46 | +git checkout main # or: git checkout -b your-feature-branch |
| 47 | +``` |
| 48 | + |
| 49 | +2. Make your changes, commit, and push: |
| 50 | + |
| 51 | +```bash |
| 52 | +git add . |
| 53 | +git commit -m "your message" |
| 54 | +git push origin main |
| 55 | +``` |
| 56 | + |
| 57 | +3. Back in the parent repo, stage and commit the updated submodule pointer: |
| 58 | + |
| 59 | +```bash |
| 60 | +cd ../.. |
| 61 | +git add backend/data-vault |
| 62 | +git commit -m "bump data-vault to latest" |
| 63 | +git push |
| 64 | +``` |
| 65 | + |
| 66 | +> The parent repo stores a commit SHA pointer to each submodule, not the code itself. Always push from inside the submodule first, then update the pointer in the parent. |
| 67 | +
|
| 68 | +## Running locally (web browser mode) |
| 69 | + |
| 70 | +After initializing submodules, start the full stack with: |
| 71 | + |
| 72 | +```bash |
| 73 | +cd frontend |
| 74 | +npm install |
| 75 | +npm run dev:web |
| 76 | +``` |
| 77 | + |
| 78 | +Open `http://localhost:5173/`. The FastAPI backend starts automatically on `http://127.0.0.1:26866`. |
| 79 | + |
| 80 | +### Skip Keycloak auth (required for local dev) |
| 81 | + |
| 82 | +By default the web app redirects to MindsHub SSO on first load. To bypass this locally, create `frontend/src/renderer/.env` (Vite's root is `src/renderer`, not `frontend/`): |
| 83 | + |
| 84 | +```bash |
| 85 | +echo "VITE_SKIP_AUTH=true" > frontend/src/renderer/.env |
| 86 | +``` |
| 87 | + |
| 88 | +Then restart `npm run dev:web`. The Keycloak redirect will be skipped and the app loads the onboarding screen directly where you can enter a BYOK API key. |
| 89 | + |
| 90 | +### First-time symlink fix |
| 91 | + |
| 92 | +The `dev:web` script expects the `uv`-installed tool at `~/.local/share/uv/tools/anton/`, but it may be installed as `anton-agent`. If you see "Anton Python interpreter not found", run: |
| 93 | + |
| 94 | +```bash |
| 95 | +ln -s ~/.local/share/uv/tools/anton-agent ~/.local/share/uv/tools/anton |
| 96 | +``` |
| 97 | + |
| 98 | +## Flushing local installs (fresh start) |
| 99 | + |
| 100 | +`make flush` wipes every local install **and** all app state, returning the machine to a pre-install condition. Use it to test the from-scratch install flow or to recover from a broken/half-installed environment. |
| 101 | + |
| 102 | +```bash |
| 103 | +make flush # prompts before deleting |
| 104 | +make flush FORCE=1 # skip the prompt (CI / scripts) |
| 105 | +``` |
| 106 | + |
| 107 | +It removes: |
| 108 | + |
| 109 | +| Removed | What it is | |
| 110 | +|---|---| |
| 111 | +| `cowork-server` uv tool (+ legacy `anton-agent`) | the runtime the **Electron app** installs via `uv tool install` | |
| 112 | +| `backend/core_api/.venv`, `backend/core_agent/.venv` | the venvs the **Makefile** dev flow builds via `uv sync` | |
| 113 | +| `~/.anton` | provider keys / `.env` | |
| 114 | +| `~/.cowork` | database, `hermes`, `projects` | |
| 115 | + |
| 116 | +> ⚠️ Destructive — deletes conversations and saved provider keys, no undo. After flushing, the next `make setup` (or app launch) reinstalls everything from scratch. |
| 117 | +
|
| 118 | +> It deliberately leaves `uv` itself and uv-managed Python runtimes alone (shared infrastructure, not part of the anton/cowork install). |
0 commit comments