How anikkapat/ai-finance-tracker works
PennyPal is a personal-finance web app for managing accounts, recording income and expenses, and reviewing budgets and financial activity. The main flow is account setup and transaction entry, with optional receipt extraction, followed by dashboard/account views backed by server actions and PostgreSQL. The README also describes Gemini insights, scheduled email workflows, Clerk authentication, and Arcjet rate limiting. Some of those capabilities are documented but not fully shown in the sampled source, so those links are marked as unverified where appropriate.
Main entry points: transaction.js Transaction actions · page.jsx Dashboard · prisma.js PostgreSQL via Prisma · transaction-form.jsx Transaction entry
Components 25
User experience
- Dashboard
app/(main)/dashboard/page.jsx - Account detail
app/(main)/account/[id]/page.jsx - Account creation
components/create-account-drawer.jsx - Transaction entry
app/(main)/transaction/_components/transaction-form.jsx - Receipt scanner
app/(main)/transaction/_components/recipt-scanner.jsx - Transaction table
app/(main)/account/_components/transaction-table.jsx - Account chart
app/(main)/account/_components/account-chart.jsx - Dashboard widgets
app/(main)/dashboard/_components/account-card.jsx - Budget progress
app/(main)/dashboard/_components/budget-progress.jsx - Transaction overview
app/(main)/dashboard/_components/transaction-overview.jsx
Finance workflows
- Account actions
actions/account.js - Dashboard actions
actions/dashboard.js - Budget actions
actions/budget.js - Transaction actions
actions/transaction.js - Input validation
app/lib/schema.js - Finance categories
data/categories.js
Platform services
- PostgreSQL via Prisma
lib/prisma.js - Clerk authentication
- Arcjet rate limiting
lib/arcjet.js - Gemini AI
Background jobs
- Inngest endpoint
app/api/inngest/route.js - Scheduled workflows
lib/inngest/function.js - Email delivery
lib/send-email.js - Email template
emails/template.jsx
Other components
- Finance user
Connections 30
- Finance user → Account creation: creates account
components/create-account-drawer.jsx - Account creation → Dashboard actions: calls createAccount
components/create-account-drawer.jsx - Finance user → Transaction entry: records activity
- Transaction entry → Transaction actions: submits transaction
app/(main)/transaction/_components/transaction-form.jsx - Transaction entry → Input validation: validates input
app/(main)/transaction/_components/transaction-form.jsx - Transaction entry → Receipt scanner: offers scanning
app/(main)/transaction/_components/transaction-form.jsx - Receipt scanner → Transaction actions: requests extraction
- Transaction actions → Gemini AI: extracts receipt data
actions/transaction.js - Transaction actions → Arcjet rate limiting: checks limits
actions/transaction.js - Transaction actions → PostgreSQL via Prisma: reads and writes
actions/transaction.js - Transaction actions → Clerk authentication: authenticates user
actions/transaction.js - Account actions → PostgreSQL via Prisma: reads and writes
actions/account.js - Account actions → Clerk authentication: authenticates user
actions/account.js - Dashboard actions → PostgreSQL via Prisma: reads and writes
actions/dashboard.js - Dashboard actions → Arcjet rate limiting: checks limits
actions/dashboard.js - Budget actions → PostgreSQL via Prisma: reads and writes
actions/budget.js - Dashboard → Dashboard actions: loads dashboard data
app/(main)/dashboard/page.jsx - Dashboard → Budget actions: loads budget
app/(main)/dashboard/page.jsx - Dashboard → Dashboard widgets: renders accounts
app/(main)/dashboard/page.jsx - Dashboard → Budget progress: renders budget
app/(main)/dashboard/page.jsx - Dashboard → Transaction overview: renders activity
app/(main)/dashboard/page.jsx - Account detail → Account actions: loads account
app/(main)/account/[id]/page.jsx - Account detail → Transaction table: renders transactions
app/(main)/account/[id]/page.jsx - Account detail → Account chart: renders trends
app/(main)/account/[id]/page.jsx - Transaction actions → Finance categories: uses categories
- Inngest endpoint → Scheduled workflows: registers handlers
app/api/inngest/route.js - Scheduled workflows → Email template: renders email
lib/inngest/function.js - Scheduled workflows → Email delivery: sends email
lib/inngest/function.js - Scheduled workflows → PostgreSQL via Prisma: reads finance data
lib/inngest/function.js - Dashboard → Gemini AI: offers AI insights