- 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
Budget defines spending envelopes, allocates them across categories, and tracks spent-vs-allocated variance. Expenses draw down allocations on approval; the resulting variance feeds reports.
Flow
Create budget → allocate to categories → track spent vs allocated (variance)
→ (planned) alert when a threshold is crossed
Status
| Feature | Status |
|---|---|
Category CRUD (schoolId-scoped) | Production |
| Allocation + spent tracking | Production |
| Variance calculation (allocated vs spent) | Production |
Validation factory createBudgetSchema(v) | Exported, but consumers still import the legacy static schema |
| Variance-alert notifications | Planned (threshold → dispatch, not wired) |
| Budget-vs-actual report page | Planned (data exists, no UI) |
| Approval workflow | Planned |
| Multi-period budgets (quarterly/annual) | Planned |
Routes
| Route | Page | Status |
|---|---|---|
/{lang}/finance/budget | Overview | Ready |
/{lang}/finance/budget/all | All budgets list | Ready |
/{lang}/finance/budget/new | Create budget | Ready |
/{lang}/finance/budget/[id] | Budget detail & variance | Ready |
Server actions
| Action | Purpose |
|---|---|
createBudget / updateBudget | Budget create / edit |
createBudgetAllocation | Allocate budget to a category |
getBudgets | List budgets + allocations |
Ledger / accounting
Not a ledger money-mover. Budget tracks planned vs actual spend; the "actual" side is decremented by expense approvals, not by journal postings.
Schema
prisma/models/finance-budgets.prisma: Budget, BudgetAllocation — schoolId-scoped. Budget/category names have no lang field.
Stubs
validation.ts:29— hardcoded date-range message; the exportedcreateBudgetSchema(v)factory is not yet adopted byform.tsx/actions.ts(legacy staticbudgetSchemastill imported).
Tests
None.
Key files
| Component | Path |
|---|---|
| Server actions | src/components/school-dashboard/finance/budget/actions.ts |
| Validation | src/components/school-dashboard/finance/budget/validation.ts |
| Content | src/components/school-dashboard/finance/budget/content.tsx |
| Schema | prisma/models/finance-budgets.prisma |