AfyaSmart is a web-based student healthcare management system built with PHP, MySQL, HTML, CSS, and JavaScript.
It helps users manage:
- Medication reminders
- Mental wellness check-ins with insights
- Symptoms checker and daily health score
- Health timeline across modules
- Diet and wellness planning
- Personal health records
- Emergency support tools with map integration
- AI health assistant (guided, non-diagnostic)
- PHP (backend)
- MySQL / MariaDB (database)
- HTML + Bootstrap 5 (UI)
- Custom CSS + JavaScript
- Chart.js (insights charts)
- Leaflet + OpenStreetMap (emergency map)
dashboard.php- Main authenticated dashboardlogin.html- User login pageregister.html- User registration pagemedication.php- Medication CRUD + reminder alertsmental-health.php- Mood support + insights chartsdiet.php- Diet and wellness plannerhealth-records.php- Health records managementsymptoms.php- Symptoms checker + loggingtimeline.php- Unified health timelineassistant.php- AI health assistant (guided)emergency.html- Emergency contacts + map + nearby facilitiesbackend/- PHP backend handlers and DB connectionjs/main.js- Frontend behavior and integrationscss/style.css- Shared stylingafya_smart.sql- Database export
- Register multiple users with unique emails
- Secure login with password hashing
- Session-based authenticated access
- Live cards for medication count, record count, next reminder, last mood check
- Daily health score computed from recent activity
- Due reminder banner (next 60 minutes)
- Quick access module cards
- Full CRUD (create, read, update, delete)
- Status feedback for save/update/delete actions
- Due reminder notifications
- Mood-based support responses
- Mood check-ins saved to database
- Mood trends + mix charts
- Symptom selection + severity + temperature logging
- Guidance and red-flag warnings
- Stores checks for timeline + health score
- Track sleep, water intake, and activity minutes
- Feeds the daily health score
- Unified timeline for records, meds, mood check-ins, and symptoms
- Simple scoring model based on mood, symptoms, meds, and records
- 7-day trend chart
- Guided assistant with safety messaging
- Suggests routines and next steps
- Generates wellness guidance based on user selections
- Add and view user-specific health records
- SOS action button
- Geolocation support
- Embedded map (Leaflet)
- Nearby clinics/hospitals lookup
- Direct external directions links
Put this folder in:
C:\xampp\htdocs\Afya---Smart-main\afya-smart
Open XAMPP Control Panel and start:
- Apache
- MySQL
- Open phpMyAdmin:
http://localhost/phpmyadmin - Create database:
afya_smart - Import file:
afya_smart.sql
Use:
http://localhost/Afya---Smart-main/afya-smart/index.html
Dashboard:
http://localhost/Afya---Smart-main/afya-smart/dashboard.php
- Email:
test@afya.com - Password:
password
You can also register your own users from the register page.
- Always access through
http://localhost/...(notfile:///...) so PHP executes. - The app is session-protected for authenticated pages.
- Ensure your
backend/db.phpcredentials match your local MySQL setup. - The AI assistant and symptoms checker provide general guidance only and are not medical advice.
- Role-based access (admin/student)
- Email/SMS reminder delivery
- Deeper analytics and exportable reports
- Optional external AI integration with safety controls
- API-based emergency service integration
This project is for educational and prototype use.