CI / skip-ci-check (pull_request) Successful in 30s
CI / python-lint (pull_request) Successful in 32s
CI / docker-ci (pull_request) Successful in 33s
CI / secret-scan (pull_request) Successful in 36s
CI / e2e (pull_request) Successful in 2m42s
CI / viewer-unit (pull_request) Successful in 3m1s
CI / admin-unit (pull_request) Successful in 3m13s
Viewer frontend
Next.js photo viewer for the PunimTag library. Talks to PostgreSQL (read path for photos; separate auth DB for site users and moderation).
Default dev URL: http://localhost:3001 (admin is :3000).
Prerequisites
- Node.js 20+ preferred (18 may work)
- PunimTag PostgreSQL schema populated
- Optional: FFmpeg (video thumbs), libvips (watermarks), Resend (email verify)
Setup
cd viewer-frontend
npm run setup
# or: npm install && npm run prisma:generate:all
cp .env.example .env # if you do not already have .env
Typical .env keys (placeholders only):
DATABASE_URL="postgresql://viewer_readonly:password@localhost:5432/punimtag"
DATABASE_URL_WRITE="postgresql://viewer_write:password@localhost:5432/punimtag"
DATABASE_URL_AUTH="postgresql://viewer_write:password@localhost:5432/punimtag_auth"
NEXTAUTH_SECRET="$(openssl rand -base64 32)"
NEXTAUTH_URL="http://localhost:3001"
UPLOAD_DIR="/path/to/pending-photos"
Grant DB roles with the SQL helpers in this folder. Check with
npm run check:permissions.
npm run dev
More docs
| Doc | Purpose |
|---|---|
| SETUP.md | Full setup |
| SETUP_AUTH.md | Auth |
| docs/FFMPEG_SETUP.md | Video thumbs |
| GRANT_PERMISSIONS.md | Postgres grants |