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.
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
- PHP 8.0+ - Server-side scripting and application logic
- MySQL - Relational database management system
- PDO - PHP Data Objects for secure database interactions
- Bootstrap 5.2 - Responsive CSS framework
- JavaScript (ES6+) - Client-side interactivity
- Leaflet.js - Interactive mapping library
- OpenStreetMap - Map tile provider
- Font Awesome - Icon library
- Google Fonts - Typography (Montserrat, Roboto Slab)
- StartBootstrap Forms - Form validation and styling
- PHP 8.0 or higher
- MySQL 8.0 or higher
- Apache/Nginx web server
- Composer (optional, for dependency management)
git clone https://github.com/yourusername/malaria-app-prototype.git
cd malaria-app-prototype- Create a MySQL database:
CREATE DATABASE db_app_malaria;- Import the database schema from
dbquery.txt:
mysql -u root -p db_app_malaria < dbquery.txtOr manually execute the SQL statements in dbquery.txt.
- Copy the example environment file:
cp .env.example .env- Edit
.envwith your database credentials:
DB_HOST=localhost
DB_NAME=db_app_malaria
DB_USER=root
DB_PASSWORD=your_password- Update
app/bd.phpto 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'] ?? '';Ensure mod_rewrite is enabled and point your document root to the project directory.
Configure your server block to point to the project directory.
Ensure the web server has read permissions for all files and write permissions for any directories that need to store uploaded files.
Navigate to your web server URL:
http://localhost/malaria-app-prototype
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
- Password Storage: Currently uses plain text passwords. For production, implement password hashing (e.g.,
password_hash()withPASSWORD_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
.envfile (not committed to version control) - Input Validation: Implement server-side validation for all user inputs
- cPanel/Shared Hosting: Upload files via FTP/SFTP
- VPS: Deploy on DigitalOcean, Linode, or AWS EC2
- Dedicated Server: Full control over server configuration
- 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
- Docker: Containerize the application with PHP-FPM and Nginx
- Docker Compose: Orchestrate PHP, MySQL, and Nginx services
- 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
This is a proprietary project. For contributions or collaboration inquiries, please contact the Lead Developer.
- Steven Morales Fallas - Programming & Leadership
- Camila Montoya - Design & Organization
- FabiΓ‘n HernΓ‘ndez - Research & Assistance
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
Steven Morales Fallas
- Email: fallasmoraless@gmail.com
- Phone: +506 61304830
- Location: Costa Rica
- 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.