- Get Started
- Localhost
- Architecture
- Structure
- Pattern
- Page
- Layout
- Content
- Types
- Config
- Actions
- Queries
- Authorization
- Validation
- Form
- Table
- Detail
- Card
- Util
- Hooks
- List Params
- Views
- README.md
- ISSUE.md
- Technology Stack
- Database
- File
- CDN Assets
- Entry Points
- Dashboard
- Authentication
- Credentials
- OAuth
- Flow Diagrams
- Multi-Tenancy
- Offline
- Onboarding
- Onboarding Videos
- Add Values
- Admission
- Application
- Attendance
- Compliance
- Profile
- Exams
- Exam Wizard
- Timetable
- Classrooms
- Notifications
- Conference
- LMS (Lumos)
- Finance
- Fee Management
- Invoice
- Wallet
- Salary
- Payroll
- Timesheet
- Expenses
- Budget
- Receipt
- Accounts
- Banking
- Reports
- Dashboard
- Permissions
- Messages
- Integration Flow
- Provision
- AI Document Processing
- Document Intelligence
- Internationalization
- Translation
- Translation Guide
- Icons
- Docs Factory
- Inspiration
- Listings
- Teachers
- Students
- Catalog
- Library
- Contributing
- Code of conduct
- GitHub Workflow
- Database Seeds
- Database Safety
- Test Accounts
- Bulk import
- Playwright
- Prettier
- Block Rebound
- Transportation
The finance dashboard aggregates the block into a role-scoped overview: admins and accountants see full KPIs and charts; teachers, students, and guardians see scoped slices (own salary, fee status). It is the landing page at /finance/dashboard.
Flow
Load (role-scoped) → KPI cards (real totals) + trend charts (mock)
+ smart alerts + quick actions + recent transactions
Status
| Feature | Status |
|---|---|
| Role-scoped KPI cards | Production (real DB aggregations) |
| Revenue / expense / cash-flow charts | Production (totals real) |
| Recent transactions feed | Production |
| Bank-accounts summary | Production |
| Budget overview | Production |
| Currency + locale formatting | Production (School.currency, date-fns locale) |
| Trend sparklines | Stubbed — Math.random() mock data |
| Real-time refresh (WebSocket) | Planned (currently full-page SSR) |
| Mobile layout optimization | Planned |
Routes
| Route | Page | Status |
|---|---|---|
/{lang}/finance/dashboard | Financial dashboard | Ready |
Server actions
| Action | Purpose |
|---|---|
getDashboardStats | KPI totals + trend series (totals real, trends mock) |
getFinancialAlerts | Smart alerts (overdue, low balance, etc.) |
getQuickActionsForRole | Role-appropriate action buttons |
getRecentTransactions | Recent transactions feed |
Ledger / accounting
Not a money-mover — the dashboard reads and aggregates across the invoice, fees, expenses, payroll, banking, budget, and wallet models for display only.
Schema
No model of its own; composes reads across the other finance models.
Stubs
dashboard/actions.ts:278-288—generateTrend()fabricates the revenue/expense/profit/collection sparklines withMath.random(). The comment says "mock data for now - should calculate from historical data." KPI totals are real; only the trend lines are fake.
Tests
None.
Key files
| Component | Path |
|---|---|
| Server actions | src/components/school-dashboard/finance/dashboard/actions.ts |
| Composition | src/components/school-dashboard/finance/dashboard/content.tsx |
| Charts | src/components/school-dashboard/finance/dashboard/revenue-chart.tsx (+ expense-chart, cash-flow-chart) |