Skip to main content

FOSA Smart Advisor docs

AI diagnostic add-on for independent restaurant owners: plain-language problem → playbook → data + manager questions → diagnosis with actions.

One process, one port (default 3040):

URLWhat
/docuThis documentation site
/redocInteractive API reference (OpenAPI)
/api/stepsLive pipeline map (JSON)
/api/healthAdapters + third-party flags
/api/*All JSON APIs

Run

cp .env.example .env
npm install
npm run dev

Then open http://localhost:3040/docu and http://localhost:3040/redoc.

  1. Architecture — how pieces fit
  2. Pipeline steps — test auth → catalog → classify → query → sessions
  3. Sessions — full diagnosis API shapes
  4. Live test run — working principle + real QueryCraft/OpenAI walkthrough
  5. Tweaking — prompts, playbooks, models, adapters
  6. Postman — import OpenAPI and exercise the flow
  7. Work log — 2026-07-22 — what we shipped today

Offline vs live

ModeEnv highlights
Offline (recommended first)AUTH_ADAPTER=mock, CATALOG_ADAPTER=yaml, LLM_ADAPTER=mock, QUERY_ADAPTER=mock
Live data + authAUTH_ADAPTER=querycraft, QUERY_ADAPTER=querycraft, QUERYCRAFT_URL=https://querycraft.ncrts.pro
Live LLMLLM_ADAPTER=openai, OPENAI_ENABLED=true, OPENAI_API_KEY=…