20 Commits
Author SHA1 Message Date
adminandClaude Opus 5.5 c474cd64ed feat: App-Store-Link und -Badge (iOS-App live)
APP_STORE_URL gesetzt (/app leitet iPhones jetzt in den App Store),
offizielles Apple-Badge neben Google Play auf Landingpage, /r/[code]
und im Footer; Texte nennen iPhone und Android.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:46:41 +02:00
adminandClaude Opus 5.5 5dbde04c6f refactor: Cron-Prüfung gemeinsam, node:crypto, tote Dateien und vercel.json raus (Deploy A)
- W1: isCronAuthorized(req) in src/lib/timing-safe-compare.ts statt fünf
  gleicher authorized()-Kopien in den Cron-Routen.
- W2: src/lib/auth.ts (getOwnerId) und src/hooks/useActivePet.ts gelöscht —
  keine Aufrufer.
- W3: vercel.json gelöscht (Crons laufen per NAS-Crontab), Vercel-Kommentare
  in den Cron-Routen entfernt, CLAUDE.md/README angepasst.
- W4: timingSafeStringEqual nutzt crypto.timingSafeEqual (Byte-Vergleich);
  proxy.ts läuft in Next 16 auf Node.

Tests für Vergleich und Cron-Prüfung; Produktions-Build lokal grün.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 13:27:33 +02:00
adminandClaude Opus 5.5 de6b36e3d3 refactor(admin): admin.ts nach Bereichen aufteilen, getActiveAds in den ads-Router
- Die 63 Admin-Prozeduren liegen jetzt nach Bereich in
  src/trpc/routers/admin-procedures/ (system, dashboard, posts, blacklist,
  users, verification, team, reports, ads, music) plus guards.ts und
  post-actions.ts. admin.ts setzt trpc.admin.* daraus zusammen (34 statt
  ~1800 Zeilen); API, Importe und Test-Mocks von assertAdmin bleiben gleich.
- getActiveAds war eine Nutzer-Prozedur für den Feed: jetzt
  trpc.ads.getActiveAds (FeedList, Tests nach ads.test.ts).

Inhalt der Prozeduren unverändert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 07:32:30 +02:00
adminandClaude Opus 5.5 77cdebec0f feat(admin): Melde-Statistik — wer oft gemeldet wird und wer oft falsch meldet
- Neue Tabelle ReportDecision (nur anhängen, ohne Fremdschlüssel): jede
  Moderationsentscheidung zu einer Meldung (bestätigt/abgewiesen) mit
  Melder und gemeldeter Seite als Momentaufnahme.
- Geschrieben von dismissReport, deletePostAsModerator, dem neuen
  upholdReport (Profil-Meldungen bestätigen) und petAdmin.delete.
- Auswertung: Abzeichen und Zahlen in der Nutzerliste, im Tier-Detail und
  in der Warteschlange („Melder: häufige Fehlmeldungen“), Tab „Auswertung“
  auf der Meldungen-Seite mit Ranglisten.
- Datenschutz: Tier gelöscht → Tier-/Beitrags-IDs anonymisiert, Konto
  gelöscht → Owner-IDs anonymisiert, Zählung der Gegenseite bleibt. Teil der
  Art.-15-Auskunft (ohne Gegenseite), Abschnitt 4e in der
  Datenschutzerklärung.

Braucht vor dem Deploy: prisma db push + prisma/enable_rls_report_decisions.sql.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 07:16:08 +02:00
adminandClaude Opus 5.5 4214a26bd7 docs: Cron vaccine-reminders im NAS-Zeitplan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 12:48:38 +02:00
adminandClaude Opus 5.5 00fb0db168 docs: CLAUDE.md — Dashboard-Kachel Tierarten
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 21:34:19 +02:00
adminandClaude Opus 5.5 efc82d636d docs: CLAUDE.md — Tierverwaltung, deletePetCompletely, Rang-Sperre
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 21:05:05 +02:00
adminandClaude Opus 5.5 7a064d8a36 docs: CLAUDE.md — Download-Weiterleitung /app
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:41:49 +02:00
adminandClaude Opus 5.5 8143e7b667 docs: CLAUDE.md — Gründungsmitglieder und Kurator-Begrüßung
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:33:30 +02:00
adminandClaude Opus 5.5 a01c58e5f0 feat: Aufräum-Job für Storys älter als 7 Tage
- /api/cron/cleanup-stories (CRON_SECRET): löscht Storys älter als 7 Tage
  samt Aufrufen, Pfoten, Kommentaren, Supabase-Bild und Mux-Asset; max. 200
  pro Lauf, Fehler einzelner Storys brechen den Lauf nicht ab
- gemeinsame Funktion deleteStoryWithMedia (src/lib/story-cleanup.ts), auch
  von stories.delete genutzt
- Datenschutzerklärung Abschnitt 6: Storys spätestens nach 7 Tagen gelöscht
- Datenexport: Story-Block heißt "stories" statt "activeStories"
- CLAUDE.md: Cron-Jobs laufen über die NAS-Crontab + docker/run-cron.sh
  (der alte Hinweis "nichts ruft trim-feeds auf" war veraltet)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:43:07 +02:00
