Engineering practice / Project note
Constraints are part of the architecture
A small personal system benefits from explicit boundaries: static public pages, authenticated writes, and visible storage failures.
A small system still needs limits. Keeping costs understandable begins with the shape of the application, rather than with a promise that usage will stay low. This project’s boundaries are deliberately visible in both the code and its operating model.
Keep public reading independent
The website starts as a static build. Loading the homepage, browsing the writing, and reading an article do not wait for the data API. Public details can refresh in the background; a problem with that service leaves the fallback readable.
That separation also reduces the amount of runtime infrastructure a public page needs. Fallback content, links, and the feed are generated together and served as files. Live publishing adds public API requests, which need to be included in usage monitoring; private records remain behind authentication.
Put limits where writes happen
The Worker requires authentication before a document can be written, listed, or deleted. It accepts JSON objects and arrays, limits a document to 512 KB, and validates collection names and document IDs before constructing a storage key.
These are deliberately narrow rules. They make the allowed operations easier to reason about, without turning a personal-data service into a general database platform.
Make failures distinguishable
Storage quota failures and storage availability failures have different error codes. Requests also carry an identifier, and storage operations are logged with the operation and key.
That does not remove the need to monitor usage or back up important records. It does give an investigation a starting point: which operation failed, against which key, and under which request.
Grow from observed needs
The current system does not require file uploads, a relational database, or collaborative editing. Those capabilities should follow a real use case.
A useful constraint is one that helps explain the system today, while making it clear what would need to change tomorrow.