How r3nch00/probashibondhu-dashboard works
Purpose and Runtime
This is a TypeScript React admin-dashboard frontend for “Probashi Bondhu.” It is built and served with Vite; no backend, API client, authentication module, or deployment infrastructure is present in the supplied tree. Current application data is local mock/static data.
Key startup artifacts:
• probashibondhu-admin/index.html
• probashibondhu-admin/src/main.tsx
• probashibondhu-admin/src/App.tsx
• probashibondhu-admin/vite.config.ts
Application Bootstrap
src/main.tsx mounts the React application and imports global styling. src/App.tsx is the top-level composition point and likely owns page selection/routing state, since no dedicated routing directory or router configuration is visible.
Global visual rules reside in:
• probashibondhu-admin/src/index.css
• probashibondhu-admin/src/main.tsx
• probashibondhu-admin/src/App.tsx
Dashboard Shell and Navigation Boundary
The layout layer provides the persistent administrative shell: header/top bar, sidebar navigation, branding, and date filtering. This separates cross-page navigation/chrome from content pages.
Primary shell components:
• probashibondhu-admin/src/components/layout/DashboardLayout.tsx
• probashibondhu-admin/src/components/layout/Sidebar.tsx
• probashibondhu-admin/src/components/layout/Header.tsx
• probashibondhu-admin/src/components/layout/Topbar.tsx
• probashibondhu-admin/src/components/layout/DateFilter.tsx
Control flow is expected to be: app root selects a page, the dashboard layout wraps it, and sidebar/top-bar interactions change visible content or its filter context.
Feature Pages
The page layer represents the main admin workflows: summary monitoring, agent management/listing, and reporting. Pages consume shared layout and UI primitives rather than duplicating dashboard structure.
Feature entry points:
• probashibondhu-admin/src/pages/Dashboard.tsx
• probashibondhu-admin/src/pages/Agents.tsx
• probashibondhu-admin/src/pages/AgentList.tsx
• probashibondhu-admin/src/pages/Reports.tsx
AgentList.tsx is a likely detailed/table-oriented subflow of the broader agents domain, while Agents.tsx likely provides an overview or management landing view.
Data and Domain Model Boundary
The repository defines a local domain-model boundary through shared TypeScript types and static/mock data. This is the replacement point for a future API/data-access layer: pages should depend on typed models, while mock sources can be swapped for service-backed repositories.
Relevant paths:
• probashibondhu-admin/src/types/index.ts
• probashibondhu-admin/src/data/agents.ts
• probashibondhu-admin/src/data/mock.ts
The main flow is static data → page-level aggregation/filtering/list display → reusable presentation components. No persistence or remote synchronization is represented.
Reusable UI Interaction Layer
Shared UI components centralize recurring administrative interactions: metrics display, table/list navigation, status presentation, search, and modal dialogs. These form a reusable presentation boundary beneath feature pages.
Core primitives:
• probashibondhu-admin/src/components/ui/StatCard.tsx
• probashibondhu-admin/src/components/ui/Pagination.tsx
• probashibondhu-admin/src/components/ui/SearchInput.tsx
• probashibondhu-admin/src/components/ui/Modal.tsx
• probashibondhu-admin/src/components/ui/Badge.tsx
Likely interaction flow: search/date controls update page-local filtered views; pagination slices list results; modal components support detail or action confirmation; badges render typed statuses.
Material Dependencies and External Boundaries
The material runtime is browser-based React + TypeScript, bundled by Vite, with npm lockfiles defining reproducible dependencies:
• probashibondhu-admin/package.json
• probashibondhu-admin/package-lock.json
• probashibondhu-admin/tsconfig.app.json
No external service integration is identifiable from the tree. Introducing real agent, dashboard, or report data will require an explicit API client/service boundary, loading/error states, and likely authentication/session handling; none currently appears architecturally established.
Main entry points: App.tsx App root · Dashboard.tsx Dashboard · main.tsx React bootstrap · DashboardLayout.tsx Dashboard layout
Components 16
Build & Runtime
- Vite build server
probashibondhu-admin/vite.config.ts - HTML entry
probashibondhu-admin/index.html - React bootstrap · Mounts the application and imports global styles.
probashibondhu-admin/src/main.tsx
Application Shell
- App root · Selects the visible admin page without a dedicated router.
probashibondhu-admin/src/App.tsx - Global styles
probashibondhu-admin/src/index.css - Dashboard layout · Wraps page content with administrative chrome.
probashibondhu-admin/src/components/layout/DashboardLayout.tsx - Sidebar navigation
probashibondhu-admin/src/components/layout/Sidebar.tsx - Header & filters · Header, top bar, and date-filter context.
probashibondhu-admin/src/components/layout/Topbar.tsx
Admin Workflows
- Dashboard
probashibondhu-admin/src/pages/Dashboard.tsx - Agents
probashibondhu-admin/src/pages/Agents.tsx - Agent list · Detailed table-oriented agents workflow.
probashibondhu-admin/src/pages/AgentList.tsx - Reports
probashibondhu-admin/src/pages/Reports.tsx
Shared UI
- UI primitives · Metrics, search, pagination, modal, and status display.
probashibondhu-admin/src/components/ui/StatCard.tsx
Local Data Model
Current replacement boundary for future service-backed data.
- Domain types
probashibondhu-admin/src/types/index.ts - Agent mock data
probashibondhu-admin/src/data/agents.ts - Dashboard mock data
probashibondhu-admin/src/data/mock.ts
Connections 21
- Vite build server → HTML entry: serves
- HTML entry → React bootstrap: loads
- React bootstrap → App root: mounts
- React bootstrap → Global styles: imports
- App root → Dashboard layout: composes
- Dashboard layout → Sidebar navigation: includes
- Dashboard layout → Header & filters: includes
- Sidebar navigation → App root: changes page selection
- Header & filters → Dashboard: provides filter context
- App root → Dashboard: selects
- App root → Agents: selects
- App root → Agent list: selects
- App root → Reports: selects
- Dashboard → UI primitives: renders
- Agent list → UI primitives: searches and paginates with
- Agents → Agent mock data: reads
- Agent list → Agent mock data: filters and lists
- Dashboard → Dashboard mock data: aggregates
- Reports → Dashboard mock data: reads
- Agent mock data → Domain types: conforms to
- Dashboard mock data → Domain types: conforms to