Port upstream PR #22 + Lite style updates:
- lib/audit.js: server-side logAudit(req, action, userId), records
IP from x-forwarded-for / cf-connecting-ip
- login/register/create_post/create_reply record server-side
- Remove client logEvent calls (AppProvider/NewPost/ReplyList)
- Remove forgeable POST /api/event-logs endpoint
- CustomPage: fullscreen immersive (fixed, 100vh-nav, mobile 56px
nav offset) matching upstream Lite
- Replace bcrypt (native) with bcryptjs (pure JS) — no native build on serverless
- Storage abstraction (lib/storage.js): local uploads/ for traditional deploy, S3-compatible (R2/MinIO/S3 via aws4fetch) for serverless
- DB pool auto-adapts to serverless (single connection, rotation, timeouts)
- next.config.js: standalone output only when DOCKER=1 (serverless skips it)
- Docs: serverless deployment section in README, S3 env vars in .env.example
- Replace Express server with Next.js Route Handlers (16 API routes)
- Rewrite index.html SPA as React components (feed, post, admin, modals)
- Move style.css to app/globals.css with dark/light themes intact
- Add lib/db.js, lib/auth.js (JWT), lib/api.js (client API wrapper)
- Server binds 0.0.0.0 by default; host/port configurable via config.js
- Uploads served via /api/uploads route (rewrite keeps /uploads/ URLs)
- Multi-stage dockerfile using standalone output