# Shelter help and transparency

Publish verified shelters, track quantity pledges and reconcile the monthly Pro revenue share.

Members can browse shelters at `/help`. The directory and showcase check verification on each read. An adopted animal leaves the showcase and its shared link reports that it found a family.

## Direct support [#direct-support]

Opening the donation sheet records an anonymous `donation_opened` event. A donor copies the shelter’s Pix key into their banking app or follows the shelter’s external website. The event stores the shelter and timestamp. A signed-in member who buys supplies can pledge a quantity against an open need.

## Monthly accounts [#monthly-accounts]

The public `/transparency` page and its CSV use the same country and month. The allocation rounds 10% of net Pro revenue to the nearest cent, distributes whole cents to verified recipients and assigns leftover cents by largest remainder. A shelter ID breaks ties. The database checks the sum when the ledger transaction commits.

A paid transfer sets a receipt deadline fifteen days after payment. An overdue receipt blocks the next payment to that shelter. The report distinguishes the allocation from its payment and receipt status.

## Local examples [#local-examples]

Run `pnpm --filter @fofo/db db:seed` against a migrated local database. The example reports cover October and November 2026 for Brazil and Germany. One of the four example shelters is pending verification and stays outside the directory. All example donation destinations use reserved `.example` domains.

## Close a monthly ledger [#close-a-monthly-ledger]

Once the store statement is reconciled, run `pnpm --filter @fofo/api shelters:settle /absolute/path/to/month.json` with `DATABASE_URL` set. The command accepts a local PostgreSQL database by default. A deployment operator can pass `--production` to use the database in the deployment environment. Supply the country of the purchase and one net revenue contribution per subscriber after sales taxes and store fees.

The JSON input names the ledger owner (`organizationId`), `month` (YYYY-MM), `country` (BR or DE) and `isExample`. Each entry in the `contributions` array contains a `userId` and an integer `netRevenueCents`.

The ledger owner must exist. The allocator uses each subscriber’s latest effective choice for that store country. Unassigned contributions and choices of unavailable shelters go to the verified shelter with the largest outstanding need. Example and live settlements draw from their respective shelter pools. The command writes the ledger and scheduled or receipt-pending payouts in one transaction. Repeating the close returns the existing ledger ID. Changing any subscriber’s contribution requires an accounting correction. External transfers and their receipts are recorded separately.
