Phase 7: serve the vet sample from the template tools and docs

- build.py: _TEMPLATE_COMPONENTS rewritten around the vet sample (53 kinds —
  per-resource slices, jobs, worked appointment_reminder family, tests);
  seed tokens dropped from the manifest ('sample: vet' instead)
- registry.py: get_app_component(kind) no longer renames item/example seeds;
  prompts and tool docs updated to 'copy a slice and adapt'
- templates/README.md, 01_build_recipe, 40_ui_admin, wiki/03 updated off the
  old seed scheme; repo inventory/config now exclude vet (docs move under
  standards; react/vet itself is deleted in a later phase)
- regenerated MCP bundle, vendored templates, and site output
This commit is contained in:
2026-10-20 14:58:17 +05:30
parent 56aa1322fb
commit 0cb35d10a6
107 changed files with 3292 additions and 937 deletions

View File

@@ -0,0 +1,3 @@
"""# Summary
Appointments domain ports."""

View File

@@ -0,0 +1,25 @@
"""# Summary
Appointments persistence ports — integer-id document and repository factory.
"""
from mongo_ops import BaseDocument
from pydantic import Field
from domain.appointments.models import Appointment
from infra.db.repos import create_repo
class AppointmentDocument(Appointment, BaseDocument):
"""Persisted appointment document. The integer ``id`` shadows the ObjectId."""
id: int | None = Field(default=None, validation_alias="_id")
def create_appointment_repo():
"""Create the appointment repository selected by ``settings.repo_backend``.
Returns:
IntIdMemoryRepository | IntIdMongoRepository: Repository wired to the
``appointments`` collection/store.
"""
return create_repo("appointments", AppointmentDocument)

View File

@@ -0,0 +1,34 @@
"""# Summary
CRUD service wiring for the appointment aggregate via the hexa container.
"""
from hexa import build
from domain.appointments.models import Appointment
from domain.appointments.ports.db import AppointmentDocument
from infra.adapters.service import CrudsServiceAdaptor
class AppointmentCrudsService(CrudsServiceAdaptor[Appointment, AppointmentDocument]):
"""Appointment CRUD service resolving :class:`AppointmentDocument` from a repo.
Notes:
Instances are created by :func:`get_appointment_service`. The ``model``
and ``schema`` class attributes bind the domain model and its document.
"""
model = Appointment
schema = AppointmentDocument
def get_appointment_service(repo) -> AppointmentCrudsService:
"""Build an appointment CRUD service wired to ``repo``.
Args:
repo (Any): Integer-id appointment repository from
:func:`create_appointment_repo`.
Returns:
AppointmentCrudsService: Ready-to-use appointment CRUD service.
"""
return build(AppointmentCrudsService, instances={"repo": repo})