mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-08-26 09:21:33 +00:00
Compare commits
4 commits
main
...
chore/untr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d60db11d6 | ||
|
|
f5b3f85b86 | ||
|
|
69b72d76ce | ||
|
|
bc2e487141 |
8 changed files with 28 additions and 501 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
|
@ -58,8 +58,13 @@ config.yaml
|
|||
*.pem
|
||||
*.key
|
||||
|
||||
# Frontend build output (built in Docker via multi-stage)
|
||||
meshai/dashboard/static/
|
||||
# Frontend build output (built in Docker via multi-stage, or manually for
|
||||
# the pip install path -- see README "Quick start"). Anchored with the
|
||||
# work/ prefix: the bare "meshai/dashboard/static/" pattern silently
|
||||
# stopped matching anything after 2e1fb325 moved the source tree into
|
||||
# work/, which is how these build artifacts got committed in the first
|
||||
# place.
|
||||
work/meshai/dashboard/static/
|
||||
|
||||
# Node (frontend deps, reinstalled via package-lock.json / npm ci)
|
||||
node_modules/
|
||||
|
|
|
|||
|
|
@ -71,11 +71,17 @@ As you save settings, MeshAI persists them back into `/data` as focused per-doma
|
|||
```bash
|
||||
git clone https://github.com/zvx-echo6/meshai.git
|
||||
cd meshai/work
|
||||
cd dashboard-frontend && npm ci && npm run build && cd .. # builds the web dashboard — required, see note
|
||||
pip install -e .
|
||||
cp config.example.yaml config.yaml # minimal starting point, not exhaustive — see note below
|
||||
meshai
|
||||
```
|
||||
|
||||
> **The frontend build step is required.** `meshai/dashboard/static/` is no longer
|
||||
> committed to the repo, so skipping it means no dashboard UI is served (the bot and
|
||||
> API still run fine). Docker users don't need this — the image builds the frontend
|
||||
> automatically. Requires Node.js/npm.
|
||||
|
||||
Unlike Docker, `meshai` won't create a config file for you — it needs one to exist before it will start. `config.example.yaml` bootstraps the basics (connection, LLM backend, bot behavior); once it's running, open `http://localhost:8080` and use the dashboard for everything else.
|
||||
|
||||
> **Note on `config.example.yaml`:** it documents the legacy single-file schema and is no longer complete — it predates `coverage`, `danger_zones`, `generic_sources`, `meshcore_context`, `commands`, and the current 8-family notification-routing model (`notifications.toggles` / `destinations` / `region_routes`). The legacy single-file loader still works and is fully supported, but the dashboard — backed by the full config schema — is the authoritative way to reach every setting. Don't treat this file as a complete reference.
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ def create_app() -> FastAPI:
|
|||
static_dir = Path(__file__).parent / "static"
|
||||
index_html = static_dir / "index.html"
|
||||
|
||||
if static_dir.exists():
|
||||
if static_dir.exists() and index_html.exists():
|
||||
# Mount /assets for JS, CSS, images
|
||||
assets_dir = static_dir / "assets"
|
||||
if assets_dir.exists():
|
||||
|
|
@ -114,6 +114,20 @@ def create_app() -> FastAPI:
|
|||
@app.get("/")
|
||||
async def root():
|
||||
return FileResponse(index_html)
|
||||
else:
|
||||
# meshai/dashboard/static/ is a build artifact, not committed to the
|
||||
# repo (see .gitignore) -- it only exists if the frontend has been
|
||||
# built. Without it there's no route for "/", so requests would
|
||||
# otherwise 404 with no explanation. Log loudly so a fresh
|
||||
# `pip install -e .` user knows the bot/API are fine and just the
|
||||
# dashboard UI needs building.
|
||||
logger.warning(
|
||||
"Dashboard UI not found at %s -- the web dashboard will NOT be served "
|
||||
"(the bot and API are unaffected). Build it with: "
|
||||
"cd dashboard-frontend && npm ci && npm run build "
|
||||
"(then restart meshai). Docker images build this automatically.",
|
||||
index_html,
|
||||
)
|
||||
|
||||
return app
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" class="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/png" href="/meshai-icon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>MeshAI Dashboard</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<script type="module" crossorigin src="/assets/index-FgUiz9s3.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CTVGSJxQ.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 59 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 414 KiB |
Loading…
Add table
Add a link
Reference in a new issue