Skip to main content

Quick start

This guide will take you from a fresh installation to understanding the core functionality of each user role in the School Management Platform.
This tutorial assumes you’ve completed the installation guide. If not, please set up your environment first.

Your first login

1

Access the login page

Open your browser and navigate to:
http://localhost/school_management/public
You’ll see the login page with email and password fields.
If you don’t see the login page, verify that Apache and MySQL are running in your XAMPP Control Panel.
2

Create an admin user (if needed)

If this is your first time and you don’t have any users, you’ll need to create an admin account directly in the database.Open phpMyAdmin (http://localhost/phpmyadmin) and run this SQL:
-- Create admin user
INSERT INTO users (name, email, password, role) VALUES (
  'Admin User',
  'admin@school.com',
  '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', -- password: 'password'
  'admin'
);
This creates an admin account with password password. Change this immediately after your first login in a production environment.
Default credentials:
  • Email: admin@school.com
  • Password: password
3

Log in as admin

Enter your admin credentials and click Login.The authentication process:
// Email and password are verified
if (!$user || !password_verify($password, $user['password'])) {
    echo "Invalid email or password";
    return;
}

// Session is created with user information
$_SESSION['user'] = [
    'id' => $user['id'],
    'name' => $user['name'],
    'email' => $user['email'],
    'role' => strtolower($user['role']),
];
You’ll be redirected to the admin dashboard at:
http://localhost/school_management/public/index.php/dashboard/admin

Exploring the admin dashboard

After logging in as an admin, you’ll see the main dashboard with several management cards:

Dashboard overview

The admin dashboard displays:
  • Students - Total count with “Manage” button
  • Teachers - Total count with “Manage” button
  • Subjects - Total count with “Manage” button
  • Courses - Total count with “Manage” button
  • Enrollments - Total count with “Manage” button
  • Timetable - Management access
  • Bulletins - View student bulletins

Create your first student

1

Navigate to students

Click the Manage button on the Students card, or visit:
http://localhost/school_management/public/students
2

Add a new student

Click Create New Student and fill in the form:When you submit, the system creates the account:
// User account is created
$stmt = $this->db->prepare(
    "INSERT INTO users (name, email, password, role) VALUES (?, ?, ?, 'student')"
);
$stmt->execute([$name, $email, password_hash($password, PASSWORD_DEFAULT)]);

// Student record is linked
$userId = $this->db->lastInsertId();
$stmt = $this->db->prepare("INSERT INTO students (id) VALUES (?)");
$stmt->execute([$userId]);
3

View the student list

You’ll be redirected back to the students page where you can see:
  • All registered students
  • Their names and email addresses
  • Options to delete students

Create a teacher and subject

1

Add a teacher

Click Manage on the Teachers card and create a teacher:
2

Add a subject

Click Manage on the Subjects card and create:
  • Subject Name: Mathematics
  • Subject Code: MATH101
3

Create a course

Courses link teachers to subjects. Click Manage on Courses card:
  1. Select Teacher: Jane Smith
  2. Select Subject: Mathematics
  3. Click Create Course
Now Jane Smith is assigned to teach Mathematics!

Enroll a student in a course

1

Navigate to enrollments

Click Manage on the Enrollments card.
2

Create enrollment

  1. Select Student: John Doe
  2. Select Course: Mathematics (Jane Smith)
  3. Click Enroll
The student is now enrolled and will see this course in their dashboard.

Exploring the teacher dashboard

1

Log out and log back in as teacher

Click Logout in the top-right corner. Then log in with:You’ll be redirected to the teacher dashboard:
http://localhost/school_management/public/index.php/dashboard/teacher
2

View assigned courses

The teacher dashboard shows:
  • My Courses - Number of courses you’re teaching
  • Timetable - Your teaching schedule
Click Manage Grades to see your courses.
3

Enter student grades

  1. Select the Mathematics course
  2. You’ll see all enrolled students (John Doe)
  3. Enter a grade (e.g., 15.5 out of 20)
  4. Click Save Grades
Grades are stored and immediately visible to students:
// Grade is saved to database
$stmt = $this->db->prepare(
    "INSERT INTO grades (student_id, course_id, grade) 
     VALUES (?, ?, ?) 
     ON DUPLICATE KEY UPDATE grade = ?"
);

Exploring the student dashboard

1

Log in as student

Log out and log in with the student account:You’ll see the student dashboard:
http://localhost/school_management/public/index.php/dashboard/student
2

View your courses and grades

The student dashboard displays:
  • My Timetable - Your class schedule
  • My Bulletin - Academic performance report
  • My Courses & Grades - Table showing all enrolled courses
In the grades table, you’ll see:
Subject      | Teacher      | Grade /20
Mathematics  | Jane Smith   | 15.50
3

Check your bulletin

Click View Bulletin to see your complete academic report including:
  • All course grades
  • Overall average
  • Teacher names for each subject
The bulletin automatically calculates your general average across all courses.

Understanding role-based access

The platform enforces strict role separation:

Session protection

Each protected route checks user permissions:
// Admin routes
Auth::admin(); // Requires role = 'admin'

// Teacher routes  
Auth::teacher(); // Requires role = 'teacher'

// Student routes
Auth::student(); // Requires role = 'student'

Automatic timeout

For security, sessions expire after 30 minutes of inactivity:
// Check for session timeout (30 minutes = 1800 seconds)
if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 1800)) {
    session_unset();
    session_destroy();
    // Redirect to login
}
If you’re inactive for 30 minutes, you’ll be automatically logged out and redirected to the login page.

Next steps

Now that you understand the basics:

Admin guide

Deep dive into administrative features and management tools

Teacher guide

Learn advanced grading features and timetable management

Student guide

Explore all student features and academic tracking

Timetable management

Create and manage class schedules for the entire school

Common tasks reference

Quick reference for frequent operations:
TaskRoleNavigation
Add studentAdminDashboard → Students → Create
Add teacherAdminDashboard → Teachers → Create
Create courseAdminDashboard → Courses → Create
Enroll studentAdminDashboard → Enrollments → Create
Enter gradesTeacherDashboard → Manage Grades → Select Course
View gradesStudentDashboard (automatic) or Bulletin
Check timetableAnyDashboard → View Timetable
LogoutAnyLogout button (top-right)
All user passwords are hashed using password_hash() with the PASSWORD_DEFAULT algorithm for security.

Build docs developers (and LLMs) love