Merge dev into production release without education
Deploy / deploy-dev (push) Skipped
Deploy / deploy-prod (push) Successful in 3m58s

This commit is contained in:
Corey Blais committed 2026-10-05 18:18:10 -04:00
commit fc541f024d
50 files changed
+2986 -458

No files matched your search

+37
View File
@@ -112,6 +112,8 @@ curl -H "Authorization: Bearer <admin-token>" https://your-host/api/metrics
- `S3_ACCESS_KEY_ID`
- `S3_SECRET_ACCESS_KEY`
- `RESCUE_ONBOARDING_WEBHOOK_URL`
- `DISCORD_WEBHOOK_URL` as a Gitea Actions secret for deploy notifications
- `DISCORD_AVATAR_URL` as an optional Gitea Actions variable for the deploy notification icon
2. Build and start the production stack:
```bash
@@ -176,6 +178,34 @@ npm run build
npm run worker
```
### Overdue weight emails
The worker checks once per calendar day for living birds with no new weight entry in
48 hours. Each accepted owner, assistant, or caregiver receives one email per flock
listing all birds due for a reminder. The branded email embeds the FlockPal logo
and each bird's portrait (including private S3 photos), with the default portrait
used when a photo is missing or unavailable. Pending invitees and viewers are excluded.
Reminders repeat daily while overdue; adding a new weight restarts the
48-hour clock. Birds without weights use their profile creation time.
Scheduling matches hatch-day reminders: a check 15 seconds after worker startup,
then hourly, with one queued job per local date. There is no fixed morning send
time. Both use `MILESTONE_REMINDER_TIME_ZONE` (default `America/New_York`).
Delivery tracking uses local calendar dates, including daylight-saving changes.
Deploying this change removes the old five-minute Redis schedule.
The clock uses the weight entry's creation timestamp, since the measurement date
has no time of day. Editing an existing entry does not restart the clock; entering
a historical weight does. Memorialized birds are excluded.
`WEIGHT_REMINDERS_ENABLED` defaults to `true` in both Compose stacks. Set it to
`false` to disable delivery. The worker, Redis, Postgres, and existing SMTP settings
must be available. The schema initializer creates the delivery tracking table.
Missing SMTP configuration or failed sends leave reminders eligible for retry.
Delivery tracking prevents ordinary repeat sends and concurrent claims; as with
other SMTP delivery, a crash after acceptance but before saving delivery can cause
a duplicate on retry.
## Auth and flock notes
- One user can belong to multiple flocks.
@@ -259,3 +289,10 @@ This starter now includes the account and flock foundation for monetization, plu
Stripe billing should be attached to `workspaces`, not `users`. Each flock has its own billing plan, subscription status, Stripe customer ID, and Stripe subscription ID, which lets one person own multiple household flocks with separate subscriptions while rescue flocks can stay on the free rescue path.
For account design, `standard` vs `rescue` is best treated as a flock type, not as a user role. If paid plans are added later, a separate `admin account mode` is usually less flexible than flock roles such as `owner`, `assistant`, `caregiver`, and `viewer`. That lets the same underlying account system work for both households and rescues without splitting product logic into unrelated account classes.
## Customer API documentation
Open `/api/docs/` on your FlockPal instance for the interactive integration API reference,
or download `/api/openapi.json`. Locally, use `http://localhost:5000/api/docs/`.
Create a token in Settings → Integration tokens and use **Authorize** to try requests.
See [the API reference](docs/API_REFERENCE.md) for details.