Using AstroBaaS as a headless backend
You do not have to use the pages AstroBaaS renders. It works just as well as a headless backend: you build the front end, and AstroBaaS handles content, products, orders, customers, files and authentication behind it.
What that gives you
- A REST API over everything — posts, pages, products, orders, categories, media, settings.
- A full description at
/openapi.json, so your editor, your client generator or your AI assistant can read the contract instead of guessing it. - Scoped API keys. A key grants only the resources you name and is denied everything else by default, so a storefront key cannot touch your users.
- CORS you configure, so a front end on another domain can call it directly from the browser.
- Signed webhooks when content or orders change, so your front end can rebuild or revalidate without polling.
If you build with an AI assistant
This part was designed for you rather than bolted on afterwards.
/llms.txtis a short, plain-text tour of the whole API written for a language model to read — endpoints, roles, and what each one needs.- An MCP server ships with the project, exposing 33 tools so an agent can operate the backend directly: create posts, manage the catalogue, upload media, read settings.
- Predictable responses. Every endpoint answers with the same envelope, so generated code that handles one call handles all of them.
The practical effect is that you can describe the site you want, let an assistant build the front end against a real API, and still have a proper admin panel for whoever runs the site afterwards — which is usually not the person who built it.
One caveat, while it is still true
AstroBaaS is not published to npm yet, so you cannot install the typed client into a separate project. Talk to it over plain HTTP in the meantime — that is what the API and /openapi.json are for, and nothing about the integration depends on the client library. See INTEGRATION.md in the repository.