How hargun-preet/budgetly works
Budgetly is a personal-finance web app for recording income and expenses, setting category budgets, and reviewing financial summaries and history. Users enter the app through Clerk authentication, then configure settings and use the dashboard or transaction views; receipt scanning offers an AI-assisted entry path. The graph highlights the documented product areas and the sampled API-to-service and API-to-database interactions. Several UI components, server actions, and routes are present in the tree but were not sampled, so their internal wiring is not asserted.
Main entry points: prisma.ts Prisma client · user-settings/route.ts User settings API · categories/route.ts Category API · scan-receipt/route.ts Receipt scanning
Components 22
Entry and setup
- Sign in and sign up
app/(auth)/sign-in/[[...sign-in]]/page.tsx - Settings setup
app/wizard/page.tsx - User settings API
app/api/user-settings/route.ts
Transactions and categories
- Transaction manager
app/transactions/page.tsx - Transaction actions
app/dashboard/_actions/transactions.ts - Category API
app/api/categories/route.ts - Receipt scanning
app/api/scan-receipt/route.ts
Budgets and insights
- Dashboard
app/dashboard/page.tsx - Overview panels
app/dashboard/_components/Overview.tsx - Budget statistics
app/api/stats/budget/route.ts - Balance statistics
app/api/stats/balance/route.ts - Category statistics
app/api/stats/categories/route.ts - History view
app/dashboard/_components/History.tsx - History data API
app/api/history-data/route.ts - History periods API
app/api/history-periods/route.ts
Backend services
- Budget reset endpoint
app/api/cron/reset-budgets/route.ts - Budget reset logic
lib/budget.ts - Clerk authentication
- Gemini AI
- Prisma client
lib/prisma.ts - Application database
Other components
- User
Connections 23
- User → Sign in and sign up: signs in
- User → Dashboard: uses
- User → Transaction manager: manages
- Sign in and sign up → Clerk authentication: authenticates with
- Settings setup → User settings API: configures
- User settings API → Clerk authentication: identifies user
- User settings API → Prisma client: reads and creates
- Prisma client → Application database: queries
- Budget statistics → Clerk authentication: identifies user
- Budget statistics → Prisma client: queries
- Balance statistics → Clerk authentication: identifies user
- Balance statistics → Prisma client: queries
- Category statistics → Clerk authentication: identifies user
- Category statistics → Prisma client: queries
- History data API → Clerk authentication: identifies user
- History data API → Prisma client: queries
- History periods API → Clerk authentication: identifies user
- History periods API → Prisma client: queries
- Category API → Clerk authentication: identifies user
- Category API → Prisma client: queries
- Receipt scanning → Clerk authentication: identifies user
- Receipt scanning → Gemini AI: submits receipt image
- Budget reset endpoint → Budget reset logic: calls reset