How academic-and-personal-projects/tontine-pilot works
TontinePilot is a bilingual web app for managing community rotating-savings groups. Members sign in, work with group and cycle data, declare contributions by text or receipt, and use alerts, recommendations, audio summaries, assistant actions, and ledger export to manage the tontine. The README documents AppSync dispatch to Lambda workflows and storage; sampled handlers confirm several data reads and external-service calls. Some UI-to-backend wiring and unsampled workflow internals are represented only where the README explicitly describes them.
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 - Tonti assistant
components/app/assistant-chat.tsx - Ledger export
app/(app)/export/page.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
Messaging and AI
- Bedrock models
- SES and SNS
Media services
- Textract OCR
- Polly speech
- 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: manages group
- 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 group context
- Declaration parsing → Bedrock models: extracts details
- Receipt OCR → Group ledger: reads group context
- Receipt OCR → Receipt and audio storage: reads receipt
- Receipt OCR → Textract OCR: extracts text
- Receipt OCR → Bedrock models: parses image
- 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 worker
- Group welcome notices → Group ledger: reads group members
- Group welcome notices → SES and SNS: sends welcome