iktakahiro/dddpy
51.0
Adequate · 9 November 2026
1.5k
lines of production code
Python
primary language
7
measurements over time
What this system is
Features
Add SQLite database configuration and table creation utilities
New files have been added to the SQLite infrastructure module to provide database configuration and session management. This includes a database engine setup for SQLite with thread-safety enabled, a session factory with automatic flushing, a declarative base class for SQLAlchemy models, and a utility function to create all defined database tables.
dddpy/infrastructure/sqlite · high confidence
Add SQLite persistence layer for Todo items
This change introduces the infrastructure components required to persist Todo data using SQLite via SQLAlchemy. It adds a TodoDTO model to map domain entities to database rows, a TodoRepositoryImpl to handle CRUD operations (including fetching up to 20 items ordered by newest first), and exposes these through the infrastructure package's \_\init\\_.py.
dddpy/infrastructure/sqlite/todo · high confidence
Define TodoRepository protocol for persistence abstractions
The domain layer now exposes a \TodoRepository\ interface defined as a \typing.Protocol\ within the \dddpy.domain.todo.repositories\ package. This protocol specifies the contract for todo persistence operations, including \save\, \find\_by\_id\, \find\_all\, and \delete\, allowing implementations to be decoupled from specific storage mechanisms while ensuring type safety for todo entity interactions.
dddpy/domain/todo/repositories · high confidence
Expose Todo domain components via package init
The Todo domain package now explicitly exposes its submodules (entities, exceptions, repositories, value\objects) through the \\init\\_.py file, allowing consumers to import these components directly from the domain package rather than navigating the internal directory structure.
dddpy/domain/todo · high confidence
Expose todo use case module via package init
The dddpy/usecase package now explicitly exposes the 'todo' sub-module, allowing users to import it directly from the package namespace (e.g., from dddpy.usecase import todo).
dddpy/usecase · high confidence
Initial infrastructure package with DI and SQLite adapters
The dddpy/infrastructure package is introduced, providing a standardized entry point that exposes dependency injection (di) and SQLite (sqlite) adapters. This establishes the foundational wiring for infrastructure components within the application.
dddpy/infrastructure · high confidence
Initial release of the DDD Todo API application
This entry introduces the complete DDD Todo API application, including the FastAPI bootstrap in main.py, the Onion Architecture directory structure (domain, usecase, infrastructure, presentation), and the associated development tooling. The application is configured for Python 3.13+ using uv for dependency management, ruff for linting/formatting, and pyrefly for type checking. It includes a logging configuration, a Makefile for common tasks, and comprehensive documentation in both English and Japanese.
(repo-wide) · high confidence
Introduce Todo application use cases with Protocol-based interfaces
The \dddpy/usecase/todo\ package now provides the application-layer logic for managing Todo entities. This change introduces seven distinct use cases—Create, Start, Complete, Update, Delete, FindById, and FindAll—each defined via a \typing.Protocol\ interface and implemented with concrete classes that enforce lifecycle state validation (e.g., preventing completion of unstarted items) and error handling (e.g., raising \TodoNotFoundError\). Factory functions (\new\\\) are provided to instantiate these use cases with a \TodoRepository\, exposing a clean, dependency-injection-friendly API for the rest of the application.
dddpy/usecase/todo · high confidence
Introduce Todo domain value objects and exceptions
The Todo domain now includes dedicated value objects for managing core attributes: TodoId (with UUID generation), TodoTitle (enforcing required, 100-character limit), TodoDescription (enforcing 1000-character limit), and TodoStatus (defining NOT\_STARTED, IN\_PROGRESS, and COMPLETED states). Additionally, specific domain exceptions have been added to handle lifecycle constraints, including errors for missing todos, attempting to start or complete an already completed/started todo, and acting on a todo that has not been started.
_dddpy/domain/todo/value\objects · high confidence
Introduces dependency injection wiring for the Todo module
The application now includes a dedicated dependency injection configuration in \dddpy/infrastructure/di/injection.py\. This file establishes the wiring for the Todo domain by defining a FastAPI-compatible session provider (\get\_session\) that manages SQLAlchemy database sessions, and exposes factory functions for the \TodoRepository\ and all associated use cases (Create, Read, Update, Delete, Start, Complete). This centralizes the instantiation of Todo-related business logic, ensuring that use cases receive their required repository dependencies automatically through FastAPI's dependency system.
dddpy/infrastructure/di · high confidence
Behavioural changes
2 commits (0 fixes) modifying dddpy/presentation
A change to existing behaviour in dddpy/presentation — 2 commits, 1 file: “\[WIP\] Implementation”; “refactor(presentation): standardize \_\init\\_.py format”.
dddpy/presentation · medium confidence · unverified
4 commits (0 fixes) modifying dddpy/domain/todo/exceptions
A change to existing behaviour in dddpy/domain/todo/exceptions — 4 commits, 5 files: “refactor: reorganize Todo domain structure by moving exceptions and entities to dedicated modules, and update imports accordingly”; “doc(domain): align todo docstrings with style guide”; “refactor(domain): enforce todo lifecycle transitions in the entity”; and 1 more.
dddpy/domain/todo/exceptions · medium confidence · unverified
Introduce structured Todo API presentation layer with Pydantic schemas and route handlers
The presentation layer for the Todo resource has been reorganized into a structured API package under \dddpy/presentation/api/todo\. This change introduces dedicated Pydantic schemas (\TodoCreateSchema\, \TodoUpdateSchema\, \TodoSchema\) for validating request payloads and serializing responses, as well as specific error message models (e.g., \ErrorMessageTodoNotFound\) to standardize API error responses. The previous \TodoController\ has been replaced by \TodoApiRouteHandler\, which explicitly registers HTTP endpoints (GET, POST, PUT, DELETE) on the FastAPI application, mapping domain exceptions to appropriate HTTP status codes and leveraging dependency injection for use cases. Also in this area: 1 commit (0 fixes) modifying dddpy; 2 commits (0 fixes) modifying dddpy; 4 commits (3 fixes) fixing dddpy.
dddpy/presentation/api · medium confidence · unverified
Todo entity gains overdue check capability
The Todo entity now includes an is\_overdue method that allows users to determine if a task has passed its deadline while remaining incomplete. This new behavioral capability integrates with existing status tracking, ensuring that completed tasks are never flagged as overdue.
dddpy/domain/todo/entities · high confidence
Test coverage
4 commits adding/updating tests in tests; 6 commits adding/updating tests in tests/infrastructure; Added test suite package marker; Added unit tests for Todo domain entities and value objects; Added unit tests for Todo use cases.
Dependencies
Project initialized with FastAPI 0.141.1 and SQLAlchemy 2.1.1
The project manifest (pyproject.toml) establishes the core runtime dependencies, pinning FastAPI (with standard extras) at version 0.141.1 and SQLAlchemy at 2.1.1. It also sets the minimum Python version to 3.13 and configures the build system to use Hatchling, while including development tools like Ruff and Pyrefly.
(dependencies) · high confidence
Housekeeping
Initial package structure for dddpy domain; Placeholder file added to db directory.
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 51 → 51 (+0.4)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 61 → 61 (+0.0)
- Readiness 44 → 44 (+0.0)
- Security 42 → 43 (+0.9)
- Domain Modelling 76 → 76 (+0.0)
- Performance 100 → 100 (+0.0)
Resolved (2)
- Critical vulnerability: [GHSA redacted] (uv.lock)
- Duplicated block (7 lines × 2) (dddpy/infrastructure/sqlite/todo/todo_dto.py)
New (2)
- Duplicated block (7 lines × 2) (dddpy/infrastructure/sqlite/todo/todo_dto.py)
- Scattered collaborators
Changes since last survey
- 33 commits — 27 feature/other, 6 fixes
By area
- (repo) — 10 commits
- (root) — 10 commits
- dddpy/presentation — 4 commits
- tests/infrastructure — 3 commits
- tests/presentation — 3 commits
- dddpy/domain — 2 commits
- tests/usecase — 1 commit
Notable commits
- fix: Merge pull request #20 from iktakahiro/fix/emsign-ca-distrust
- fix: fix(deps): exempt certifi from the cooldown instead of a fixed cutoff
- fix: fix(domain): use timezone-aware UTC timestamps
- fix: fix(security): update uv and certifi for emSign CA distrust
- fix: fix(todo): preserve epoch completion timestamps
- fix: fix(todo): treat naive datetimes as local time
- change: Merge pull request #21 from iktakahiro/chore/deps-cooldown-2026-10-24
- change: Merge pull request #22 from iktakahiro/chore/deps-cooldown-2026-10-27
- change: Merge pull request #23 from iktakahiro/test/sqlite-todo-repository
- change: Merge pull request #24 from iktakahiro/refactor/domain-lifecycle-invariants
- change: Merge pull request #25 from iktakahiro/agent/dddpy-20261027-2244
- change: Merge pull request #26 from iktakahiro/agent/dddpy-20261028-utc-timestamps
- change: Merge pull request #27 from iktakahiro/agent/dddpy-20261030-deps
- change: Merge pull request #28 from iktakahiro/agent/dddpy-20261103-usecase-tests
- change: Merge pull request #29 from iktakahiro/agent/dddpy-20261103-lifecycle-routes
- change: chore(deps): upgrade FastAPI to 0.149.0 within the 1-week cooldown
- change: chore(deps): upgrade FastAPI to 0.161.1 and SQLAlchemy to 2.1.6 within the 1-week cooldown
- change: chore(deps): upgrade packages within the 1-week cooldown
- change: chore(mise): update ruff to 0.17.1
- change: doc(readme): describe lifecycle rules living in the Todo entity
- …and 13 more
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
iktakahiro/dddpy was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 9 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 7173ad744e6ca5659ebca416dbee6d16434ddac9 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-bb0cb800cd0f.