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):
| URL | What |
|---|---|
| /docu | This documentation site |
| /redoc | Interactive API reference (OpenAPI) |
| /api/steps | Live pipeline map (JSON) |
| /api/health | Adapters + 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.
What to read next
- Architecture — how pieces fit
- Pipeline steps — test auth → catalog → classify → query → sessions
- Sessions — full diagnosis API shapes
- Live test run — working principle + real QueryCraft/OpenAI walkthrough
- Tweaking — prompts, playbooks, models, adapters
- Postman — import OpenAPI and exercise the flow
- Work log — 2026-07-22 — what we shipped today
Offline vs live
| Mode | Env highlights |
|---|---|
| Offline (recommended first) | AUTH_ADAPTER=mock, CATALOG_ADAPTER=yaml, LLM_ADAPTER=mock, QUERY_ADAPTER=mock |
| Live data + auth | AUTH_ADAPTER=querycraft, QUERY_ADAPTER=querycraft, QUERYCRAFT_URL=https://querycraft.ncrts.pro |
| Live LLM | LLM_ADAPTER=openai, OPENAI_ENABLED=true, OPENAI_API_KEY=… |