How khadimmbaye0/tontine-pilot works
TontinePilot is a bilingual web app for managing community rotating-savings groups. A member signs in, selects a group, records a payment by text or receipt, and uses the shared ledger to review contributions, alerts, and rotation information. Backend functions parse declarations and receipts, support mediation and recommendations, and produce reminders, assistant actions, and audio digests. The README documents the broad frontend-to-AppSync flow; sampled handlers confirm several function-to-data and integration calls. Some UI wiring and unsampled function internals are therefore represented only at the documented subsystem level.
Main entry points: resource.ts AppSync data API · parse-receipt/handler.ts Receipt OCR · reminders-worker/handler.ts Scheduled reminders · remote.ts Remote data adapter
Components 25
Web experience
- Sign-in UI
components/auth/auth-card.tsx - Group workspace
app/(app)/dashboard/page.tsx - Declare payment
app/(app)/declare/page.tsx - Alerts and mediation
app/(app)/alerts/page.tsx - Ledger export
app/(app)/export/page.tsx - Tonti assistant
components/app/assistant-chat.tsx
Identity and ledger
- Cognito auth
amplify/auth/resource.ts - Remote data adapter
lib/remote.ts - AppSync data API
amplify/data/resource.ts - Group ledger
amplify/data/resource.ts - Receipt and audio storage
amplify/storage/resource.ts
Tontine workflows
- Declaration parsing
amplify/functions/parse-declaration/handler.ts - Receipt OCR
amplify/functions/parse-receipt/handler.ts - Empathic mediation
amplify/functions/mediate/handler.ts - Rotation recommendation
amplify/functions/recommend-rotation/handler.ts - Audio digest
amplify/functions/digest-audio/handler.ts - Assistant actions
amplify/functions/assistant/handler.ts - Scheduled reminders
amplify/functions/reminders-worker/handler.ts - Group welcome notices
amplify/functions/notify/handler.ts
AI and messaging
- Bedrock models
- Textract OCR
- Polly speech
- SES and SNS
- EventBridge Scheduler
Other components
- Group member
Connections 40
- Group member → Sign-in UI: signs in
- Sign-in UI → Cognito auth: authenticates
- Group member → Group workspace: uses
- Group workspace → Remote data adapter: requests data
- Declare payment → Remote data adapter: submits payment
- Alerts and mediation → Remote data adapter: manages alerts
- Ledger export → Remote data adapter: requests ledger
- Tonti assistant → AppSync data API: asks assistant
- Remote data adapter → AppSync data API: queries and mutates
- AppSync data API → Group ledger: reads and writes
- AppSync data API → Declaration parsing: dispatches
- AppSync data API → Receipt OCR: dispatches
- AppSync data API → Empathic mediation: dispatches
- AppSync data API → Rotation recommendation: dispatches
- AppSync data API → Audio digest: dispatches
- AppSync data API → Assistant actions: dispatches
- AppSync data API → Scheduled reminders: dispatches
- AppSync data API → Group welcome notices: dispatches
- Declaration parsing → Group ledger: reads context
- Declaration parsing → Bedrock models: extracts details
- Receipt OCR → Group ledger: reads group context
- Receipt OCR → Receipt and audio storage: reads receipt
- Receipt OCR → Bedrock models: parses image
- Receipt OCR → Textract OCR: extracts text
- Empathic mediation → Group ledger: reads alert context
- Empathic mediation → Bedrock models: drafts proposal
- Rotation recommendation → Group ledger: reads member history
- Rotation recommendation → Bedrock models: writes reasons
- Audio digest → Group ledger: reads cycle data
- Audio digest → Polly speech: synthesizes speech
- Audio digest → Receipt and audio storage: stores audio
- Assistant actions → Group ledger: reads and updates
- Assistant actions → Bedrock models: answers and routes tools
- Assistant actions → SES and SNS: sends email
- Scheduled reminders → Group ledger: reads and updates alerts
- Scheduled reminders → Bedrock models: drafts reminder
- Scheduled reminders → SES and SNS: sends reminders
- EventBridge Scheduler → Scheduled reminders: triggers
- Group welcome notices → Group ledger: reads group members
- Group welcome notices → SES and SNS: sends welcome email