How rajesh-kumar495/my-finance-app works
This is a multi-role lending and finance application with an associated used-bike marketplace. Financiers manage offices, customers and loans; repayments, income and expenses feed reporting. Borrowers can request loans and track repayment status, while marketplace users browse and list bikes and financiers can register interest. The tree also shows office administration, financier approval and consulting workflows. Connections below follow sampled route behavior and explicit calls; many other routes and their client wiring are represented by their exact tree paths but were not sampled.
Main entry points: prisma.ts Application database · validateUserOfficeAccess.ts Office access checks · add/route.ts Create customer loan · loan-requests/route.ts Loan requests
Components 23
Access and offices
- Authentication
src/app/api/auth/[...nextauth]/route.ts - Office settings
src/app/api/office/update/route.ts - Office access checks
src/lib/validateUserOfficeAccess.ts
Lending operations
- Customer management
src/app/financier/components/customers/CustomerList.tsx - Create customer loan
src/app/api/customers/add/route.ts - Loan requests
src/app/api/loan-requests/route.ts - Repayment tracking
src/app/api/repayments/markpaid/route.ts - Borrower loan dashboard
src/app/user/loan-dashboard/page.tsx
Accounting and reports
- Income records
src/app/api/income/route.ts - Expense records
src/app/api/expenses/route.ts - Finance reports
src/app/api/reports/overall-incomes/route.ts - Financier dashboard
src/app/financier/components/home/DashboardHomePage.tsx
Bike marketplace
- Bike listings
src/app/api/bikes/route.ts - Bike search
src/app/user/components/SearchBikeClient.tsx - Finance interest
src/app/api/bike-interest/[bikeId]/route.ts - Consulting marketplace
src/app/consulting/components/ConsultingBikesPage.tsx
Administration and consulting
- Financier approval
src/app/api/approve-financier/route.ts - Marketplace enquiries
src/app/api/enquiries/route.ts
Other components
- Financier or accountant
- Borrower
- Marketplace user
- Application database
src/lib/prisma.ts - Supabase image storage
src/lib/supabaseAdmin.ts
Connections 16
- Customer management → Create customer loan: creates loan
- Create customer loan → Office access checks: checks access
- Create customer loan → Application database: creates customer, bike; updates cash
- Loan requests → Office access checks: checks access
- Loan requests → Application database: reads and writes requests
- Repayment tracking → Office access checks: checks access
- Repayment tracking → Application database: updates repayment balance
- Income records → Office access checks: checks access
- Income records → Application database: reads and writes income
- Expense records → Office access checks: checks access
- Expense records → Application database: reads and writes expenses
- Finance reports → Office access checks: checks access
- Finance reports → Application database: reads income and repayments
- Bike search → Finance interest: posts interest
- Finance interest → Application database: records interest
- Create customer loan → Supabase image storage: deletes customer images