Files
JesebelGPT/README.md
2026-01-27 02:01:40 +01:00

1.2 KiB

Firmware Chat Web

ChatGPT-like web app backed by Firmware (https://docs.firmware.ai/) with SQLite logging and admin read-only APIs.

Requirements

  • Node.js 22+
  • FIRMWARE_API_KEY must be exported in your shell
  • ADMIN_TOKEN (protects admin endpoints)

Setup

npm install
cp .env.example .env

Edit .env:

ADMIN_TOKEN=...

Export your Firmware key in the same shell you run the app:

export FIRMWARE_API_KEY=...

Note: .env is loaded by ./run.sh for non-secret config (like ADMIN_TOKEN, PORT).

Run (dev)

./run.sh dev

Run on LAN (example: 192.168.88.2)

Set in .env:

HOST=0.0.0.0
PORT=8787

Then run:

./run.sh build
./run.sh server

Open from another device:

Run (prod-ish)

./run.sh build
./run.sh server

Admin APIs

Send x-admin-token: $ADMIN_TOKEN:

  • GET /api/logs
  • GET /api/logs/:request_id
  • GET /api/stats/summary
  • GET /api/stats/models
  • GET /api/stats/timeseries

Admin UI (browser)

Open:

  • /admin

Enter ADMIN_TOKEN once to start a cookie-based session.