How alexandruciucalau/nextjs_dashboard works
This is a Next.js App Router course starter for an Acme business dashboard. A user enters through the landing page, navigates the dashboard, and views invoice and customer records; invoice search parameters feed the invoice table, which fetches filtered data from PostgreSQL. The overview presents summary cards, revenue, and recent invoices. Invoice forms and seed/query routes are also present. The sampled sources show the overview and invoice data flow directly; several unsampled route and form connections are therefore left unverified.
Main entry points: (overview)/page.tsx Overview route · invoices/page.tsx Invoices route · data.ts Dashboard data access · table.tsx Invoice table
Components 21
Entry and navigation
- Landing page
app/page.tsx - Dashboard layout
app/dashboard/layout.tsx - Sidebar navigation
app/ui/dashboard/sidenav.tsx - Navigation links
app/ui/dashboard/nav-links.tsx
Dashboard views
- Overview route
app/dashboard/(overview)/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
Record management
- Invoices route
app/dashboard/invoices/page.tsx - Invoice search
app/ui/search.tsx - Invoice table
app/ui/invoices/table.tsx - Invoice actions
app/ui/invoices/buttons.tsx - Invoice forms
app/ui/invoices/create-form.tsx - Customers route
app/dashboard/customers/page.tsx - Customer table
app/ui/customers/table.tsx
Data and operations
- Dashboard data access
app/lib/data.ts - PostgreSQL
- Seed endpoint
app/seed/route.ts - Sample records
app/lib/placeholder-data.ts - Query endpoint
app/query/route.ts
Other components
- Dashboard user
Connections 24
- Dashboard user → Landing page: opens
app/page.tsx - Landing page → Dashboard layout: links to login
- Dashboard layout → Sidebar navigation: renders
app/dashboard/layout.tsx - Sidebar navigation → Navigation links: renders
app/ui/dashboard/sidenav.tsx - Dashboard user → Overview route: opens
- Overview route → Summary cards: renders
app/dashboard/(overview)/page.tsx - Overview route → Revenue chart: renders
app/dashboard/(overview)/page.tsx - Overview route → Latest invoices: renders
app/dashboard/(overview)/page.tsx - Overview route → Dashboard data access: fetches summary
app/dashboard/(overview)/page.tsx - Revenue chart → Dashboard data access: fetches revenue
app/ui/dashboard/revenue-chart.tsx - Dashboard user → Invoices route: opens
- Invoices route → Invoice search: renders
app/dashboard/invoices/page.tsx - Invoices route → Invoice table: renders with filters
app/dashboard/invoices/page.tsx - Invoices route → Invoice actions: renders create action
app/dashboard/invoices/page.tsx - Invoice search → Invoices route: updates URL query
app/ui/search.tsx - Invoice table → Dashboard data access: fetches filtered rows
app/ui/invoices/table.tsx - Invoice table → Invoice actions: renders row actions
app/ui/invoices/table.tsx - Invoice actions → Invoice forms: opens forms
- Dashboard user → Customers route: opens
- Customers route → Customer table: displays
- Customer table → Dashboard data access: loads customer records
- Dashboard data access → PostgreSQL: queries
app/lib/data.ts - Seed endpoint → Sample records: reads seed records
app/seed/route.ts - Seed endpoint → PostgreSQL: writes seed data