Skip to content

Latest commit

Β 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

School Hub - Complete School Management System

A comprehensive, full-stack school management system built with Laravel 11, Blade templates, and MySQL. This application provides a complete solution for managing students, teachers, courses, exams, payments, and attendance in educational institutions.

School Hub License Laravel PHP

πŸš€ Features

Admin Dashboard

  • Real-time Statistics: View total students, teachers, parents, and earnings
  • Interactive Charts: Earnings, attendance, and performance analytics using Chart.js
  • Event Calendar: Track upcoming exams and events
  • Top Performers: Identify and track high-achieving students

Student Management

  • Complete CRUD operations for student records
  • Student profile pages with detailed information
  • Grade tracking and exam results
  • Attendance monitoring
  • Payment history

Teacher Management

  • Teacher profiles and schedules
  • Class assignments
  • Student roster management
  • Attendance tracking

Course Management

  • Course creation and management
  • Student enrollment
  • Schedule management
  • Course analytics

Exam Management

  • Exam scheduling
  • Result tracking
  • Grade management
  • Performance analytics

Payment Management

  • Payment recording and tracking
  • Multiple payment methods
  • Payment history
  • Receipt generation

Attendance Management

  • Daily attendance tracking
  • Class-wise attendance reports
  • Attendance analytics

πŸ› οΈ Technology Stack

Backend

  • Laravel 11 - PHP web framework
  • MySQL - Database
  • Eloquent ORM - Database abstraction
  • Blade Templates - Templating engine

Frontend

  • Blade Templates - Server-side rendering
  • Tailwind CSS - Utility-first CSS framework
  • Alpine.js - Lightweight JavaScript framework
  • Chart.js - Data visualization
  • Vite - Frontend build tool

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • PHP (v8.2 or higher) - Download
  • Composer - PHP dependency manager - Download
  • MySQL (v8.0 or higher) - Download
  • Node.js (v16 or higher) - For frontend assets - Download
  • npm or yarn - Package manager
  • Git - Version control

For Windows Users

  • XAMPP (includes PHP and MySQL) - Download

πŸš€ Installation Guide

Step 1: Clone the Repository

git clone https://github.com/stewardobeng/school-hub.git
cd school-hub

Step 2: Install PHP Dependencies

composer install

Step 3: Install Frontend Dependencies

npm install

Step 4: Database Setup

  1. Start MySQL Server

    • If using XAMPP: Start MySQL from XAMPP Control Panel
    • If using standalone MySQL: Ensure MySQL service is running
  2. Create Database

    CREATE DATABASE school_hub;
  3. Configure Environment Variables

    Copy the .env.example file to .env:

    cp .env.example .env

    Edit .env with your MySQL credentials:

    APP_NAME="School Hub"
    APP_ENV=local
    APP_KEY=
    APP_DEBUG=true
    APP_URL=http://localhost/school-hub/public
    
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=school_hub
    DB_USERNAME=root
    DB_PASSWORD=your_mysql_password
  4. Generate Application Key

    php artisan key:generate
  5. Run Database Migrations

    php artisan migrate

    This will create all required tables.

  6. Seed Initial Data (Optional)

    php artisan db:seed

    This will populate the database with sample data for testing.

Step 5: Build Frontend Assets

npm run build

Or for development with hot reload:

npm run dev

Step 6: Start the Development Server

For XAMPP Users:

  • Start Apache and MySQL from XAMPP Control Panel
  • Access the application at: http://localhost/school-hub/public

For Laravel's Built-in Server:

php artisan serve
  • Access the application at: http://localhost:8000

πŸ“ Project Structure

school-hub/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Http/
β”‚   β”‚   └── Controllers/
β”‚   β”‚       └── Admin/          # Admin controllers
β”‚   β”œβ”€β”€ Models/                 # Eloquent models
β”‚   └── Services/               # Business logic services
β”‚
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/             # Database migrations
β”‚   └── seeders/                # Database seeders
β”‚
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ views/                  # Blade templates
β”‚   β”‚   β”œβ”€β”€ admin/              # Admin views
β”‚   β”‚   β”œβ”€β”€ student/            # Student views
β”‚   β”‚   β”œβ”€β”€ teacher/            # Teacher views
β”‚   β”‚   β”œβ”€β”€ components/         # Reusable components
β”‚   β”‚   └── layouts/            # Layout templates
β”‚   β”œβ”€β”€ css/                    # CSS files
β”‚   └── js/                     # JavaScript files
β”‚
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ web.php                 # Web routes
β”‚   └── api.php                 # API routes
β”‚
β”œβ”€β”€ public/                     # Public assets
β”œβ”€β”€ config/                     # Configuration files
β”œβ”€β”€ storage/                    # Storage and logs
└── vendor/                     # Composer dependencies

πŸ”Œ API Documentation

Base URL

http://localhost/school-hub/public/api

Endpoints

Students

  • GET /api/students - Get all students
  • GET /api/students/{id} - Get student by ID
  • POST /api/students - Create new student
  • PUT /api/students/{id} - Update student
  • DELETE /api/students/{id} - Delete student

