How steffahn1/donation_manager works
Donation Manager is a ZAR-only charity platform for public campaign discovery, one-off Stripe donations, donor accounts and staff reporting. The main flow is campaign browsing → donation confirmation and hosted checkout → verified webhook status update and receipt → donor or staff views and exports. The README documents these product capabilities; source excerpts show the webhook transaction, session handling, campaign queries and staff masking. Other action and route internals are not sampled, so their links rely on documented behavior rather than inspected implementations.
Main entry points: route.ts Stripe webhook route · StaffOverview.tsx Staff dashboards · page.tsx Campaign listings · CampaignCard.tsx Campaign card
Components 24
Campaign discovery
- Campaign listings
src/app/campaigns/page.tsx - Campaign detail
src/app/campaigns/[slug]/page.tsx - Campaign card
src/components/CampaignCard.tsx
Donations and receipts
- Donation form
src/components/forms/DonateForm.tsx - Donation actions
src/app/actions/donate.ts - Checkout safeguards
src/lib/checkout-flow.ts - Stripe checkout
src/lib/stripe.ts - Stripe webhook route
src/app/api/webhooks/stripe/route.ts - Webhook processing
src/lib/stripe-webhook.ts - Receipt delivery
src/lib/receipt-sender.ts
Accounts and access
- Sessions and authorization
src/lib/auth.ts - Email verification
src/lib/verification.ts
Dashboards and exports
- Donor history
src/components/dashboard/DonorDashboard.tsx - Staff dashboards
src/components/dashboard/StaffOverview.tsx - CSV exports
src/lib/exports.ts
Application core
- Public campaign queries
src/lib/queries/campaigns.ts - Webhook database adapter
src/lib/stripe-webhook-db.ts - Scoped staff queries
src/lib/queries/staff.ts - Donation metrics
src/lib/metrics.ts - Donor privacy
src/lib/privacy.ts - CSV formatting
src/lib/csv.ts - PostgreSQL
src/lib/db.ts
Other components
- Visitor / donor
- Stripe
Connections 29
- Visitor / donor → Campaign listings: browses
- Campaign listings → Public campaign queries: loads campaigns
src/app/campaigns/page.tsx - Campaign listings → Campaign card: renders
src/app/campaigns/page.tsx - Campaign card → Campaign detail: links to
src/components/CampaignCard.tsx - Campaign card → Donation form: links to donate
src/components/CampaignCard.tsx - Campaign detail → Public campaign queries: loads campaign
src/app/campaigns/[slug]/page.tsx - Visitor / donor → Donation form: enters donation
- Donation form → Donation actions: submits
- Donation actions → Checkout safeguards: prevents duplicates
- Donation actions → Stripe checkout: starts checkout
- Stripe checkout → Stripe: creates hosted session
- Stripe → Stripe webhook route: sends event
- Stripe webhook route → Webhook processing: processes event
src/app/api/webhooks/stripe/route.ts - Stripe webhook route → Webhook database adapter: provides database
src/app/api/webhooks/stripe/route.ts - Stripe webhook route → Receipt delivery: sends after success
src/app/api/webhooks/stripe/route.ts - Webhook database adapter → PostgreSQL: runs transaction
src/lib/stripe-webhook-db.ts - Visitor / donor → Email verification: confirms email
- Email verification → Sessions and authorization: enables account access
- Sessions and authorization → PostgreSQL: reads and writes sessions
src/lib/auth.ts - Visitor / donor → Donor history: views own donations
- Donor history → Sessions and authorization: requires account
- Visitor / donor → Staff dashboards: staff views reports
- Staff dashboards → Scoped staff queries: loads scoped data
src/components/dashboard/StaffOverview.tsx - Staff dashboards → Donation metrics: computes summaries
src/components/dashboard/StaffOverview.tsx - Scoped staff queries → Donor privacy: masks donor rows
src/lib/queries/staff.ts - Scoped staff queries → PostgreSQL: queries donations
src/lib/queries/staff.ts - Staff dashboards → CSV exports: offers CSV reports
src/components/dashboard/StaffOverview.tsx - Donor history → CSV exports: offers own export
- CSV exports → CSV formatting: formats rows
src/lib/exports.ts