How uttamkamar/loan-book works
This is a private-lending ledger for managing loans, repayments, borrower records, and supporting files. A lender uses the React dashboard to review balances, create or edit loans, record interest-first repayments and extensions, inspect loan dossiers, and import or export Excel data. The SPA calls an Express API, which applies loan-state accounting and persists records through a MySQL/SQLite database layer; uploaded documents and images are stored on disk. The backend excerpts are partial, so some capability links are documented rather than verified in route handlers.
Main entry points: App.jsx Dashboard app · index.js Express API · db.js Database adapter · client.js REST client
Components 22
Ledger dashboard
- Dashboard app
src/App.jsx - Privacy controls
src/components/Navbar.jsx - Financial overview
src/components/StatsOverview.jsx - Loan ledger
src/components/LoanTable.jsx - Loan entry form
src/components/LoanFormModal.jsx - Repayment modal
src/components/InstallmentModal.jsx - Loan dossier
src/components/FullLoanDetailsModal.jsx - Paperwork manager
src/components/PaperworkModal.jsx - Collateral gallery
src/components/CollateralGalleryModal.jsx - Payment proof viewer
src/components/PaymentProofGalleryModal.jsx - Excel transfer
src/components/ExcelModal.jsx
Loan application API
- REST client
src/api/client.js - Express API
server/index.js - Upload handling
server/middleware/upload.js
Loan accounting
- Interest accounting
server/utils/interest.js - Excel processing
server/utils/excel.js
Data and files
- Database adapter
server/config/db.js - Loan database
server/db/schema.sql - Uploaded files
uploads
Other components
- Lender
- MySQL
- SQLite fallback
Connections 24
- Lender → Dashboard app: uses
README.md - Dashboard app → Privacy controls: renders
src/App.jsx - Dashboard app → Financial overview: renders
src/App.jsx - Dashboard app → Loan ledger: renders
src/App.jsx - Dashboard app → Loan entry form: renders
src/App.jsx - Dashboard app → Repayment modal: renders
src/App.jsx - Dashboard app → Loan dossier: renders
src/App.jsx - Dashboard app → Paperwork manager: renders
src/App.jsx - Dashboard app → Collateral gallery: renders
src/App.jsx - Dashboard app → Payment proof viewer: renders
src/App.jsx - Dashboard app → Excel transfer: renders
src/App.jsx - Dashboard app → REST client: loads and mutates
src/App.jsx - Excel transfer → REST client: imports through
src/components/ExcelModal.jsx - Loan dossier → Payment proof viewer: opens viewer
src/components/FullLoanDetailsModal.jsx - REST client → Express API: requests API
src/api/client.js - Express API → Database adapter: queries
server/index.js - Express API → Upload handling: uses middleware
server/index.js - Express API → Interest accounting: calculates loan state
server/index.js - Express API → Excel processing: handles spreadsheets
server/index.js - Database adapter → MySQL: connects by default
README.md - Database adapter → SQLite fallback: fails over
README.md - Database adapter → Loan database: uses schema
- Express API → Uploaded files: stores uploads
server/index.js - Upload handling → Uploaded files: writes files
server/middleware/upload.js