How edwinisac/bank-front works
1. Overall shape
- This is a client-side React single-page application built with Vite.
- The app is organized around a loan/recovery operations workflow: authentication, dashboard operations, agent management, and reporting.
- There is no server-side code in the repo, so the visible architecture is front-end only, with any data persistence likely coming from a mocked/local source such as db.json.
2. Application entry and shell
- src/main.jsx is the React bootstrap point.
- src/App.jsx appears to be the top-level composition layer, while src/Layout/MainLayout.jsx likely defines the shared shell around the app.
- Navbar.jsx is a persistent navigation component, suggesting a common frame used across authenticated pages.
3. Authentication boundary
- src/context/AuthContext.jsx provides the app’s auth state and authentication-related actions.
- src/protection/Protect.jsx acts as a route guard or access gate for private sections.
- src/pages/login/AuthPage.jsx is the entry point for unauthenticated users.
- Architecturally, this creates a clear split between public login and protected operational screens.
4. Core operational dashboard
- src/pages/dashboard/DashBoard.jsx is the main executive/operations view.
- It is composed of smaller dashboard panels:
- Intro.jsx
- AlertsPanel.jsx
- RecoveryPipeline.jsx
- OverdueLoans.jsx
- AssignLoanDashboard.jsx
- These components imply the dashboard is used to monitor loan recovery status, overdue items, and assignment workflows in one consolidated surface.
5. Agent management subsystem
- src/pages/agents/AgentsDisplay.jsx is the main list/view for agents.
- AgentCard.jsx represents the reusable card-level UI for a single agent.
- EditAgentModal.jsx supports inline editing via modal interaction.
- This subsystem is likely centered on reviewing agent performance and maintaining agent records.
6. Loan interaction and modal workflows
- src/components/Form.jsx suggests a shared form used for creating or editing loan-related records.
- LoanModal.jsx and LoanDetailsModal.jsx indicate modal-driven workflows for assigning loans and inspecting loan details.
- These components form a transactional UI layer separate from the main dashboard summaries.
7. Reporting and analytics
- src/pages/reports/ReportDisplay.jsx is the container for reporting screens.
- Supporting visualization components include:
- AgentsPerformanceChart.jsx
- OverdueCollectionPie.jsx
- RecoveryTrends.jsx
- TransactionsTable.jsx
- This section is the analytics boundary of the app, turning operational data into chart and table views for decision-making.
8. Data flow and state sharing
- The app appears to rely primarily on React props and context for state propagation.
- Authentication state is centralized in AuthContext, while other domain data likely flows from page containers into presentational components and modals.
- The absence of a dedicated api/ or services/ folder suggests the repository is either using local/mock data or keeps data access embedded in page components.
9. Mock or local data layer
- The presence of db.json is the strongest signal of a mock backend or fixture-driven setup.
- For an architecture diagram, it is reasonable to show a local JSON-based data source feeding dashboard, agent, loan, and report views during development.
10. Styling and component boundaries
- Styling is co-located with components and pages via individual CSS files, such as form.css, dashboard.css, reportDisplay.css, etc.
- Global styles live in src/index.css and src/App.css.
- This means the visual architecture is strongly component-scoped rather than driven by a central design system.
11. Assets and static content
- src/assets/hero-images holds visual assets used by the UI.
- public/ provides Vite static hosting support for assets that need direct public access.
- These are supporting resources, not primary application logic.
12. Tooling and runtime
- The repo is a standard React + Vite setup with ESLint configured (eslint.config.js) and Vite build config (vite.config.js).
- This is a browser runtime application; there is no evidence of SSR, backend workers, or deployment-specific infrastructure in the repository itself.
Main entry points: DashBoard.jsx Dashboard · ReportDisplay.jsx Reports · App.jsx App · Protect.jsx Protect
Components 25
App Shell
Application bootstrap and shared frame
- main · React entry point
src/main.jsx - App · Top-level application routing/composition
src/App.jsx - Main layout · Shared authenticated page frame
src/Layout/MainLayout.jsx - Navbar · Persistent navigation component
src/components/Navbar.jsx
Auth
Authentication and route protection
- Auth context · Authentication state and actions
src/context/AuthContext.jsx - Protect · Private route access gate
src/protection/Protect.jsx - Login · Unauthenticated sign-in screen
src/pages/login/AuthPage.jsx
Dashboard
Operational loan recovery overview
- Dashboard · Operations overview dashboard
src/pages/dashboard/DashBoard.jsx - Intro · Dashboard intro/summary panel
src/pages/dashboard/Intro.jsx - Alerts · Operational alerts panel
src/pages/dashboard/AlertsPanel.jsx - Pipeline · Recovery pipeline view
src/pages/dashboard/RecoveryPipeline.jsx - Overdue · Overdue loans summary
src/pages/dashboard/OverdueLoans.jsx - Assign loans · Loan assignment dashboard panel
src/pages/dashboard/AssignLoanDashboard.jsx
Agents
Agent management screens
- Agents · Agent management screen
src/pages/agents/AgentsDisplay.jsx - Agent card · Reusable agent display card
src/pages/agents/AgentCard.jsx - Edit agent · Agent editing modal
src/pages/agents/EditAgentModal.jsx
Loans
Loan interaction modals and forms
- Form · Shared loan/record form
src/components/Form.jsx - Loan modal · Loan assignment/edit modal
src/components/LoanModal.jsx - Loan details · Loan detail inspection modal
src/components/LoanDetailsModal.jsx
Reports
Analytics and reporting views
- Reports · Analytics and reporting screen
src/pages/reports/ReportDisplay.jsx - Performance · Agent performance chart
src/pages/reports/AgentsPerformanceChart.jsx - Overdue pie · Overdue collection pie chart
src/pages/reports/OverdueCollectionPie.jsx - Trends · Recovery trends chart
src/pages/reports/RecoveryTrends.jsx - Transactions · Transactions table view
src/pages/reports/TransactionsTable.jsx
Connections 29
- main → App: boots · React mounts the application
- App → Auth context: provides · Auth state is made available to the app
- App → Protect: routes · Private sections are guarded
- App → Main layout: wraps · Shared shell is composed around screens
- Main layout → Navbar: includes · Persistent navigation inside the shell
- App → Login: public · Unauthenticated entry screen
- Protect → Dashboard: allows · Protected operational view
- Protect → Agents: allows · Protected agent management view
- Protect → Reports: allows · Protected reporting view
- Dashboard → Intro: contains · Dashboard summary panel
- Dashboard → Alerts: contains · Alerts panel
- Dashboard → Pipeline: contains · Recovery pipeline panel
- Dashboard → Overdue: contains · Overdue loans panel
- Dashboard → Assign loans: contains · Assignment workflow panel
- Agents → Agent card: renders · Agent list is composed from cards
- Agents → Edit agent: edits · Inline agent editing via modal
- Loan modal → Form: uses · Shared form drives loan transactions
- Loan details → Form: shares · Loan detail flows share form infrastructure
- Dashboard → Loan modal: opens · Dashboard can launch loan actions
- Dashboard → Loan details: opens · Dashboard can inspect loan details
- Reports → Performance: contains · Agent performance visualization
- Reports → Overdue pie: contains · Overdue collections breakdown
- Reports → Trends: contains · Recovery trend visualization
- Reports → Transactions: contains · Tabular transaction reporting
- db.json → Dashboard: feeds · Mock data supports dashboard views
- db.json → Agents: feeds · Mock data supports agent management
- db.json → Reports: feeds · Mock data supports reporting views
- Auth context → Login: authenticates · Login updates auth state
- Auth context → Protect: checks · Route guard reads auth state