Skip to content

weru198/Afya---Smart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

AfyaSmart

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)

Tech Stack

  • PHP (backend)
  • MySQL / MariaDB (database)
  • HTML + Bootstrap 5 (UI)
  • Custom CSS + JavaScript
  • Chart.js (insights charts)
  • Leaflet + OpenStreetMap (emergency map)

Project Structure

  • dashboard.php - Main authenticated dashboard
  • login.html - User login page
  • register.html - User registration page
  • medication.php - Medication CRUD + reminder alerts
  • mental-health.php - Mood support + insights charts
  • diet.php - Diet and wellness planner
  • health-records.php - Health records management
  • symptoms.php - Symptoms checker + logging
  • timeline.php - Unified health timeline
  • assistant.php - AI health assistant (guided)
  • emergency.html - Emergency contacts + map + nearby facilities
  • backend/ - PHP backend handlers and DB connection
  • js/main.js - Frontend behavior and integrations
  • css/style.css - Shared styling
  • afya_smart.sql - Database export

Features

Authentication

  • Register multiple users with unique emails
  • Secure login with password hashing
  • Session-based authenticated access

Dashboard

  • 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

Medication Module

  • Full CRUD (create, read, update, delete)
  • Status feedback for save/update/delete actions
  • Due reminder notifications

Mental Health Module

  • Mood-based support responses
  • Mood check-ins saved to database
  • Mood trends + mix charts

Symptoms Checker

  • Symptom selection + severity + temperature logging
  • Guidance and red-flag warnings
  • Stores checks for timeline + health score

Daily Wellness Log

  • Track sleep, water intake, and activity minutes
  • Feeds the daily health score

Health Timeline

  • Unified timeline for records, meds, mood check-ins, and symptoms

Daily Health Score

  • Simple scoring model based on mood, symptoms, meds, and records
  • 7-day trend chart

AI Health Assistant

  • Guided assistant with safety messaging
  • Suggests routines and next steps

Diet & Wellness Module

  • Generates wellness guidance based on user selections

Health Records Module

  • Add and view user-specific health records

Emergency Module

  • SOS action button
  • Geolocation support
  • Embedded map (Leaflet)
  • Nearby clinics/hospitals lookup
  • Direct external directions links

Setup (XAMPP)

1. Place project in htdocs

Put this folder in:

C:\xampp\htdocs\Afya---Smart-main\afya-smart

2. Start services

Open XAMPP Control Panel and start:

  • Apache
  • MySQL

3. Import database

  1. Open phpMyAdmin: http://localhost/phpmyadmin
  2. Create database: afya_smart
  3. Import file: afya_smart.sql

4. Open project

Use:

http://localhost/Afya---Smart-main/afya-smart/index.html

Dashboard:

http://localhost/Afya---Smart-main/afya-smart/dashboard.php

Default Test Account (if from SQL dump)

  • Email: test@afya.com
  • Password: password

You can also register your own users from the register page.

Notes

  • Always access through http://localhost/... (not file:///...) so PHP executes.
  • The app is session-protected for authenticated pages.
  • Ensure your backend/db.php credentials match your local MySQL setup.
  • The AI assistant and symptoms checker provide general guidance only and are not medical advice.

Future Improvements

  • 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

License

This project is for educational and prototype use.

About

Afya Smart – A secure healthcare management system designed to digitize hospital operations while prioritizing patient data privacy and integrity.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors