ProjectBuild a Permission-Aware Knowledge Hub as an MCP Server: the explanation · Module 5: Low-level design: data, ids, API and schemas · part 7 of 22
Part 7 · Module 5: Low-level design: data, ids, API and schemas
Module 5: Low-level design: data, ids, API and schemas
23 min read·
About 50 minutes · Needs: Module 4 (the high-level design) · Code: server/wayfinder/models/__init__.py, server/alembic/versions/0001_initial_schema.py, server/wayfinder/types.py, server/wayfinder/api/routes.py, server/wayfinder/mcp/models.py
Where this fits
This module (blue) zooms into the data the server keeps in PostgreSQL and the two contracts that read it: the console's REST API and the MCP tools' schemas.
The high-level design in Module 4 drew the boxes. This module opens the database box and the two doors into it. You will see every table Wayfinder keeps, why a chunk carries its own copy of the permission label, what a source id looks like, the four shared Python types, the console's REST API and the JSON Schemas the MCP tools publish. When later modules say "the chunks table" or "a Citation", this is the module they mean.
The rest of this project is yours to keep
This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.