adminandClaude Opus 5.5 32ba01f7cf refactor: altes Einladungs-Gate (InviteCode/pf_invite) durch Empfehlungsprogramm ersetzen
- Proxy-Sperre für /sign-up, INVITE_REQUIRED, set-invite/consume-invite,
  invites-Router, Admin-Invite-Seite und -Prozeduren, Startcodes in
  pets.create entfernt — Registrierung ist offen
- /join?code=… leitet auf /r/<code> um, /invite auf /einladen; alte geteilte
  Links laufen nicht ins Leere
- InviteCode-Tabelle bleibt nur als Historie (Kontolöschung räumt sie weiter auf)
- Datenschutzerklärung 4b (Empfehlungsprogramm, Herkunftsangabe, pf_ref-Cookie)
  und Nutzungsbedingungen 3b (Programmbedingungen, Bestandsschutz, Missbrauch)
- CLAUDE.md: Abschnitt "Referral program" statt "Invite system"

Build, Typecheck und alle Tests grün.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 06:35:22 +02:00
admin 92d6495cc9 docs: update deploy workflow — NAS now git pull, not manual FTP
Confirmed 2026-09-07 while deploying the Child Safety Standards page:
/Dockers/PawFeed on the NAS is its own git checkout tracking the
self-hosted Gitea remote, kept up to date via git pull rather than the
manual FTP upload this file previously described. Documents the actual
deploy steps (ssh daniel@192.168.1.222 on the standard port, git pull,
then rolling-deploy.sh) so this doesn't need rediscovering next time.
2026-09-07 19:32:44 +02:00
admin 6a61bbcc81 feat(docker): zero-downtime rolling deploy for the 3 replicas
Adds a dependency-free liveness endpoint (GET /api/health), a Docker
healthcheck against it, and docker/rolling-deploy.sh which rebuilds
the shared image once and restarts pawfeed-1/2/3 sequentially, gated
on each becoming healthy before moving to the next. Verified
zero-downtime via continuous curl monitoring through a full run
against production.
2026-08-16 13:17:04 +02:00
admin 1e060e9179 feat(docker): scale to 3 load-balanced replicas (Gitea #26)
Next.js standalone is single-process, so one container only used one
CPU core. A load test hit a hard ceiling at ~60-65 req/sec with one
core pegged at 133% while 3 cores sat idle. Now runs as pawfeed-1/2/3
behind an NPM least_conn upstream, verified via load test showing CPU
spread evenly across all three replicas.

Also caps the Prisma pg pool per-replica via DB_POOL_MAX so 3 replicas
stay well under the Supabase pooler's connection limit.
2026-08-16 11:38:05 +02:00
admin 4daac56bfe feat(species): add Chinchilla and Aquarium (Gitea #25)
Chinchilla joins the small-pet species as its own Species (breeds are
color varieties: Standard Grey, Beige, Black Velvet, etc.).

Aquarium models the tank/setup as the pet identity rather than an
individual fish, matching how aquarists actually showcase their hobby —
Breed is the predominant fish species kept (Betta, Guppy, Discus, Koi,
etc.), same pattern as Bird covering many bird types via Breed. Pure
seed-data addition, no schema/code changes needed.
2026-08-15 12:13:48 +02:00
admin 1ee2b53a57 feat(species): expand taxonomy to 14 species, add Arachnophobie-Helfer
Add Horse, Rabbit, Guinea Pig, Hamster, Mouse, Rat, Snake, Lizard, Turtle,
Gecko, and Spider as Species (with breed taxonomies + DE translations),
alongside the existing Dog/Cat/Bird. The species/breed system was already
fully data-driven (pet creation, onboarding, ad targeting all read
pets.listSpecies/listBreeds dynamically), so this is mostly seed data.

Spiders get dedicated handling: an opt-in Owner.hideSpiders preference
(offered once during onboarding via ArachnophobiaOptIn, always
re-toggleable on /pets via HideSpidersToggle) fully excludes Species=Spider
pets/posts from feed, explore, and search when enabled.
2026-08-15 11:57:24 +02:00
adminandClaude Sonnet 5 19f22102df feat(mail): use branded HTML template with personalized greeting (Gitea #21)
GDPR export emails were unstyled HTML with a bare "Hallo," greeting.
Adds a landing-page-branded email shell (orange gradient header, paw
wordmark) and pulls the owner's first name from their Clerk profile
for the salutation, falling back to "Hallo," when unavailable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 15:13:08 +02:00
adminandClaude Sonnet 5 f14be58c06 feat: engagement-counter denormalization, pagination fixes, dead-code cleanup
Bundles the 2026-07-12 code-audit session (Clusters A/B/C/D partial/E/F):
denormalized Post/Advertisement reaction/comment/repost counters synced
transactionally instead of live _count queries; real cursor-based pagination
for followers/following/blocks lists; assertPetOwnership + formatRelativeTime
centralized; dead r2.ts + AWS SDK deps removed; missing DB indexes added;
account-deletion flow, mention notifications, pull-to-refresh feed, and
mobile UI/i18n fixes from the surrounding sessions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 19:22:23 +02:00
admin eeab28e8cb chore: rename project from OnlyPets to PawFeed (domain: pawfeed.org) 2026-06-06 11:51:45 +02:00
admin 1e7d511204 docs: create roadmap (7 phases) 2026-06-05 16:38:59 +02:00