Skip to content

[build-integration-ai-agent-skills]: #2400

Closed

Description

@mrfandogh03-boop

LOVABLE IMPLEMENTATION PROMPT

MAKE ALL SCHOOL APP BUTTONS FULLY FUNCTIONAL

Upgrade the existing Agona Nyakrom Methodist Basic School Management System.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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
  • Print
  • View Details
  • Edit
  • Close
  • Back to Dashboard
  • Notifications
  • Profile
  • Change Password

Use confirmation dialogs before destructive or irreversible operations.

  1. BUTTON BEHAVIOUR

Every interactive button must:

  1. Have a clearly defined action.
  2. Execute the correct action.
  3. Check the user's permissions.
  4. Validate required form information.
  5. Connect to Supabase when database operations are required.
  6. Display a loading state while processing.
  7. Prevent accidental repeated submissions.
  8. Display success only after confirmed completion.
  9. Display useful error messages when an operation fails.
  10. 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.
  1. 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.

  1. 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.
  1. 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.

  1. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions