├── .nvmrc
├── bun.lockb
├── pb-seed
├── seed-data.zip
└── pb_schema.json
├── public
├── hero-desktop.png
├── hero-mobile.png
└── customers
│ ├── amy-burns.png
│ ├── balazs-orban.png
│ ├── evil-rabbit.png
│ ├── jared-palmer.png
│ ├── lee-robinson.png
│ ├── steph-dietz.png
│ ├── steven-tey.png
│ ├── emil-kowalski.png
│ ├── hector-simpson.png
│ ├── delba-de-oliveira.png
│ ├── guillermo-rauch.png
│ └── michael-novotny.png
├── next.config.js
├── postcss.config.js
├── app
├── dashboard
│ ├── (overview)
│ │ ├── loading.tsx
│ │ └── page.tsx
│ ├── layout.tsx
│ ├── invoices
│ │ ├── [id]
│ │ │ └── edit
│ │ │ │ ├── not-found.tsx
│ │ │ │ └── page.tsx
│ │ ├── create
│ │ │ └── page.tsx
│ │ ├── error.tsx
│ │ └── page.tsx
│ └── customers
│ │ └── page.tsx
├── ui
│ ├── fonts.ts
│ ├── global.css
│ ├── acme-logo.tsx
│ ├── button.tsx
│ ├── invoices
│ │ ├── status.tsx
│ │ ├── breadcrumbs.tsx
│ │ ├── buttons.tsx
│ │ ├── pagination.tsx
│ │ ├── table.tsx
│ │ ├── create-form.tsx
│ │ └── edit-form.tsx
│ ├── dashboard
│ │ ├── sidenav.tsx
│ │ ├── nav-links.tsx
│ │ ├── cards.tsx
│ │ ├── revenue-chart.tsx
│ │ └── latest-invoices.tsx
│ ├── search.tsx
│ ├── login-form.tsx
│ ├── customers
│ │ └── table.tsx
│ └── skeletons.tsx
├── login
│ └── page.tsx
├── layout.tsx
├── lib
│ ├── pb.ts
│ ├── utils.ts
│ ├── definitions.ts
│ ├── actions.ts
│ ├── placeholder-data.js
│ └── data-pb.ts
└── page.tsx
├── .gitignore
├── middleware.ts
├── tailwind.config.ts
├── tsconfig.json
├── package.json
└── README.md
/.nvmrc:
--------------------------------------------------------------------------------
1 | 18
2 |
--------------------------------------------------------------------------------
/bun.lockb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/bun.lockb
--------------------------------------------------------------------------------
/pb-seed/seed-data.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/pb-seed/seed-data.zip
--------------------------------------------------------------------------------
/public/hero-desktop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/hero-desktop.png
--------------------------------------------------------------------------------
/public/hero-mobile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/hero-mobile.png
--------------------------------------------------------------------------------
/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {};
3 |
4 | module.exports = nextConfig;
5 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | };
7 |
--------------------------------------------------------------------------------
/public/customers/amy-burns.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/amy-burns.png
--------------------------------------------------------------------------------
/public/customers/balazs-orban.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/balazs-orban.png
--------------------------------------------------------------------------------
/public/customers/evil-rabbit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/evil-rabbit.png
--------------------------------------------------------------------------------
/public/customers/jared-palmer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/jared-palmer.png
--------------------------------------------------------------------------------
/public/customers/lee-robinson.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/lee-robinson.png
--------------------------------------------------------------------------------
/public/customers/steph-dietz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/steph-dietz.png
--------------------------------------------------------------------------------
/public/customers/steven-tey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/steven-tey.png
--------------------------------------------------------------------------------
/public/customers/emil-kowalski.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/emil-kowalski.png
--------------------------------------------------------------------------------
/public/customers/hector-simpson.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/hector-simpson.png
--------------------------------------------------------------------------------
/public/customers/delba-de-oliveira.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/delba-de-oliveira.png
--------------------------------------------------------------------------------
/public/customers/guillermo-rauch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/guillermo-rauch.png
--------------------------------------------------------------------------------
/public/customers/michael-novotny.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mez/nextjs-pocketbase-dashboard/HEAD/public/customers/michael-novotny.png
--------------------------------------------------------------------------------
/app/dashboard/(overview)/loading.tsx:
--------------------------------------------------------------------------------
1 | import DashboardSkeleton from "@/app/ui/skeletons"
2 |
3 | export default function Loading() {
4 | return (
5 |
Acme
11 |Could not find the requested invoice.
10 | 14 | Go Back 15 | 16 |{link.name}
42 | 43 | ); 44 | })} 45 | > 46 | ); 47 | } 48 | -------------------------------------------------------------------------------- /app/dashboard/invoices/page.tsx: -------------------------------------------------------------------------------- 1 | import Pagination from '@/app/ui/invoices/pagination'; 2 | import Search from '@/app/ui/search'; 3 | import Table from '@/app/ui/invoices/table'; 4 | import { CreateInvoice } from '@/app/ui/invoices/buttons'; 5 | import { lusitana } from '@/app/ui/fonts'; 6 | import { InvoicesTableSkeleton } from '@/app/ui/skeletons'; 7 | import { Suspense } from 'react'; 8 | import { fetchInvoicesPages } from '@/app/lib/data-pb'; 9 | import { Metadata } from 'next'; 10 | 11 | 12 | export const metadata: Metadata = { 13 | title: 'Invoices', 14 | } 15 | 16 | export default async function Page({ 17 | searchParams, 18 | }: { 19 | searchParams?: { 20 | query?: string; 21 | page?: string; 22 | }; 23 | }) { 24 | const query = searchParams?.query || ''; 25 | const currentPage = Number(searchParams?.page) || 1; 26 | 27 | const totalPages = await fetchInvoicesPages(query); 28 | 29 | return ( 30 |64 | {value} 65 |
66 |18 | Welcome to Acme. This is the example for the{' '} 19 | 20 | Next.js Learn Course 21 | 22 | , brought to you by Vercel. 23 |
24 | 28 | Log in 29 | 30 |No data available.
; 24 | } 25 | 26 | return ( 27 |{label}
41 | ))} 42 |53 | {month.month} 54 |
55 |42 | {invoice.name} 43 |
44 |45 | {invoice.email} 46 |
47 |52 | {invoice.amount} 53 |
54 |{invoice.name}
38 |{invoice.email}
40 |46 | {formatCurrency(invoice.amount)} 47 |
48 |{formatDateToLocal(invoice.date)}
49 || 62 | Customer 63 | | 64 |65 | Email 66 | | 67 |68 | Amount 69 | | 70 |71 | Date 72 | | 73 |74 | Status 75 | | 76 |77 | Edit 78 | | 79 |
|---|---|---|---|---|---|
|
88 |
89 |
98 | {invoice.name} 97 | |
99 | 100 | {invoice.email} 101 | | 102 |103 | {formatCurrency(invoice.amount)} 104 | | 105 |106 | {formatDateToLocal(invoice.date)} 107 | | 108 |
109 | |
111 |
112 |
113 |
116 | |
117 |
{customer.name}
39 |42 | {customer.email} 43 |
44 |Pending
49 |{customer.total_pending}
50 |Paid
53 |{customer.total_paid}
54 |{customer.total_invoices} invoices
58 || 66 | Name 67 | | 68 |69 | Email 70 | | 71 |72 | Total Invoices 73 | | 74 |75 | Total Pending 76 | | 77 |78 | Total Paid 79 | | 80 |
|---|---|---|---|---|
|
87 |
88 |
97 | {customer.name} 96 | |
98 | 99 | {customer.email} 100 | | 101 |102 | {customer.total_invoices} 103 | | 104 |105 | {customer.total_pending} 106 | | 107 |108 | {customer.total_paid} 109 | | 110 |
| 183 | Customer 184 | | 185 |186 | Email 187 | | 188 |189 | Amount 190 | | 191 |192 | Date 193 | | 194 |195 | Status 196 | | 197 |201 | Edit 202 | | 203 |
|---|