Appearance
Architecture
Webquirer is split into small packages with a one-way flow from the CLI to the browser and back.
text
packages/cli → starts the server, prints the URL, opens the browser
packages/server → owns sessions and HTTP endpoints
packages/core → normalizes schemas and validates answers
packages/web → renders the HTML shell, client behaviour, and stylesRequest flow
inquire()creates a server and registers a session.- The CLI opens
/s/:idin the browser. - The browser fetches the normalized form from
GET /api/sessions/:id. - The browser posts answers to
POST /api/sessions/:id/answers. - The core validator accepts the answers or returns a field error.
- The session promise resolves and the server closes.
The server binds to 127.0.0.1 and sessions are single-use. The /s/:id page, session API, assets, answer submission, and cancellation are all handled by the local HTTP server.