How rikhi9812/nextjs-dashboard works
This is a Next.js course-starter dashboard for viewing revenue, invoices, and customers, with invoice-management and login scaffolding. The visible workflow is dashboard or invoice/customer navigation, search and pagination through URL state, server-side data retrieval, and rendered tables or summaries. Invoice create/edit routes and action modules indicate mutation stages, though their implementations were not sampled; the login form is currently commented out. Edges reflect the sampled calls and SQL access, so some unsampled feature wiring is intentionally left unspecified.
Main entry points: invoices/page.tsx Invoice listing · dashboard/page.tsx Dashboard page · data.ts Query and formatting · latest-invoices.tsx Latest invoices
Components 19
Dashboard
- Welcome page
app/page.tsx - Dashboard page
app/dashboard/page.tsx - Summary cards
app/ui/dashboard/cards.tsx - Revenue chart
app/ui/dashboard/revenue-chart.tsx - Latest invoices
app/ui/dashboard/latest-invoices.tsx - Login page
app/login/page.tsx
Invoices
- Invoice listing
app/dashboard/invoices/page.tsx - Invoice table
app/ui/invoices/table.tsx - Create and edit forms
app/ui/invoices/edit-form.tsx - Create route
app/dashboard/invoices/create/page.tsx - Edit route
app/dashboard/invoices/[id]/edit/page.tsx
Customers
- Customer listing
app/dashboard/customers/page.tsx - Customer table
app/ui/customers/table.tsx - URL search
app/ui/search.tsx
Data and access
- Invoice actions
app/lib/actions.ts - Query and formatting
app/lib/data.ts - Postgres connection
db.ts
Other components
- User
- Postgres database
Connections 18
- User → Welcome page: opens
- User → Dashboard page: opens
- User → Invoice listing: opens
- User → Customer listing: opens
- User → Login page: opens
- Dashboard page → Summary cards: renders
- Dashboard page → Revenue chart: renders
- Dashboard page → Latest invoices: renders
- Latest invoices → Query and formatting: fetches latest
- Invoice listing → Query and formatting: counts pages
- Invoice listing → Invoice table: renders
- Invoice listing → URL search: renders
- Customer listing → Customer table: renders
- Customer table → Query and formatting: fetches customers
- URL search → Invoice listing: updates URL
- Create and edit forms → Invoice actions: submits to
- Query and formatting → Postgres connection: queries
- Postgres connection → Postgres database: connects