Repository navigation
Description
LOVABLE IMPLEMENTATION PROMPT
MAKE ALL SCHOOL APP BUTTONS FULLY FUNCTIONAL
Upgrade the existing Agona Nyakrom Methodist Basic School Management System.
- MAIN REQUIREMENT
Make EVERY button, menu item, icon button, tab, dropdown, action menu and navigation link fully functional throughout the entire application.
Do not create decorative buttons.
Do not leave buttons without actions.
Do not use fake success messages.
Do not simulate database operations.
Every button must perform its actual intended function.
Connect all applicable actions to the existing dedicated Supabase database.
Preserve the existing design, branding, database structure and working features.
- SPLASH SCREEN AND LOGIN BUTTONS
Implement:
- Open App: check authentication session.
- Login: authenticate staff through Supabase.
- Show Password: reveal or hide password.
- Forgot Password: start secure password recovery.
- Logout: securely terminate the session.
- Back: return to the previous permitted screen.
- Retry: retry failed authentication or loading requests.
After login, automatically redirect staff to their authorised portal.
Never allow users to choose or change their own roles.
- SCHOOL OWNER BUTTONS
Make these buttons functional:
- Dashboard
- Manage Students
- Register Student
- View Students
- Edit Student
- Student Profile
- Manage Teachers
- Add Teacher
- Invite Staff
- Edit Staff
- Activate Account
- Deactivate Account
- Assign Role
- Manage Classes
- Manage Subjects
- Academic Years
- Academic Terms
- Attendance
- Examinations
- Approve Results
- Publish Results
- Report Cards
- School Fees
- Financial Reports
- SMS Management
- SMS History
- Announcements
- Audit Logs
- School Settings
- User Permissions
- Export Reports
Every action must verify the School Owner's permissions on the server.
- HEADTEACHER BUTTONS
Implement:
- Dashboard
- View Students
- View Teachers
- Attendance Overview
- Academic Performance
- Pending Approvals
- Review Results
- Approve Results
- Reject Results
- Publish Results
- Approve Report Cards
- Student Promotion
- Teacher Reports
- School Announcements
- View School Reports
Approval and rejection actions must save the decision, staff identity, date and reason where applicable.
- TEACHER BUTTONS
Implement:
- My Dashboard
- My Classes
- My Students
- Open Class
- Take Attendance
- Save Attendance
- Submit Attendance
- Edit Draft Attendance
- View Attendance History
- Add Assessment
- Enter Marks
- Save Marks
- Submit Marks
- Edit Draft Marks
- Camera Capture
- Upload Marksheet
- Start OCR
- Review Extracted Marks
- Correct Marks
- Approve OCR Review
- View Student Performance
- My Timetable
- Generate Class Report
Teachers must only access their assigned classes and subjects.
Do not permit teachers to modify published results without an authorised correction process.
- ACCOUNTANT BUTTONS
Implement:
- Finance Dashboard
- Configure Fees
- Add Fee Structure
- Edit Fee Structure
- Generate Invoice
- View Invoice
- Record Payment
- Confirm Cash Payment
- Verify Electronic Payment
- Generate Receipt
- Download Receipt
- View Outstanding Fees
- Payment History
- Fee Collection Reports
- Request Payment Reversal
Every payment must be saved as a real transaction.
Electronic payments must be verified before confirmation.
Never delete financial history.
- EXAMINATION OFFICER BUTTONS
Implement:
- Examination Dashboard
- Create Examination
- Edit Examination
- Assign Subjects
- Set Maximum Marks
- Configure Weighting
- View Submitted Marks
- Review Marks
- Request Correction
- Approve Results
- Reject Results
- Publish Results
- Configure Grading
- Generate Report Cards
- Approve Report Cards
- BECE Preparation
- Examination Reports
All result changes must follow the authorised approval workflow.
- SECRETARY BUTTONS
Implement:
- Secretary Dashboard
- Register Student
- Search Student
- Edit Student Information
- Upload Student Photo
- Add Guardian
- Edit Guardian
- Link Guardian to Student
- Update Guardian Phone
- Record Admission
- View Admission History
- Manage Announcements
- Generate Admission Report
Validate admission numbers and prevent duplicate active enrolments.
- PARENT SMS BUTTONS
Implement:
- SMS Dashboard
- Create SMS Template
- Edit SMS Template
- Preview Message
- Select Class
- Select Recipients
- View Recipient Count
- Send SMS
- View SMS History
- View Failed Messages
- Retry Failed SMS
- Configure SMS Provider
- Configure Guardian Consent
- Export SMS Report
All SMS sending must use secure Supabase Edge Functions.
Show actual provider delivery status. Do not show Delivered before provider confirmation.
Prevent duplicate messages.
- GENERAL APPLICATION BUTTONS
Make these controls functional everywhere:
- Search
- Clear Search
- Filter
- Apply Filter
- Reset Filter
- Sort
- Next Page
- Previous Page
- Refresh
- Save
- Save Changes
- Cancel
- Submit
- Confirm
- Reject
- Approve
- Delete, only where permitted
- Archive
- Restore
- Download PDF
- Export CSV
- View Details
- Edit
- Close
- Back to Dashboard
- Notifications
- Profile
- Change Password
Use confirmation dialogs before destructive or irreversible operations.
- BUTTON BEHAVIOUR
Every interactive button must:
- Have a clearly defined action.
- Execute the correct action.
- Check the user's permissions.
- Validate required form information.
- Connect to Supabase when database operations are required.
- Display a loading state while processing.
- Prevent accidental repeated submissions.
- Display success only after confirmed completion.
- Display useful error messages when an operation fails.
- Refresh the relevant displayed data after success.
For example:
REGISTER STUDENT:
- Open registration form.
- Validate student information.
- Validate guardian information.
- Save the student record.
- Save guardian relationships.
- Generate the admission number.
- Display success only after the database confirms the operation.
- Open the new student profile.
SUBMIT ATTENDANCE:
- Validate the attendance register.
- Save attendance records.
- Prevent duplicate submissions.
- Queue eligible guardian notifications.
- Display the actual submission result.
PUBLISH RESULTS:
- Check permissions.
- Verify all required marks.
- Verify grading configuration.
- Require approval.
- Publish through a secure server-side operation.
- Record the publication event.
- Queue approved guardian SMS notifications.
RECORD PAYMENT:
- Validate amount and payment method.
- Save the transaction.
- Update the invoice balance through secure database logic.
- Generate a unique receipt.
- Queue a guardian notification where consent permits.
- ROLE-BASED SECURITY
Do not rely on hiding buttons in the frontend.
Enforce permissions using Supabase RLS and secure server-side functions.
Examples:
- Teachers cannot access owner settings.
- Teachers cannot approve their own published results.
- Accountants cannot change examination marks.
- Secretaries cannot access restricted finance operations.
- Only authorised staff can invite or deactivate users.
- Only authorised staff can publish results.
- Only authorised staff can reverse payments.
If an unauthorised user attempts an action, reject it securely.
- NAVIGATION
Every sidebar item, dashboard card, quick-action button and mobile navigation icon must open the correct page or execute the correct action.
Ensure:
- No broken routes.
- No blank pages.
- No dead links.
- No duplicate navigation destinations.
- No inaccessible pages.
- Correct role-based navigation.
- Browser back navigation works appropriately.
- Android back navigation works appropriately.
- TEST EVERY BUTTON
Create a complete functional testing checklist.
For every button, record:
- Button name.
- User role.
- Intended action.
- Actual page or function.
- Database operation.
- Permission check.
- Test result.
- Error handling result.
Test all seven portals separately.
Test on:
- Android mobile.
- Android PWA.
- Desktop browser.
Do not mark a button complete until it has passed its functional test.
- FINAL INSTRUCTION
Inspect the entire existing application.
Identify every button, link, icon, tab and action control.
Create a complete list of non-functional controls.
Implement and test each one.
Do not remove existing working features.
Do not create fake data.
Do not claim success when a database operation has failed.
Do not proceed with unfinished buttons.
FINAL REQUIREMENT: EVERY BUTTON MUST WORK, EVERY FORM MUST SAVE REAL DATA, EVERY ACTION MUST RESPECT USER PERMISSIONS, AND EVERY PAGE MUST CONNECT TO ITS CORRECT FUNCTIONAL WORKFLOW.
Activity