Kith API Bridge
This skill ensures that the "Ripple Effect" of a data model change is handled correctly across all layers of the Kith application.
The Ripple Effect Workflow
When a data model change is requested:
- •Verify SQL: Ensure a migration exists in
server/migrations/. - •Update Types: Modify the relevant TypeScript interfaces in
types/(e.g.,family.ts,activity.ts). Use camelCase for TypeScript fields. - •Audit Services: Update
FamilyService.tsandActivityService.tsto fetch/send the new fields. - •Sync Schema: Trigger the
kith-schema-maintainerto updateserver/SCHEMA.md. - •Controller Check: If the change affects the backend, update the controllers in
server/controllers/to handle the new database columns.
Guidelines
- •Naming: Always convert database
snake_caseto frontendcamelCase. - •Consistency: Refer to type-mapping.md for standard SQL-to-TS mappings.
- •Null Safety: Always check if new fields should be optional (
?) in TypeScript.