Teachers

  • GET /api/teachers - Get all teachers
  • GET /api/teachers/{id} - Get teacher by ID
  • POST /api/teachers - Create new teacher
  • PUT /api/teachers/{id} - Update teacher
  • DELETE /api/teachers/{id} - Delete teacher

Courses

  • GET /api/courses - Get all courses
  • GET /api/courses/{id} - Get course by ID
  • POST /api/courses - Create new course
  • PUT /api/courses/{id} - Update course
  • DELETE /api/courses/{id} - Delete course

Exams

  • GET /api/exams - Get all exams
  • GET /api/exams/{id} - Get exam by ID
  • POST /api/exams - Create new exam
  • PUT /api/exams/{id} - Update exam
  • DELETE /api/exams/{id} - Delete exam

Payments

  • GET /api/payments - Get all payments
  • GET /api/payments/{id} - Get payment by ID
  • POST /api/payments - Create new payment
  • PUT /api/payments/{id} - Update payment
  • DELETE /api/payments/{id} - Delete payment

Attendance

  • GET /api/attendance - Get all attendance records
  • GET /api/attendance/{id} - Get attendance by ID
  • POST /api/attendance - Create new attendance record
  • PUT /api/attendance/{id} - Update attendance record
  • DELETE /api/attendance/{id} - Delete attendance record

Dashboard

  • GET /api/dashboard/stats - Get dashboard statistics

Response Format

Success Response:

{
  "success": true,
  "data": { ... }
}

Error Response:

{
  "success": false,
  "message": "Error message",
  "error": "Detailed error information"
}

πŸ—„οΈ Database Schema

The application uses the following main tables:

  • students - Student information
  • teachers - Teacher information
  • courses - Course details
  • exams - Exam schedules
  • payments - Payment records
  • attendance - Attendance records
  • course_enrollments - Student-course relationships
  • exam_results - Exam results

See database/migrations/ for complete schema definition.

πŸš€ Deployment Guide

Production Setup

  1. Set Environment Variables:

    APP_ENV=production
    APP_DEBUG=false
    APP_URL=https://your-domain.com
    
    DB_CONNECTION=mysql
    DB_HOST=your-database-host
    DB_PORT=3306
    DB_DATABASE=your_database
    DB_USERNAME=your_username
    DB_PASSWORD=your_password
  2. Optimize Application:

    php artisan config:cache
    php artisan route:cache
    php artisan view:cache
  3. Build Frontend Assets:

    npm run build
  4. Set Permissions:

    chmod -R 775 storage bootstrap/cache

Database Deployment

For production, consider using:

  • MySQL (managed service like AWS RDS, PlanetScale, or DigitalOcean)
  • PostgreSQL (requires schema migration)

πŸ§ͺ Testing

Test API Endpoints

# Health check
curl http://localhost/school-hub/public/api/health

# Get all students
curl http://localhost/school-hub/public/api/students

# Get all teachers
curl http://localhost/school-hub/public/api/teachers

πŸ“ Available Scripts

Laravel Commands

  • php artisan serve - Start development server
  • php artisan migrate - Run database migrations
  • php artisan db:seed - Seed database
  • php artisan route:list - List all routes
  • php artisan tinker - Interactive shell

Frontend

  • npm run dev - Start development server with hot reload
  • npm run build - Build for production
  • npm run preview - Preview production build

πŸ”§ Configuration

Laravel Configuration

Key configuration files:

  • config/app.php - Application settings
  • config/database.php - Database configuration
  • config/session.php - Session configuration

Vite Configuration

Frontend assets are compiled using Vite. Configuration is in vite.config.js.

πŸ› Troubleshooting

Database Connection Issues

  1. Check MySQL is running:

    # Windows (XAMPP)
    # Check XAMPP Control Panel
    
    # Linux/Mac
    sudo systemctl status mysql
  2. Verify credentials in .env:

    • Ensure DB_USERNAME and DB_PASSWORD are correct
    • Check DB_HOST and DB_PORT
  3. Test connection:

    mysql -u root -p

Permission Issues

If you encounter permission errors:

chmod -R 775 storage bootstrap/cache

Migration Errors

  1. Drop and recreate database:

    DROP DATABASE school_hub;
    CREATE DATABASE school_hub;
  2. Run migration again:

    php artisan migrate:fresh --seed

🀝 Contributing

Contributions are welcome! Please follow these steps:

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

πŸ“„ License

This project is licensed under the MIT License.

πŸ‘¨β€πŸ’» Author

Steward Obeng

πŸ™ Acknowledgments

  • Laravel - The PHP Framework for Web Artisans
  • Tailwind CSS - A utility-first CSS framework
  • Alpine.js - A minimal framework for composing JavaScript behavior
  • Chart.js - Simple yet flexible JavaScript charting

πŸ“ž Support

For support, email your-email@example.com or open an issue in the repository.


Made with ❀️ for educational institutions

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages