Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

e-ALS: Enhanced Alternative Learning System Platform

A comprehensive web-based platform designed to support the Philippine Alternative Learning System (ALS) by providing teachers with tools to manage students, track progress, and predict A&E (Accreditation and Equivalency) test readiness using machine learning.

📋 Project Overview

e-ALS is a fullstack application that assists ALS teachers in monitoring student performance across six learning strands and predicting their readiness for the A&E test. The system uses a machine learning model trained on historical ALS data to provide personalized learning recommendations and identify at-risk students.

Key Features

  • Student Management System: Track student information, demographics, and academic records
  • Assessment Tracking: Monitor performance across all Learning Strands (LS1-LS6)
  • A&E Readiness Prediction: ML-powered prediction model to assess student readiness for A&E tests
  • Mock Test Module: Practice A&E tests with immediate scoring and performance analytics
  • Progress Visualization: Charts and graphs showing student performance trends
  • Learning Material Repository: Upload and organize study materials by learning strand
  • Personalized Recommendations: Automatically suggest learning materials based on weak areas
  • Teacher Activity Logs: Track all administrative actions for accountability
  • Multi-user Authentication: Separate dashboards for Admin, Teachers, and Students

🛠️ Tech Stack

Frontend

  • React (with Vite) - Modern UI library
  • React Router - Client-side routing
  • Chart.js & Recharts - Data visualization
  • Tailwind CSS & Material-UI - Styling and components
  • Axios - HTTP client

Backend

  • Node.js & Express - REST API server
  • Flask (Python) - Machine learning API server
  • MySQL - Relational database
  • Bcrypt - Password hashing
  • Multer - File upload handling

Machine Learning

  • Scikit-learn - ML model training and prediction
  • Pandas & NumPy - Data processing
  • Joblib - Model serialization

📂 Project Structure

ealsfinal-main/
├── frontend/                # React frontend application
│   ├── src/
│   │   ├── components/      # Reusable UI components
│   │   ├── assets/          # Images and static files
│   │   ├── App.jsx          # Main application component
│   │   └── apiService.js    # API integration layer
│   └── package.json
│
├── backend/                 # Node.js & Flask backend
│   ├── server.js            # Main Express server
│   ├── app.py               # Flask ML prediction server
│   ├── db.js                # MySQL connection (Node.js)
│   ├── db_config.py         # MySQL connection (Python)
│   ├── StudentManagementServer.js  # Student API routes
│   ├── als_model_training.py      # ML model training script
│   ├── data/
│   │   ├── als_model.pkl           # Trained ML model
│   │   ├── als_scaler.pkl          # Feature scaler
│   │   └── eals-dataset-for-training.csv
│   └── uploads/             # User-uploaded learning materials
│
└── README.md

🚀 Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • Python (v3.8 or higher)
  • MySQL Server (v8.0 or higher)
  • npm or yarn package manager
  • pip for Python packages

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/ealsfinal-main.git
    cd ealsfinal-main
  2. Set up the database

    • Install MySQL Workbench or MySQL Server
    • Create a new database named eals
    • Import the database schema (see Database Setup section)
  3. Configure environment variables

    Create a .env file in the backend directory:

    cd backend
    cp .env.example .env

    Edit .env with your configuration:

    DB_HOST=localhost
    DB_USER=root
    DB_PASSWORD=your_password
    DB_NAME=eals
    PORT=3000
    FLASK_PORT=5000
    FRONTEND_URL=http://localhost:5173
    BCRYPT_SALT_ROUNDS=10
  4. Install Node.js dependencies

    # In backend directory
    npm install
    
    # In frontend directory
    cd ../frontend
    npm install
  5. Install Python dependencies

    cd ../backend
    pip install -r requirements.txt
  6. Start the development servers

    Open three separate terminal windows:

    Terminal 1 - Node.js Backend:

    cd backend
    node server.js

    Terminal 2 - Flask ML Server:

    cd backend
    python app.py

    Terminal 3 - React Frontend:

    cd frontend
    npm run dev
  7. Access the application

🗄️ Database Setup

Required Tables

The application requires the following MySQL tables:

  • students - Student information and demographics
  • teachers - Teacher accounts and credentials
  • admin - Administrator accounts
  • roles - User role definitions
  • assessment_scores - Student test scores across learning strands
  • aemock_results - A&E mock test results
  • questions - Test questions bank
  • learning_materials - Uploaded study materials
  • learning_strands - Learning strand definitions (LS1-LS6)
  • teacher_activity_log - Audit trail for teacher actions

Learning Strands Structure

The ALS curriculum is organized into six learning strands:

  1. LS1 - Communication Skills (English & Filipino)
  2. LS2 - Scientific Literacy and Critical Thinking (SLCT)
  3. LS3 - Mathematical and Problem Solving Skills (MPSS)
  4. LS4 - Life and Career Skills (LCS)
  5. LS5 - Understanding the Self and Society (USS)
  6. LS6 - Digital Citizenship (DC)

Note: For detailed database schema, see DATABASE_SCHEMA.md

📊 Machine Learning Model

