Skip to content

Sajjad-Matin/edulearn-academy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ EduLearn Academy

A full-featured online learning platform built for the Afghan market β€” with local payment integration via HesabPay, course management, video lessons, and real-time student progress tracking.

PHP Laravel React Chakra UI MySQL HesabPay


πŸ“Œ Problem Statement

Afghanistan lacks accessible, locally-integrated online education platforms. Most global e-learning tools don't support local payment methods, making it impossible for Afghan students to enroll and pay. EduLearn Academy solves this by providing a full-featured LMS with HesabPay β€” Afghanistan's local payment gateway β€” built right in.


✨ Features

  • πŸ“š Course Management β€” instructors can create, update, and organize courses with structured content
  • 🎬 Video Lessons β€” stream video lessons directly within the platform
  • πŸ‘€ Student Enrollment β€” students can browse, enroll, and access courses after payment
  • πŸ“ˆ Student Progress Tracking β€” track completion rates and lesson progress per student
  • πŸ’³ HesabPay Integration β€” seamless local payment processing for Afghan users
  • πŸ› οΈ Admin Dashboard β€” full control over courses, users, enrollments, and revenue

πŸ—οΈ Architecture

edulearn-academy/
β”œβ”€β”€ backend/                  # Laravel REST API
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ Http/
β”‚   β”‚   β”‚   β”œβ”€β”€ Controllers/  # API controllers
β”‚   β”‚   β”‚   └── Middleware/
β”‚   β”‚   β”œβ”€β”€ Models/           # Eloquent models
β”‚   β”‚   β”œβ”€β”€ Services/         # HesabPay & business logic
β”‚   β”‚   └── Policies/         # Authorization policies
β”‚   β”œβ”€β”€ database/
β”‚   β”‚   β”œβ”€β”€ migrations/
β”‚   β”‚   └── seeders/
β”‚   └── routes/
β”‚       └── api.php
└── frontend/                 # React + Chakra UI
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ components/
    β”‚   β”œβ”€β”€ pages/
    β”‚   β”œβ”€β”€ hooks/
    β”‚   └── services/         # API client layer

πŸš€ Getting Started

Prerequisites

  • PHP 8.1+
  • Composer
  • MySQL 8+
  • Node.js 18+

1. Clone the repository

git clone https://github.com/Sajjad-Matin/edulearn-academy.git
cd edulearn-academy

2. Set up the Backend

cd backend
composer install

Copy the example env file and fill in your values:

cp .env.example .env

Key environment variables to configure in .env:

APP_NAME=EduLearn
APP_ENV=local
APP_KEY=                        # Run: php artisan key:generate
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=edulearn
DB_USERNAME=root
DB_PASSWORD=

SESSION_DRIVER=database
QUEUE_CONNECTION=database
CACHE_STORE=database

MAIL_MAILER=smtp
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME="${APP_NAME}"

FRONTEND_URL=http://localhost:5173

# HesabPay (Afghanistan local payment gateway)
HESAB_PAY_API_KEY=
HESAB_PAY_MERCHANT_ID=

Run migrations and seed the database:

php artisan key:generate
php artisan migrate --seed
php artisan storage:link
php artisan serve

The API will be available at http://localhost:8000

3. Set up the Frontend

cd ../frontend
npm install
npm run dev

The frontend will be available at http://localhost:5173


πŸ”Œ API Overview

Method Endpoint Description Auth
POST /api/auth/register Register a new user Public
POST /api/auth/login Login and get token Public
GET /api/courses List all available courses Public
GET /api/courses/:id Get course details & lessons Public
POST /api/courses Create a new course Admin
POST /api/enrollments Enroll in a course Required
GET /api/enrollments/my Get my enrolled courses Required
GET /api/progress/:courseId Get lesson progress for a course Required
POST /api/payments/hesabpay/initiate Initiate HesabPay payment Required
POST /api/payments/hesabpay/verify Verify payment & unlock course Required
GET /api/admin/dashboard Admin stats & overview Admin

πŸ’³ HesabPay Integration

EduLearn uses HesabPay as its payment gateway β€” one of the few payment processors operating in Afghanistan. The integration flow works as follows:

  1. Student selects a course and initiates checkout
  2. Backend calls HesabPay API to create a payment session
  3. Student is redirected to HesabPay's secure payment page
  4. On success, HesabPay sends a callback to the backend
  5. Backend verifies the payment and automatically enrolls the student

πŸ›£οΈ Roadmap

  • Add test coverage (PHPUnit + Pest)
  • Quiz & assessment system
  • Certificate generation on course completion
  • Instructor earnings & payout tracking
  • Mobile app (React Native)

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

Sajjad Matin


πŸ“„ License

This project is open source and available under the MIT License.

About

Online learning platform for the Afghan market with HesabPay payment integration, video lessons, course management & student progress tracking.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors