Recurring Activity Template Repository
Component Detail
Description
Manages persistent recurring activity templates used by coordinators for bulk registration. Templates store default activity type, duration, and description so coordinators avoid re-entering the same data for weekly recurring sessions.
recurring-template-repository
Summaries
The Recurring Activity Template Repository eliminates repetitive data entry for coordinators who run weekly or regular mentoring sessions. Instead of re-entering activity type, duration, and description every week, coordinators save a template once and reuse it indefinitely. This directly reduces administrative overhead, lowers the risk of data entry errors in official activity records, and improves coordinator satisfaction — making the platform more competitive against generic alternatives that require manual re-entry every session.
Low-complexity backend component with straightforward CRUD interfaces and no external dependencies, making it a low-risk deliverable suitable for early sprints. The primary coordination requirement is aligning the template data model with the bulk registration UI team so that pre-fill behaviour matches coordinator expectations. Scoping is clean: templates are organisation-scoped via getTemplatesByOrganization, so multi-tenancy is handled at the data layer. Testing should cover template hydration edge cases (deleted templates, updated templates mid-bulk-registration) to avoid silent failures in the bulk submission flow.
Backend data repository backed by Supabase. Templates store default activity_type, duration, and description fields and are scoped to an organisation via organizationId foreign key. getTemplatesByCoordinator and getTemplatesByOrganization are the primary read paths — index both coordinator_id and organization_id columns. getTemplateById is the hydration entry point called by the bulk registration service when pre-filling a form.
Implement soft-delete or versioning if templates can be updated while an active bulk session references them, to prevent mid-session data inconsistency. No cross-component dependencies simplify unit testing.
Responsibilities
- CRUD operations for recurring activity templates
- Fetch templates scoped to a coordinator's organization
- Provide template hydration for bulk registration pre-fill
Interfaces
createTemplate(RecurringTemplate template)
getTemplatesByCoordinator(String coordinatorId)
getTemplatesByOrganization(String organizationId)
updateTemplate(String id, RecurringTemplate update)
deleteTemplate(String id)
getTemplateById(String id)
Relationships
Related Data Entities (1)
Data entities managed by this component