Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .base44/environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"previewPort": 3000,
"healthPath": "/",
"startCommand": "docker compose -f docker-compose.base44.yml up -d",
"secrets": [],
"verifiedAtCommit": "0f056184cab70e27f6343afb6d0d67f546e63f9d"
}
31 changes: 31 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# jst — Base44 dev notes

## What this is
A Cargo workspace (`crates/cli`, `crates/server`, `crates/shared`) plus a static
Vite-served website in `docs/` (marketing page + in-browser WASM shell demo).
The browser demo proxies its `/api/jst-demo` and `/api/jst-status` calls to the
already-hosted production server at `https://jst-server.fly.dev`, so the
frontend renders and is explorable without running the Rust server or any
external credentials.

## Running in the Base44 sandbox
`docker-compose.base44.yml` runs a single `node:22` service that bind-mounts
the repo, runs `npm install`, and starts the Vite dev server serving `docs/`
on port 3000.

- `vite.config.js` dev server is configured with `host: true`, `port: 3000`,
and `allowedHosts: true` so the preview proxy hostname is accepted.
- `npm ci` fails because `package-lock.json` is out of sync; use `npm install`.
- Prebuilt demo bundles already live in `docs/assets/` (committed), so no
`npm run build:demo` is needed to view the site.

## Verification
- `curl -sf -H "Host: external-preview.example.com" http://localhost:3000/`
returns the page (HTTP 200) with `<title>jst — shell commands from plain English</title>`.
- `script.js`, `styles.css`, and the `/assets/*.js` demo bundles are served.

## When credentials are needed
The Rust server (`crates/server`) needs `LLM_API_URL` / `LLM_API_KEY` /
`LLM_MODEL` (and optionally `DEMO_LLM_API_KEY` for the browser demo endpoint)
only if you self-host the proxy. The frontend sandbox does **not** require any
secrets in this dev setup because it talks to the hosted fly.dev server.
13 changes: 13 additions & 0 deletions docker-compose.base44.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
web:
image: node:22
working_dir: /app
command: sh -c "npm install && npx vite docs --config vite.config.js --base / --host 0.0.0.0 --port 3000"
environment:
- NODE_ENV=development
volumes:
- .:/app
- /app/node_modules
ports:
- "3000:3000"
restart: unless-stopped
Loading