Files
FamReynaBrain/projects/instatic_reyna_family_2026.md
T
2026-07-13 23:00:01 -04:00

116 lines
8.1 KiB
Markdown

---
Date: 2026-07-13
Author: Hermes Agent
Tags: [instatic, cms, website-builder, docker, mcp, barebrowse, famreyna110, imac]
Project: Reyna Family Site
---
# Instatic Reyna Family Site — Build Log
## Overview
Self-hosted Instatic CMS (CoreBunch/Instatic v0.0.11 MIT, Bun + TypeScript, SQLite) vision: visual editor + content engine + publisher in one Bun server, outputs clean semantic HTML/CSS no framework runtime. 3,272 stars.
User asked "check this out" barebrowse repo, then "Let's take a look into instatic for building websites" → deployed on FamReynaServer .110 Docker with MCP enabled for Hermes building sites from chat.
## Deployment — FamReynaServer .110
- Host: 192.168.68.110, 7.6Gi RAM, Docker 29.5
- Location: `~/instatic/` compose.prod.yml + compose.sqlite.yml from github raw main
- Container: `instatic-prod-app-1` Bun:latest, SQLite `/app/data/cms.db` WAL mode
- Pitfall: No `sqlite3` binary in image — `sh: 1: sqlite3: not found` — must query via `bun -e "const {Database}=require('bun:sqlite'); ..."`
- Table `site` singular, not `sites``no such table: sites`
- Admin: http://192.168.68.110:3002/admin
- Created owner via BareBrowse: reynafamilybot@gmail.com / reyna2026!Instatic on 2026-07-13T14:03:37Z
- Bug: Onboarding left name `My SiteReyna Family` (typed without select-all, appended) — fixed via `UPDATE site SET name='Reyna Family'` via bun:sqlite
- Public `/` 404 before first publish, 200 after publish 2979 bytes, CSS hashed reset-a9a4... + style-b4e0ba...
- MCP endpoint: `http://192.168.68.110:3002/_instatic/mcp` StreamableHTTP Bearer token
## MCP Connector — Automated via BareBrowse on iMac .124
**Token:** `imcp_Qg8lYALr3miPVO2ruPy23RnMdWNAstH9SdfggYL6hQQ`
- Label hermes, Local type, 20 caps (all), Expires 10/11/2026
- Stored: `~/.config/instatic-mcp-token` 0600 + `~/.hermes/mcp-servers.d/instatic.json` with `npx mcp-remote --allow-http --header Authorization: Bearer ...``--allow-http` REQUIRED for LAN IP else Non-HTTPS error
- Creation flow (proven):
1. `ssh imac cd /tmp/bbtest node` BareBrowse headless `connect({mode:'headless'})`
2. Login `/admin` textbox Email [ref 21] Password [24] Sign In [17]
3. `goto /admin/ai` + MCP tab [73] + Add connector [59]
4. Label [96] type `hermes`
5. **Select all trap:** Read caps pre-checked, Select all button inverted — clicking when N/N clears to 0. 12 buttons found, clicking all twice empties. Solution: JS bulk check:
```js
(() => { const cbs = Array.from(document.querySelectorAll('input[type=checkbox]')); let c=0; cbs.forEach(cb=>{ if(!cb.checked){ cb.click(); c++; }}); return 'checked '+c+'/'+cbs.length; })()
```
=> checked 14 of 19 or 19/19
6. Create connector [71] → stacked Confirm your password dialog PASSWORD [74]
7. Confirm button starts disabled, enables after typing password `reyna2026!Instatic` — click via JS `Array.from(document.querySelectorAll('button')).find(b=>/Confirm/i.test(b.textContent)).click()`
8. Token dialog `Connector created` with `<code>imcp_Qg8...</code>` — extract via `document.body.innerHTML.match(/imcp_[A-Za-z0-9_-]+/)` shown once only.
Verification: `curl POST /_instatic/mcp initialize` → protocolVersion + `mcp-remote` proxy logs `Connected to remote server using StreamableHTTPClientTransport` + `Proxy established`
## Site Building — First Landing Published 2026-07-13
**Docs:** 1 page Home `id u2st08YmkY51yZy_Tpmo1` slug `index` isHomepage true rootNodeId `hXtVXlf9o4IlC9SV8uueJ` draft status initially
- Collections: pages (1 row), posts (0)
- Styles initially empty `{"classes":[],"classCount":0}`
**Editor connection requirement:** MCP tools needing siteConnected error `This tool runs in the Instatic Site editor. Open the Site editor...` — get_context says siteConnected bool. Must keep BareBrowse page open on `/admin/site` to maintain true. Visible Chrome on iMac tab on `/admin/site` also counts. Keep alive 120s window.
**Workflow:**
```js
site_list_documents → Home id
content_get_collection_schema pages → fields title, slug, body:pageTree, seo...
site_read_document {type:page id:u2st08...} → html "\n\n" empty
site_insert_html {parentId: hXtV..., html: "<section class=\"hero\">...<style>...</style></section>"}
-> nodeIds 4 roots, created 50+ nodes base.container/text/button/link with classes hero, hero-inner, eyebrow, accent etc
site_publish → {publishedPages:1}
curl -D - http://192.168.68.110:3002/ → 200 OK 2979 bytes
```
Published landing: Hero "Build things that matter." with gradient accent, stats FamReynaServer/Instatic v0.0.11/MCP hermes, 3 cards Grace & Poppy Books / BareBrowse > Playwright / Instatic CMS, how-made codeblock, footer. Clean HTML no JS runtime CSP script-src 'none'
## Visible Chrome on iMac .124
User directive: "If you need to work on the browser use the iMac for that" — iMac is DEFAULT for all browser work (15Gi avail vs Pi 3.9Gi swap-thrash). Pi is hub/dashboard :9119 only.
**Launch pattern:** `systemd-run --user --scope -- env DISPLAY=:0 XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.* DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus google-chrome --remote-debugging-port=9222 --user-data-dir=~/.config/google-chrome-reyna-bot`
Proof during this session: 4 tabs — dashboard + / (home) + 2 omnibox, CDP listening ws://127.0.0.1:9222. Refresh via `Page.navigate` + snapshot pruned 3148→1049 67% shows heading. User said "I see chrome" — success.
## Default Browser Prompt Fix — 2026-07-13
User closed Chrome intentionally, said "every time it is open from scratch a window about making chrome the default option shows first and blocks the browser window. Let's research how to overcome that, maybe sending some key combinations if an option on the cli isn't available. You could also take screenshots and look when in doubt"
**Fix deployed:**
- Patched JSON: Preferences + Local State set `browser.check_default_browser=False` + `default_browser_infobar_last_declined=13390000000000000.0` (far future)
- Wrapper `~/bin/launch-reyna-bot.sh` with EXTRA flags:
`--no-default-browser-check --no-first-run --disable-search-engine-choice-screen --disable-features=DefaultBrowserInfobar,ChromeWhatsNew,SearchEngineChoiceTrigger --disable-default-apps --no-service-autorun --disable-infobars`
- Verification method: BareBrowse snapshot shouldn't contain "Make Chrome default" + CDP `Runtime.evaluate documentElement.outerHTML.includes("default browser")` false + screenshot via `Page.captureScreenshot` WS.
- Research noted peter.sh chromium flags, screenshot via WS target find url containing 192.168.68.110:3002 → capture.
- Skills updated: remote-browser-control §6.5 + barebrowse THIS HOST + instatic Pitfalls + new reference `chrome-default-browser-prompt-fix-2026-07.md`
Learnings documented: screenshot approach when in doubt — user explicitly invited it; flags are canonical fix, not key combos.
## Skills Updated
- `computer-use/remote-browser-control/SKILL.md` §6.5 Prevent Make Chrome default prompt + wrapper script
- `computer-use/barebrowse/SKILL.md` THIS HOST updated with default fix + screenshot + validation
- `creative/instatic/SKILL.md` Visible Chrome Default-Prompt Fix pitfall
- New ref `remote-browser-control/references/chrome-default-browser-prompt-fix-2026-07.md` with full research, patch, wrapper, verification
## Next Steps
- Add blog posts via content_create_document + publish
- Add Grace/Poppy books showcase as separate pages with media
- Consider Tailscale or public proxy for 192.168.68.110:3002 if need external
- Keep Chrome closed for now — user closed intentionally, wrapper ensures next launch clean
- MCP token valid until 10/11/2026 — refresh via same BareBrowse flow
- Visible demo available: `~/bin/launch-reyna-bot.sh "http://192.168.68.110:3002/" "http://192.168.68.110:3002/admin"`
## Links
- Instatic: https://github.com/CoreBunch/Instatic 3272★
- BareBrowse: https://github.com/hamr0/barebrowse 37★ preferred over Playwright
- Deployed: http://192.168.68.110:3002/ live 200
- Admin: http://192.168.68.110:3002/admin
- MCP: http://192.168.68.110:3002/_instatic/mcp
- Launch script imac: ~/bin/launch-reyna-bot.sh
- Token file: ~/.config/instatic-mcp-token 0600
- Hermes MCP: ~/.hermes/mcp-servers.d/instatic.json