Running on Localhost (XAMPP / WAMP)
- Download
lessonplan.zip and extract it into your server directory (e.g., C:/xampp/htdocs/lessonplan/).
- Open your browser and navigate to
http://localhost/phpmyadmin.
- Create a new database named
lessonplan_db.
- Click Import and upload the
database.sql file included in the root folder.
- Update your database connection credentials in
config.php:
<?php
$host = 'localhost';
$user = 'root';
$pass = ''; // Default XAMPP has no password
$dbname = 'lessonplan_db';
$conn = new mysqli($host, $user, $pass, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
Deploying to Live Server (cPanel)
- Login to your cPanel and open File Manager.
- Navigate to your domain directory (e.g.,
public_html/), upload lessonplan.zip, and click Extract.
- Go to MySQL Databases in cPanel. Create a new database and a new database user. Link the user to the database with ALL PRIVILEGES.
- Go to phpMyAdmin, select your new database, and import
database.sql.
- Edit the
config.php file via File Manager with your live credentials:
<?php
$host = 'localhost';
$user = 'yourcpaneluser_dbuser';
$pass = 'Your_Strong_Password_123';
$dbname = 'yourcpaneluser_lessonplan_db';
$conn = new mysqli($host, $user, $pass, $dbname);
?>
Configuring Google Gemini AI
To enable automatic lesson plan generation, you must connect the Google Gemini API.
- Visit Google AI Studio.
- Click Get API key and generate a new key for your project.
- Open the
gemini_config.php file in your downloaded source code and paste your key:
<?php
// Paste your Google Gemini API Key here
define('GEMINI_API_KEY', 'AIzaSyYourGeneratedGeminiApiKeyHere');
?>
Configuring Beem SMS Gateway
To enable automated SMS notifications to teachers upon lesson plan approval, configure Beem Africa.
- Register or login at Beem Africa.
- Navigate to the API Dashboard to retrieve your API Key and Secret Key.
- Open the
sms_config.php file in your downloaded source code and paste your keys:
<?php
// Paste your Beem SMS API credentials here
define('BEEM_API_KEY', 'your_beem_api_key_here');
define('BEEM_SECRET_KEY', 'your_beem_secret_key_here');
define('BEEM_SENDER_ID', 'INFO'); // Or your approved sender ID
?>