The A&E readiness prediction model uses the following features:

  • PIS Score - Personal Information Sheet assessment
  • FLT Score - Functional Literacy Test overall score
  • Learning Strand Scores (LS1-LS6) - Performance in each subject area

Model Details:

  • Algorithm: Random Forest Classifier / Logistic Regression
  • Training Data: Historical ALS student performance data
  • Output: Binary classification (Ready/Not Ready for A&E test)
  • Additional Output: Personalized learning material recommendations

Training the Model

cd backend
python als_model_training.py

This will generate:

  • data/als_model.pkl - Trained model
  • data/als_scaler.pkl - Feature scaler
  • Performance metrics and visualizations in models/ directory

🔐 Security Considerations

Current Implementation

Implemented:

  • Environment variables for sensitive configuration
  • Bcrypt password hashing for new registrations
  • CORS configuration
  • SQL prepared statements in most endpoints
  • File upload validation

⚠️ Known Limitations (Future Improvements):

  • Login endpoints compare plain text passwords (legacy student/teacher accounts)
  • No JWT/session token implementation
  • Some SQL queries use string interpolation
  • No rate limiting on authentication endpoints
  • File uploads not scanned for malware
  • No input sanitization on some endpoints

Recommendations Before Production

  1. Implement JWT authentication for session management
  2. Hash all existing passwords and update login logic
  3. Add input validation using libraries like Joi or express-validator
  4. Implement rate limiting with express-rate-limit
  5. Add HTTPS in production
  6. Use parameterized queries throughout
  7. Implement role-based access control (RBAC)
  8. Add request logging and monitoring
  9. Sanitize file uploads and validate MIME types
  10. Enable SQL strict mode and use ORM like Sequelize

🚧 Future Improvements

This project has a solid foundation but there are several areas identified for enhancement:

High Priority

  • JWT Authentication - Replace plain text password comparison with token-based auth
  • Password Migration - Hash all existing passwords in the database
  • SQL Injection Prevention - Convert all string interpolation queries to parameterized statements
  • Input Validation - Implement comprehensive validation using Joi or express-validator
  • Rate Limiting - Add rate limiting to prevent brute force attacks

Medium Priority

  • Role-Based Access Control - Implement granular permissions system
  • Request Logging - Add Winston or Morgan for request/error logging
  • File Security - Scan uploaded files for malware and validate MIME types properly
  • HTTPS Support - Add SSL/TLS configuration for production
  • API Documentation - Generate Swagger/OpenAPI documentation
  • Unit Tests - Add Jest/Mocha tests for critical functions
  • Error Handling - Standardize error responses across all endpoints

Low Priority (Nice to Have)

  • Email Notifications - Send assessment reminders and results via email
  • Real-time Updates - WebSocket support for live dashboard updates
  • Export Features - Generate PDF reports for student progress
  • Mobile App - React Native companion app for students
  • Data Analytics - Advanced visualizations and predictive insights
  • Multi-language Support - Internationalization for English and Filipino
  • Offline Mode - Progressive Web App features for areas with poor connectivity

Machine Learning Enhancements

  • Model Retraining Pipeline - Automate model updates with new data
  • Feature Engineering - Add more predictive features (attendance, demographics)
  • Model Monitoring - Track prediction accuracy over time
  • A/B Testing - Compare different ML algorithms
  • Explainable AI - Provide explanations for predictions to teachers

🎯 Usage

For Teachers

  1. Login with teacher credentials
  2. View Dashboard - See overview of all students, ready count, at-risk count
  3. Manage Students - Add, edit, or remove student records
  4. Track Progress - View individual student performance across learning strands
  5. Upload Materials - Add learning resources organized by strand
  6. Monitor At-Risk Students - Identify students who need additional support

For Students

  1. Login with student credentials
  2. Take Assessments - Complete learning strand tests
  3. View Predictions - Check A&E readiness status
  4. Access Materials - Download recommended study materials
  5. Practice Tests - Take A&E mock exams
  6. Track Progress - View performance history

For Administrators

  1. Manage Teachers - Add, edit, remove teacher accounts
  2. View Activity Logs - Monitor all teacher actions
  3. System Overview - View total students and teachers
  4. Audit Trail - Track changes and maintain accountability

📸 Screenshots

Note: Add screenshots of your application here to showcase the UI:

  • Login page
  • Teacher dashboard
  • Student management
  • Progress charts
  • A&E prediction results
  • Mock test interface

🤝 Contributing

This is an academic project. If you'd like to suggest improvements:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/improvement)
  3. Commit your changes (git commit -m 'Add improvement')
  4. Push to the branch (git push origin feature/improvement)
  5. Open a Pull Request

📝 License

This project is developed for educational purposes as part of an academic requirement.

👥 Authors

  • Your Name - Initial work and development

🙏 Acknowledgments

  • Department of Education Philippines - Alternative Learning System program
  • ALS teachers and coordinators who provided insights
  • Historical ALS student data for model training
  • [Add any other acknowledgments]

📞 Contact

For questions or feedback about this project:


⚠️ Important Note: This application requires a MySQL database to function. Make sure to set up the database and configure your .env file before running the application.

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages