LumenDev Invoice — project context
What it is
Invoice management app: invoices, projects, default company settings stored in MongoDB. Receipt is not a separate collection — same invoice document rendered with a receipt PDF variant after (or during draft preview) paid semantics; receipt number derived from invoice number where applicable (INV-* → RCP-*).
Technical anchor (verified from app repo)
- Framework: Next.js 16 App Router,
src/app/
- Data: Mongoose models
Invoice, Project, Settings (src/models/)
- API: REST route handlers under
src/app/api/ (invoices, projects, settings, next invoice number, migrate)
- PDF: Client-side
@react-pdf/renderer (PDFViewer, downloadInvoicePDF)
- Env:
MONGODB_URI (default in code / AGENTS.md for local); auth vars validated at startup (src/env.ts) — see [[Projects/lumendev-invoice/context/authjs-implementation|Auth.js implementation]]
- Auth: Auth.js (next-auth v5), Google OAuth, JWT sessions, MongoDB adapter — evergreen [[Resources/Tech/Auth.js/Auth.js Next.js JWT Google MongoDB adapter pattern|Tech pattern]]; this repo’s paths [[Projects/lumendev-invoice/context/authjs-implementation|authjs-implementation]]; operator env/runbook in app
AGENTS.md + docs/utility/authentication.md
Hub
- [[Projects/lumendev-invoice/lumendev-invoice|MOC]]
See also
- [[Resources/Tech/Auth.js/Auth.js Next.js JWT Google MongoDB adapter pattern|Auth.js — evergreen pattern (Tech)]]
- [[Projects/lumendev-invoice/context/authjs-implementation|Auth.js — Lumen file map]]
- [[Projects/lumendev-invoice/decisions/adr-2026-05-15-nextjs-mongodb-invoice-stack-snapshot|Stack snapshot ADR]]