How kamrul377/bill-apps works
FnF Online Travel Pay is a role-aware bill payment and approval console, with separate client/network inventory and operational history views. The primary workflow is staff sign-in, bill creation, review and approval, then recording payment; the dashboard also supports categories, staff administration, exports, and reporting. Client records, points of contact (POCs), and system logs form a distinct operations branch. The source excerpts show the dashboard’s category request and bill API persistence calls; other UI-to-API links are not asserted where source evidence was unavailable.
Main entry points: db.ts Data Access Layer · app/page.tsx Console Dashboard · client-info/page.tsx Client Inventory · ProtectedRoute.tsx Route Guard
Components 34
Payment Console
- Console Dashboard
app/page.tsx - Sign-in View
components/LoginView.tsx - Bill Creation
components/CreateBillView.tsx - Pending Review
components/PendingApprovalView.tsx - Approved Bills
components/ApprovedBillsView.tsx - Bill Details
components/BillDetailModal.tsx - Payment Voucher
components/BillVoucherModal.tsx - Dashboard Reports
components/DashboardView.tsx - Amount Charts
components/AmountCharts.tsx - Paid History
app/paid-history/PaidHistoryClient.tsx - Staff Management
components/UserManagementView.tsx - Route Guard
components/ProtectedRoute.tsx
Application APIs
- Login API
app/api/auth/login/route.ts - Bills API
app/api/bills/route.ts - Bill Record API
app/api/bills/[id]/route.ts - Bill Export API
app/api/bills/export/route.ts - Categories API
app/api/categories/route.ts - Category Record API
app/api/categories/[id]/route.ts - Users API
app/api/users/route.ts - User Record API
app/api/users/[id]/route.ts - Client Records API
app/api/clients/route.ts - Client Record API
app/api/clients/[id]/route.ts - POC API
app/api/pocs/route.ts - POC Record API
app/api/pocs/[id]/route.ts - System Logs API
app/api/logs/route.ts - Database Status API
app/api/db-status/route.ts
Persistence
- Data Access Layer
lib/db.ts - MySQL Database
Client Operations
- Client Inventory
app/client-info/page.tsx - Client Details
components/ClientDetailsModal.tsx - POC Management
components/PocManagement.tsx - Log Viewer
app/client-info/system-log/page.tsx - Client Data Types
types/client.ts
Other components
- Staff
Connections 31
- Staff → Console Dashboard: uses
- Console Dashboard → Sign-in View: renders
app/page.tsx - Console Dashboard → Bill Creation: renders
app/page.tsx - Console Dashboard → Pending Review: renders
app/page.tsx - Console Dashboard → Approved Bills: renders
app/page.tsx - Console Dashboard → Dashboard Reports: renders
app/page.tsx - Console Dashboard → Bill Details: renders
app/page.tsx - Console Dashboard → Payment Voucher: renders
app/page.tsx - Console Dashboard → Staff Management: renders
app/page.tsx - Console Dashboard → Categories API: requests
app/page.tsx - Bills API → Data Access Layer: calls
app/api/bills/route.ts - Bill Record API → Data Access Layer: calls
app/api/bills/[id]/route.ts - Bill Export API → Data Access Layer: calls
app/api/bills/export/route.ts - Login API → Data Access Layer: calls
app/api/auth/login/route.ts - Users API → Data Access Layer: calls
app/api/users/route.ts - Category Record API → Data Access Layer: calls
app/api/categories/[id]/route.ts - Categories API → Data Access Layer: calls
app/api/categories/route.ts - Client Records API → Data Access Layer: uses pool
app/api/clients/route.ts - Client Record API → Data Access Layer: calls
app/api/clients/[id]/route.ts - POC API → Data Access Layer: calls
app/api/pocs/route.ts - POC Record API → Data Access Layer: calls
app/api/pocs/[id]/route.ts - System Logs API → Data Access Layer: calls
app/api/logs/route.ts - User Record API → Data Access Layer: calls
app/api/users/[id]/route.ts - Data Access Layer → MySQL Database: queries
lib/db.ts - Dashboard Reports → Amount Charts: renders
components/DashboardView.tsx - Paid History → Route Guard: guards
app/paid-history/PaidHistoryClient.tsx - Client Inventory → Route Guard: guards
app/client-info/page.tsx - Client Inventory → Client Details: renders
app/client-info/page.tsx - Client Details → Client Data Types: uses types
components/ClientDetailsModal.tsx - Client Inventory → Client Data Types: uses types
app/client-info/page.tsx - Log Viewer → Route Guard: guards
app/client-info/system-log/page.tsx