6232b41e5c0cbc82a3bf4ddce65dfbe75e4397ff
A Postgres restart or a downed route makes the database unreachable
(Prisma P1001: "Can't reach database server at <host>:<port>") mid
syncEventSquads — inside savePlayers' findMany during the liga squad
re-read, or at the initial event findUnique, or in the second squad
loop. The liga re-read catch logged it at warn ("liga squad re-read
failed"), paging the error loop for a transient blip, and the outer
syncEventSquads let uncaught P1001 propagate to the caller's warn.
Detect P1001 with the shared isPrismaServerUnreachable helper
(lib/pg.ts, added in BIT-32462 for the archive worker) and log at
info instead: in the liga re-read catch, return the partial result
early; in the syncEventSquads wrapper, catch P1001 from
retryOnConnectionClosed and return zeros. The next scheduled sync
retries once the server is back. Same pattern as archive/faces/
develop/autopilot (BIT-32448/32449/32450/32462).
Paperclip-Issue: BIT-32463
PhotoReport
Unified PhotoReport platform: ingest, library, Lightroom-style editor (web + desktop, real-time sync), galleries and sales (PhotoReport and ShootYourMove skins), events with instant printing, client delivery to Nextcloud, and player identification (jersey OCR + faces).
Replaces, once at parity: app.photoreport.pt, events.photoreport.pt, PhotoReport_Studio.
Final domain: app.photoreport.pt (built on the next environment until cutover).
Layout
| Path | What |
|---|---|
apps/api |
Fastify API (TypeScript): accounts, organizations, ingest, library, op log, sales, events, delivery |
apps/app |
React SPA: backoffice, library and editor; runs in the browser and in apps/desktop |
apps/site |
Next.js public sites, multi-domain |
apps/desktop |
Tauri shell: native engine, local FTP, disk, offline queue |
apps/print-agent |
Print Station agent |
infra/deploy-receiver |
Gitea webhook receiver that redeploys each container |
workers/media |
Node workers: previews, IPTC, ZIPs, emails, Nextcloud delivery |
workers/render |
Rust worker: final exports and faces (lightcraft-faces) |
workers/ml |
Python worker: jersey OCR |
engine/core |
Rust layer over LightCraft develop crates (pinned, never forked) |
engine/wasm |
Browser build of engine/core |
packages/* |
Contracts, metadata templates, UI tokens/components, SDK |
Develop
Needs Node 22, pnpm, Rust stable and a local PostgreSQL 16+.
pnpm install
cp apps/api/.env.example apps/api/.env # set DATABASE_URL, JWT_SECRET (32+ chars), NODE_ENV=development
pnpm --filter @photoreport/api exec prisma migrate deploy
PHOTOREPORT_OWNER_PASSWORD='...' pnpm --filter @photoreport/api create-owner -- \
--org-slug photoreport --org-name PhotoReport --email [email protected] --name "Your Name"
pnpm dev:api # API on :3000
pnpm --filter @photoreport/app dev # web app on :5173
pnpm --filter @photoreport/desktop dev # desktop app (same UI, native window)
Checks (same as CI):
DATABASE_URL_TEST=postgresql://.../photoreport_test pnpm -r build && pnpm -r typecheck && pnpm -r test
cargo fmt --all --check && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace
API tests truncate tables, so they only run against a database whose name ends in _test.
Architecture and decisions: docs/ARCHITECTURE.md. Rules for agents: AGENTS.md.
Description
PhotoReport unified platform: ingest, library, synced editor (web + desktop), galleries and sales, events printing, client delivery
18 MiB
0 Stars
31 Watchers
0 Forks
Releases
28
PhotoReport desktop-v0.3.33
Latest
Languages
TypeScript
88.3%
Rust
8.2%
CSS
1.6%
Shell
0.6%
Objective-C
0.5%
Other
0.7%