Skip to content

Latest commit

Β 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🦟 Malaria App - Disease Tracking & Prevention System

PHP MySQL Bootstrap License

A comprehensive web application designed to track, monitor, and prevent malaria (paludismo) in Costa Rica. This full-stack application provides users with tools for symptom tracking, exposure monitoring, interactive mapping, and educational resources about malaria prevention and treatment.

✨ Introduction

Malaria App is a public health initiative developed to mitigate the effects of malaria at the national and global level. The application enables users to:

  • Track Symptoms: Record and monitor malaria-related symptoms with intensity levels and dates
  • Monitor Exposures: Log potential disease exposures in specific locations with detailed geographic data
  • Interactive Mapping: Visualize malaria incidence data across Costa Rica's provinces with historical data
  • AI Chatbot: Interact with an intelligent chatbot for guidance and symptom assessment
  • Educational Resources: Access comprehensive information about malaria prevention, symptoms, and treatment

πŸš€ Technologies Used

Backend

  • PHP 8.0+ - Server-side scripting and application logic
  • MySQL - Relational database management system
  • PDO - PHP Data Objects for secure database interactions

Frontend

  • Bootstrap 5.2 - Responsive CSS framework
  • JavaScript (ES6+) - Client-side interactivity
  • Leaflet.js - Interactive mapping library
  • OpenStreetMap - Map tile provider
  • Font Awesome - Icon library

Additional Libraries

  • Google Fonts - Typography (Montserrat, Roboto Slab)
  • StartBootstrap Forms - Form validation and styling

βš™οΈ Installation

Prerequisites

  • PHP 8.0 or higher
  • MySQL 8.0 or higher
  • Apache/Nginx web server
  • Composer (optional, for dependency management)

Step 1: Clone the Repository

git clone https://github.com/yourusername/malaria-app-prototype.git
cd malaria-app-prototype

Step 2: Database Setup

  1. Create a MySQL database:
CREATE DATABASE db_app_malaria;
  1. Import the database schema from dbquery.txt:
mysql -u root -p db_app_malaria < dbquery.txt

Or manually execute the SQL statements in dbquery.txt.

Step 3: Configure Environment Variables

  1. Copy the example environment file:
cp .env.example .env
  1. Edit .env with your database credentials:
DB_HOST=localhost
DB_NAME=db_app_malaria
DB_USER=root
DB_PASSWORD=your_password
  1. Update app/bd.php to use environment variables (recommended for production):
$servidor = $_ENV['DB_HOST'] ?? 'localhost';
$db = $_ENV['DB_NAME'] ?? 'db_app_malaria';
$usuario = $_ENV['DB_USER'] ?? 'root';
$contrasena = $_ENV['DB_PASSWORD'] ?? '';

Step 4: Configure Web Server

Apache

Ensure mod_rewrite is enabled and point your document root to the project directory.

Nginx

Configure your server block to point to the project directory.

Step 5: Set Permissions

Ensure the web server has read permissions for all files and write permissions for any directories that need to store uploaded files.

Step 6: Access the Application

Navigate to your web server URL:

http://localhost/malaria-app-prototype

🧩 Project Structure

