How koley2000/invoiceease works
InvoiceEase is a Next.js invoice-management app. Users can sign up or sign in, create invoices, manage them from a dashboard, and edit, delete, download, or preview/print PDFs. The graph shows the documented API, authentication, persistence, and PDF-rendering layers. Several page and API implementations were not excerpted, so their connections are included only where the README or source index supports them; the dashboard’s request to its invoice API is directly excerpted.
Main entry points: prisma.ts Prisma client · InvoiceAction.tsx Invoice actions · index.ts Invoice collection API · [id].ts Single invoice API
Components 27
User experience
- Landing page
src/pages/index.tsx - Landing content
src/components/Hero.tsx - App shell
src/pages/_app.tsx - Navigation
src/components/Navbar.tsx
Authentication
- Login page
src/pages/login/index.tsx - Signup page
src/pages/signup/index.tsx - Credential validation
src/utils/userSchema.ts - NextAuth credentials
src/pages/api/auth/[...nextauth].ts - Account signup API
src/pages/api/auth/signup.ts - Session guard
src/middleware/authMiddleware.ts
Invoice management
- Invoice dashboard
src/pages/dashboard/index.tsx - Create page
src/pages/create-invoice/index.tsx - Edit page
src/pages/edit-invoice/[id].tsx - Invoice form
src/components/InvoiceForm.tsx - Invoice actions
src/components/InvoiceAction.tsx - Delete confirmation
src/components/DeleteModal.tsx - Invoice collection API
src/pages/api/invoice/index.ts - Single invoice API
src/pages/api/invoice/[id].ts - Invoice data model
src/model/Invoice.ts - Prisma client
src/lib/prisma.ts - PostgreSQL
- Table components
src/components/ui/table.tsx - Dialog components
src/components/ui/dialog.tsx
PDF documents
- PDF blob helper
src/utils/generatePdfBlob.ts - PDF generation API
src/pages/api/generate-pdf/index.ts - Classic invoice template
src/template/invoice/classic.tsx
Other components
- User
Connections 36
- User → Landing page: opens
src/pages/index.tsx - Landing page → Landing content: renders
src/pages/index.tsx - App shell → Navigation: renders
src/pages/_app.tsx - User → Login page: signs in
README.md - User → Signup page: signs up
README.md - Login page → Credential validation: validates with
src/pages/login/index.tsx - Signup page → Credential validation: validates with
src/pages/signup/index.tsx - Signup page → Account signup API: submits to
- Account signup API → Prisma client: uses
src/pages/api/auth/signup.ts - Login page → NextAuth credentials: authenticates via
- NextAuth credentials → Prisma client: uses
src/pages/api/auth/[...nextauth].ts - Session guard → NextAuth credentials: checks session
src/middleware/authMiddleware.ts - Session guard → Prisma client: looks up user
src/middleware/authMiddleware.ts - User → Invoice dashboard: manages invoices
README.md - Invoice dashboard → Invoice collection API: fetches invoices
src/pages/dashboard/index.tsx - Invoice dashboard → Table components: renders with
src/pages/dashboard/index.tsx - User → Create page: creates invoice
README.md - Create page → Invoice form: renders
src/pages/create-invoice/index.tsx - Edit page → Invoice form: renders
src/pages/edit-invoice/[id].tsx - Invoice form → Invoice actions: renders
src/components/InvoiceForm.tsx - Invoice actions → Invoice collection API: creates invoice
src/components/InvoiceAction.tsx - Invoice actions → Single invoice API: updates invoice
src/components/InvoiceAction.tsx - Invoice actions → Delete confirmation: renders
src/components/InvoiceAction.tsx - Delete confirmation → Dialog components: uses
src/components/DeleteModal.tsx - Invoice collection API → Session guard: guards requests
src/pages/api/invoice/index.ts - Single invoice API → Session guard: guards requests
src/pages/api/invoice/[id].ts - Invoice collection API → Prisma client: uses
src/pages/api/invoice/index.ts - Single invoice API → Prisma client: uses
src/pages/api/invoice/[id].ts - Invoice collection API → Invoice data model: uses type
src/pages/api/invoice/index.ts - Single invoice API → Invoice data model: uses type
src/pages/api/invoice/[id].ts - Prisma client → PostgreSQL: connects to
src/lib/prisma.ts - Invoice actions → PDF blob helper: generates blob via
src/components/InvoiceAction.tsx - PDF blob helper → PDF generation API: posts invoice to
src/utils/generatePdfBlob.ts - PDF generation API → Classic invoice template: renders with
src/pages/api/generate-pdf/index.ts - PDF generation API → Invoice data model: uses type
src/pages/api/generate-pdf/index.ts - Classic invoice template → Invoice data model: renders data
src/template/invoice/classic.tsx