Run artifact

workspace/targets/ReadingList/blueprint/ARCHITECTURE.md

ARCHITECTURE: ReadingList

FieldValue
Version20261023 V1
DescriptionModules, routes, boundaries, and technical decisions for the ReadingList web application.
Depends OnNone
Providescreate_app

Purpose

ReadingList is a small Flask web application that keeps an ordered list of books to read. A reader adds a book (title and author), views books in the order added, and removes a book. Empty titles or authors are rejected with a reason.

Technology Stack

Derived from TECHNOLOGY_STACK.md; that file remains the decision of record.

TechnologyWhere it applies
PythonImplementation language, project root, .venv environment, pyproject.toml, committed uv.lock
FlaskWeb framework behind app_server.create_app()
SQLitePersistence store behind the generated persistence package
pytestAutomated test runner, invoked as pytest -q from the application root
HTML/CSSServer-rendered pages using Jinja templates

Modules

ModuleResponsibility
app_server/__init__.pycreate_app() -> Flask application factory; registers routes, templates, and error handlers
app_server/testing.pyweb_client() returning a Flask test client with TESTING enabled
app_server/templates/Jinja templates, including base.html
persistence/Generated by Drydock from DATABASE.md; never written by hand
tests/Project pytest suite; conftest.py exposes web_client and db_session fixtures
bin/test.shPOSIX sh runner for the complete suite (owned by the verification story)

Module Ownership

BoundaryOwning moduleAllowed low-level access
Persistencepersistence/ (generated)Only this package touches the SQLite driver
Configurationapp_server/__init__.pyResolves DATABASE_URL, then DATABASE_PATH, then data/app.db
File storeNoneNot used
External servicesNoneNot used

Routes call db.books.<verb>(...) on the object returned by open_database(...). SQL, table names, and column names never appear in route code.

Routes

RouteOwnerPurpose
GET /SCREEN-ReadingList.mdReading list page
GET /booksFEATURE-ListBooks.mdJSON array of books in the order added
POST /booksFEATURE-AddBook.mdAdd a book; validation owned by the rejection features
POST /books/{id}/deleteFEATURE-RemoveBook.mdRemove a book

Technical Decisions

Programmatic Acceptance

=== AC arch-create-app ===
Intent: The application factory returns a Flask application.
Suite: scoped

from flask import Flask from app_server import create_app

app = create_app() assert isinstance(app, Flask) === END AC arch-create-app ===

=== AC arch-web-client ===
Intent: The published web_client callable yields a test client that answers an unregistered path with 404.
Suite: scoped

from app_server.testing import web_client

client = web_client() response = client.get("/arch-no-such-route") assert response.status_code == 404 === END AC arch-web-client ===

=== AC arch-project-root ===
Intent: The project root carries the dependency manifest, lockfile, and test conftest.
Suite: scoped

from pathlib import Path

for name in ("pyproject.toml", "uv.lock", "tests/conftest.py"): assert Path(name).is_file(), name === END AC arch-project-root ===

User Acceptance

Guardrails