Documentation

Installation Guide

EcoLearn — Gamified Environmental Education Platform for Schools and Colleges

Step-by-step Setup Verified Instructions Chat Support
Back to Project
Complete Guide

EcoLearn — Installation Guide

Gamified Environmental Education Platform for Schools and Colleges

Follow the steps below carefully to set up and run the EcoLearn project on your local machine.


Prerequisites

Make sure the following are installed on your system before proceeding:

  • Python 3.10 or above
  • pip (Python package manager)
  • Git (to clone the repository)
  • A code editor such as VS Code (recommended)

Step 1 — Download the Project

After purchasing from CodeAj, extract the downloaded ZIP file or clone the repository using the command below:

git clone <your-repo-url>
cd "Gamified Environmental Education Platform for Schools and Colleges"

If you received a ZIP file, extract it and open the extracted folder in your terminal or command prompt.


Step 2 — Create a Virtual Environment

It is strongly recommended to use a virtual environment to avoid dependency conflicts with other Python projects on your system.

On Windows

python -m venv venv
venv\Scripts\activate

On macOS or Linux

python -m venv venv
source venv/bin/activate

Once activated, you will see (venv) appear at the beginning of your terminal prompt. This confirms the virtual environment is active.


Step 3 — Install Project Dependencies

All required packages are listed in the requirements.txt file. Install them with the following command:

pip install -r requirements.txt

This will install Django, scikit-learn, XGBoost, LightGBM, Plotly, pandas, numpy, TensorFlow, WhiteNoise, django-crispy-forms, and all other required packages.

This step may take a few minutes depending on your internet speed. Make sure your virtual environment is active before running this command.


Step 4 — Apply Database Migrations

EcoLearn uses Django's built-in ORM with SQLite as the default database. Run the following commands to create the database schema:

python manage.py makemigrations accounts gamification education analytics core
python manage.py migrate

After this, a db.sqlite3 file will be created in the root project directory. This is your local development database.


Step 5 — Load Seed Data

EcoLearn includes a custom management command that populates the database with sample data including lessons, quizzes, badges, eco challenges, eco facts, and a demo school. Run:

python manage.py seed_data

This step is important. Without seed data, the lessons, quizzes, and gamification content will not appear in the application.


Step 6 — Create a Superuser (Optional)

To access the Django admin panel at /admin/, you need to create a superuser account:

python manage.py createsuperuser

You will be prompted to enter a username, email address, and password. Once created, log in at http://127.0.0.1:8000/admin/ to manage all data from the admin interface.


Step 7 — Run the Development Server

Start the Django development server with the following command:

python manage.py runserver

Open your web browser and visit:

http://127.0.0.1:8000

The EcoLearn platform should now be fully running. Register a new account, select your role (Student, Teacher, or Eco Club Coordinator), and start exploring the platform.


Step 8 — Run Jupyter ML Notebooks (Optional)

EcoLearn includes six Jupyter notebooks that train and save machine learning models used by the analytics pages. This step is optional — if you skip it, the analytics pages will automatically fall back to rule-based logic.

To generate the trained models, first make sure Jupyter is installed (it is included in requirements.txt), then run:

jupyter notebook

This will open Jupyter in your browser. Open and run the notebooks in the following order:

  1. 01_water_quality_model.ipynb — Trains a Random Forest classifier for water potability prediction. Saves water_quality_model.pkl
  2. 02_air_quality_analysis.ipynb — AQI trend analysis and pollutant correlation. Saves air_quality_model.pkl
  3. 03_waste_classification_cnn.ipynb — MobileNetV2 CNN for organic vs recyclable waste classification. Saves waste_classifier_best.h5
  4. 04_deforestation_analysis.ipynb — K-Means clustering and choropleth map generation
  5. 05_emissions_analysis.ipynb — India CO2 forecast with BAU vs Green Transition comparison
  6. 06_student_performance_analysis.ipynb — Random Forest classifier for student academic performance prediction

All trained model files will be saved in the saved_models/ directory and will be automatically loaded by the analytics views when the server restarts.


Project URL Reference

Once the server is running, you can navigate to the following pages:

Page URL
Homehttp://127.0.0.1:8000/
Registerhttp://127.0.0.1:8000/accounts/register/
Loginhttp://127.0.0.1:8000/accounts/login/
Eco Dashboardhttp://127.0.0.1:8000/gamification/dashboard/
Leaderboardhttp://127.0.0.1:8000/gamification/leaderboard/
Badgeshttp://127.0.0.1:8000/gamification/badges/
Challengeshttp://127.0.0.1:8000/gamification/challenges/
Lessonshttp://127.0.0.1:8000/education/lessons/
Quizzeshttp://127.0.0.1:8000/education/quizzes/
Analytics Homehttp://127.0.0.1:8000/analytics/
Air Qualityhttp://127.0.0.1:8000/analytics/air-quality/
Water Qualityhttp://127.0.0.1:8000/analytics/water-quality/
Deforestationhttp://127.0.0.1:8000/analytics/deforestation/
CO2 Emissionshttp://127.0.0.1:8000/analytics/emissions/
Natural Disastershttp://127.0.0.1:8000/analytics/disasters/
SDG Dashboardhttp://127.0.0.1:8000/analytics/sdg/
Admin Panelhttp://127.0.0.1:8000/admin/

Need Help?

If you face any issues during setup, CodeAj offers a dedicated Project Setup and Source Code Explanation service. Our team will help you get the project running and walk you through the entire codebase.

Visit projects.codeaj.com/services to book a setup session.

Need Help?

Our team is here to assist you with installation and setup.

Chat with Us
Chat with us