Files
punimtag/viewer-frontend/README.md
T
ilia 655a12963b Humanize README and entry docs for clearer tone
Replace marketing feature walls with a plain install/config README and
short entry guides per project-template docs/writing-docs.md.
2026-08-05 15:33:09 -04:00

1.4 KiB

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)

See docs/PREREQUISITES.md.

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