How cloudmonks-1000/invoice works
Invoice Automation is a web application for users to retrieve invoice vouchers and review processing results, with administrative views for users and system activity. The main workflow is a user submitting a voucher request, which is authenticated, recorded, resolved against Oracle-backed voucher data, and returned as a PDF or ZIP. The tree also exposes bulk upload, history/export, dashboard, and administration capabilities. Several UI-to-API connections and the bulk-processing internals are not shown in the sampled source, so those details are not inferred.
Main entry points: oracle.ts Oracle connection · App.tsx Main app · auth.ts Auth helper · route.ts Voucher download
Components 24
User interface
- Main app
src/App.tsx - Dashboard UI
src/ui-pages/Dashboard.tsx - History UI
src/ui-pages/History.tsx - Summary UI
src/ui-pages/Summary.tsx - Admin pages
app/admin
Invoice workflows
- Dashboard API
app/api/dashboard/route.ts - History API
app/api/history/route.ts - History export
app/api/history/export/route.ts - Voucher download
app/api/invoices/[voucherNumber]/route.ts - Bulk upload
app/api/invoices/bulk/upload/route.ts - Download service
src/services/voucher-download.service.ts - ZIP creation
src/utils/zip.ts
Identity and admin
- Login API
app/api/auth/login/route.ts - Session refresh
app/api/auth/refresh/route.ts - Auth routes
app/api/auth - Auth helper
src/auth/auth.ts - Login rate limit
src/security/login-rate-limit.ts - Admin APIs
app/api/admin
Oracle persistence
- Records repository
src/db/repositories/records.repository.ts - Voucher repository
src/db/repositories/voucher.repository.ts - Auth repository
src/db/repositories/auth.repository.ts - Oracle connection
src/db/oracle.ts
Other components
- User
- Oracle database
Connections 31
- User → Main app: uses
- Main app → Dashboard UI: renders
- Main app → History UI: renders
- Main app → Summary UI: renders
- User → Admin pages: uses
- Main app → Voucher download: requests vouchers
- Main app → Bulk upload: uploads files
- Voucher download → Auth helper: authenticates
- Voucher download → Records repository: records job
- Voucher download → Voucher repository: looks up vouchers
- Voucher download → ZIP creation: creates archive
- Records repository → Oracle connection: uses connection
- Voucher repository → Oracle connection: uses connection
- Oracle connection → Oracle database: connects
- Main app → Download service: downloads
- User → Login API: signs in
- Login API → Login rate limit: checks attempts
- Login API → Auth repository: finds user
- Login API → Oracle connection: creates session
- Login API → Auth repository: updates login
- Session refresh → Oracle connection: refreshes session
- Auth helper → Oracle connection: reads session
- Dashboard API → Auth helper: authenticates
- Dashboard API → Oracle connection: queries metrics
- History API → Auth helper: authenticates
- History API → Oracle connection: queries records
- History export → Auth helper: authenticates
- History export → Oracle connection: queries records
- Admin pages → Admin APIs: admin requests
- Admin APIs → Auth helper: authenticates
- Admin APIs → Oracle connection: reads and writes