NextCash is a personal finance tracker built with Next.js App Router. Authenticated users can create, edit, delete, and review monthly transactions, and view annual cashflow charts.
This README reflects the current codebase state as of March 26, 2026.
- Clerk authentication with protected
/dashboardroutes. - Dashboard with:
- Annual cashflow chart (income vs expense by month).
- Recent transactions table.
- Transaction management:
- Create transaction.
- Edit transaction.
- Delete transaction.
- Filter transactions by month and year.
- Data persisted in PostgreSQL via Drizzle ORM.
- Framework: Next.js 16 (App Router), React 19, TypeScript
- Auth: Clerk (
@clerk/nextjs) - DB + ORM: PostgreSQL + Drizzle ORM + Drizzle Kit
- Forms and validation: React Hook Form + Zod
- UI: Tailwind CSS v4, shadcn/ui-style components, Radix primitives
- Charts: Recharts
app/- App Router pages, route layouts, server actionscomponents/- reusable UI and form componentsdata/- server-side data access functionsdb/- Drizzle DB client + schemadrizzle/- SQL migration filesschemas/andvalidation/- client/server Zod schemas
Start from .env.example and create a local .env file with:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
DATABASE_URL=- Install dependencies:
pnpm install-
Ensure PostgreSQL is running and
DATABASE_URLis valid. -
Apply DB schema (choose one approach):
- Run SQL migration file manually (
drizzle/0000_tiny_speed.sql), or - Use Drizzle Kit commands in your preferred workflow.
- Start dev server:
pnpm dev- Open
http://localhost:3000.
pnpm dev- start the development serverpnpm build- build the production bundlepnpm start- run the production serverpnpm lint- run ESLintpnpm test- run Vitest unit testspnpm db:generate- generate Drizzle migrationspnpm db:migrate- apply Drizzle migrationspnpm db:push- push the schema directly to the database
categoriesid,name,type(incomeorexpense)
transactionsid,user_id,description,amount,transaction_date,category_id