Architecture
Spandrel has three phases: compile, store, serve.
- Compile — walk a directory tree of markdown files, parse frontmatter, resolve hierarchy and links, produce a graph of nodes and edges.
- Store — write the compiled graph to a storage backend. In-memory for local dev, Postgres for production. Any backend that satisfies the GraphStore interface works.
- Serve — expose the graph through GraphQL. MCP and web UIs are clients of the GraphQL API. Access control is enforced in the GraphQL layer.
All clients — MCP, web UI, CLI — go through GraphQL. There is one query surface and one enforcement point.