malaria-app-prototype/
β”œβ”€β”€ app/                      # Application core
β”‚   β”œβ”€β”€ bd.php               # Database configuration
β”‚   β”œβ”€β”€ index.php            # Main application dashboard
β”‚   β”œβ”€β”€ css/                 # Application-specific styles
β”‚   β”‚   └── style.css
β”‚   └── sections/            # Feature modules
β”‚       β”œβ”€β”€ chatbot/         # Chatbot functionality
β”‚       β”‚   └── newchat.php
β”‚       β”œβ”€β”€ exposures/       # Exposure tracking
β”‚       β”‚   β”œβ”€β”€ analisis.php
β”‚       β”‚   β”œβ”€β”€ crear.php
β”‚       β”‚   └── editar.php
β”‚       β”œβ”€β”€ symptoms/        # Symptom tracking
β”‚       β”‚   β”œβ”€β”€ analisis.php
β”‚       β”‚   β”œβ”€β”€ crear.php
β”‚       β”‚   └── editar.php
β”‚       └── users/           # User management
β”‚           └── crear.php
β”œβ”€β”€ assets/                  # Static assets
β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”œβ”€β”€ img/                 # Images
β”‚   β”‚   β”œβ”€β”€ logos/          # Company logos
β”‚   β”‚   β”œβ”€β”€ portfolio/      # Portfolio images
β”‚   β”‚   └── team/           # Team member photos
β”‚   └── ...
β”œβ”€β”€ css/                     # Global stylesheets
β”‚   β”œβ”€β”€ bootstrap.css
β”‚   └── styles.css
β”œβ”€β”€ csv/                     # CSV data files
β”‚   β”œβ”€β”€ cantones.csv
β”‚   β”œβ”€β”€ distritos.csv
β”‚   └── provincias.csv
β”œβ”€β”€ js/                      # JavaScript files
β”‚   └── scripts.js
β”œβ”€β”€ templates/               # Reusable templates
β”‚   β”œβ”€β”€ header.php
β”‚   └── nav.php
β”œβ”€β”€ index.php               # Landing page
β”œβ”€β”€ login.php               # Authentication page
β”œβ”€β”€ logout.php              # Session termination
β”œβ”€β”€ mapa.php                # Map visualization page
β”œβ”€β”€ dbquery.txt             # Database schema
β”œβ”€β”€ .env.example            # Environment variables template
β”œβ”€β”€ .gitignore              # Git ignore rules
β”œβ”€β”€ LICENSE                 # License file
└── README.md               # Project documentation

πŸ” Security Considerations

  • Password Storage: Currently uses plain text passwords. For production, implement password hashing (e.g., password_hash() with PASSWORD_BCRYPT)
  • SQL Injection: Uses PDO with prepared statements to prevent SQL injection
  • Session Security: Ensure proper session configuration and CSRF protection in production
  • Environment Variables: Store sensitive credentials in .env file (not committed to version control)
  • Input Validation: Implement server-side validation for all user inputs

🚒 Deployment

Recommended Deployment Platforms

Option 1: Traditional Web Hosting

  • cPanel/Shared Hosting: Upload files via FTP/SFTP
  • VPS: Deploy on DigitalOcean, Linode, or AWS EC2
  • Dedicated Server: Full control over server configuration

Option 2: Cloud Platforms

  • AWS: EC2 + RDS (MySQL) + Elastic Beanstalk
  • Google Cloud: Compute Engine + Cloud SQL
  • Azure: App Service + Azure Database for MySQL
  • Heroku: PHP buildpack with ClearDB MySQL addon
  • Render: PHP web service with MySQL database
  • Railway: Full-stack deployment platform

Option 3: Containerized Deployment

  • Docker: Containerize the application with PHP-FPM and Nginx
  • Docker Compose: Orchestrate PHP, MySQL, and Nginx services

Deployment Checklist

  • Update database credentials in production environment
  • Enable HTTPS/SSL certificate
  • Configure proper error logging (disable error display in production)
  • Set up database backups
  • Implement password hashing
  • Configure CORS headers if needed
  • Set up monitoring and logging
  • Configure firewall rules
  • Enable PHP opcache for performance
  • Set appropriate file permissions

🀝 Contributing

This is a proprietary project. For contributions or collaboration inquiries, please contact the Lead Developer.

πŸ‘₯ Team

  • Steven Morales Fallas - Programming & Leadership
  • Camila Montoya - Design & Organization
  • FabiΓ‘n HernΓ‘ndez - Research & Assistance

πŸ“œ License

This project is proprietary software. All rights reserved.

Copyright (c) 2023 Steven Morales Fallas

All rights reserved. Redistribution, modification, reproduction, sublicensing, or any form of transaction (including commercial, educational, or promotional use) involving this repository, its source code, or derived works is strictly prohibited without the explicit and personal written authorization of the Lead Developer, Steven Morales Fallas.

Unauthorized commercial use, resale, or licensing of this repository or its contents is strictly forbidden and will be subject to applicable legal action.

For licensing inquiries, please contact: fallasmoraless@gmail.com

πŸ“ž Contact

Steven Morales Fallas

πŸ™ Acknowledgments

  • World Health Organization (WHO) for malaria data and information
  • OpenStreetMap contributors for map data
  • Bootstrap team for the excellent framework
  • Leaflet.js developers for the mapping library

Note: This application is developed for educational and public health purposes. Always consult medical professionals for health-related decisions.

About

A profect for a high school science fair, about health and the malaria information and prevention.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages