How miznaansari/epassbook works
This is a personal expense and e-passbook application: users sign in, manage spending and balance transactions, review or settle loans/lending, and create reusable quick-access purchases. The React app provides authentication and transaction/quick-item state, while an Express API authenticates requests and persists users, transactions, and quick items in MongoDB; Firebase supports Google sign-in. The README is only a Vite template and documents no product capabilities. Some frontend and backend modules were not sampled, so their unverified internal links are omitted.
Main entry points: index.js Express server · App.tsx App and routes · TxnState.tsx Transaction state · Quickaccess.js Quick-item service
Components 24
React application
- App and routes
src/App.tsx - Login and signup
src/components/Login.tsx - Google sign-in
src/components/Google.tsx - Dashboard sections
src/components/SectionA.tsx - Transaction list
src/components/SectionC.tsx - Transaction editing
src/components/EditableModal.tsx - Loan settlement
src/components/PayBorrowModel.tsx - Transaction actions
src/components/UpdateAndDeleteModal.tsx - Quick purchases
src/components/Quick.tsx
Client state
- Authentication state
src/context/AuthState.tsx - Transaction state
src/context/TxnState.tsx - Quick-item state
src/context/QuickState.tsx
API services
- Express server
backend/index.js - Account and Google auth
backend/route/Createuser.js - Transaction service
backend/route/Transaction.js - Quick-item service
backend/route/Quickaccess.js - JWT middleware
backend/middleware/auth.js - Token checker
backend/middleware/tokenchecker.js
Persistence and identity
- User records
backend/model/User.js - Transaction records
backend/model/UserTransaction.js - Quick-item records
backend/model/QuickAccess.js
Other components
- User
- MongoDB
- Firebase Admin
backend/firebase.js
Connections 32
- User → App and routes: uses
- App and routes → Login and signup: routes to
src/App.tsx - App and routes → Dashboard sections: renders
src/App.tsx - App and routes → Authentication state: provides state
src/App.tsx - App and routes → Transaction state: provides state
src/App.tsx - App and routes → Quick-item state: provides state
src/App.tsx - Login and signup → Authentication state: uses
src/components/Login.tsx - Google sign-in → Firebase Admin: uses
src/components/Google.tsx - Authentication state → Account and Google auth: requests login
src/context/AuthState.tsx - Authentication state → Account and Google auth: requests signup
src/context/AuthState.tsx - Dashboard sections → Transaction state: uses
src/components/SectionA.tsx - Dashboard sections → Quick-item state: uses
src/components/SectionA.tsx - Transaction list → Transaction service: fetches transactions
src/components/SectionC.tsx - Transaction list → Transaction editing: opens editor
src/components/SectionC.tsx - Transaction list → Loan settlement: opens settlement
src/components/SectionC.tsx - Transaction editing → Transaction state: uses
src/components/EditableModal.tsx - Loan settlement → Transaction state: uses
src/components/PayBorrowModel.tsx - Transaction actions → Transaction state: uses
src/components/UpdateAndDeleteModal.tsx - Quick purchases → Quick-item state: fetches and adds items
src/components/Quick.tsx - Quick purchases → Transaction state: adds purchase transaction
src/components/Quick.tsx - Express server → Account and Google auth: mounts routes
backend/index.js - Express server → Transaction service: mounts routes
backend/index.js - Express server → Quick-item service: mounts routes
backend/index.js - Express server → Token checker: checks token
backend/index.js - Express server → MongoDB: connects via
backend/index.js - Express server → Firebase Admin: verifies identity
backend/index.js - Account and Google auth → User records: reads and writes
backend/route/Createuser.js - Transaction service → JWT middleware: protects endpoints
backend/route/Transaction.js - Transaction service → Transaction records: reads and writes
backend/route/Transaction.js - Quick-item service → JWT middleware: protects endpoints
backend/route/Quickaccess.js - Quick-item service → Quick-item records: reads and writes
backend/route/Quickaccess.js - Quick-item service → Transaction records: records purchases
backend/route/Quickaccess.js