Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Educational E-Learning Platform (LMS)

Complete full-stack Educational E-Learning Platform built with Angular 17+ and ASP.NET Core 8.

πŸ—οΈ Architecture

Client β†’ Angular Frontend β†’ ASP.NET Core API β†’ SQL Server DB β†’ Bunny Storage/CDN

πŸ“ Project Structure

LMS/
β”œβ”€β”€ backend/              # ASP.NET Core 8 Web API
β”‚   β”œβ”€β”€ LMS.API/          # Controllers, Program.cs
β”‚   β”œβ”€β”€ LMS.Application/  # Business Logic, DTOs, Services
β”‚   β”œβ”€β”€ LMS.Domain/       # Entities, Enums
β”‚   └── LMS.Infrastructure/ # Data Access, External Services
└── src/                  # Angular 17+ Frontend
    └── app/
        β”œβ”€β”€ core/         # Guards, Interceptors, Services
        β”œβ”€β”€ features/     # Feature modules
        └── shared/       # Shared components

πŸš€ Quick Start

Backend Setup

  1. Navigate to backend directory

    cd backend
  2. Update connection string in LMS.API/appsettings.json

  3. Install EF Core tools (if not installed)

    dotnet tool install --global dotnet-ef
  4. Create and apply migrations

    dotnet ef migrations add InitialCreate --project LMS.Infrastructure --startup-project LMS.API
    dotnet ef database update --project LMS.Infrastructure --startup-project LMS.API
  5. Run the API

    cd LMS.API
    dotnet run

    API will be available at:

    • HTTP: http://localhost:5000
    • HTTPS: https://localhost:5001
    • Swagger: https://localhost:5001/swagger
    • Hangfire: https://localhost:5001/hangfire

Frontend Setup

  1. Install dependencies

    npm install
  2. Update API endpoint in src/app/core/constants/api-endpoints.ts:

    export const API_BASE_URL = 'https://localhost:5001/api';
  3. Run the frontend

    npm start

    Frontend will be available at http://localhost:4200

πŸ” Default Credentials

Admin Account:

  • Email: admin@lms.com
  • Password: Admin@123

⚠️ Change these credentials in production!

πŸ“‹ Features Implemented

βœ… Backend

  • Clean Architecture (API, Application, Domain, Infrastructure)
  • JWT Authentication with Role-based Authorization
  • Student Registration with Document Upload
  • OTP Verification System
  • Account Status Management (Pending/Active/Blocked)
  • Support Module (Approve/Reject Users)
  • EF Core with SQL Server
  • Hangfire for Background Jobs
  • Swagger/OpenAPI Documentation

βœ… Frontend

  • Angular 17+ Standalone Components
  • Angular Material UI
  • JWT Token Management
  • Auth Guards (AuthGuard, RoleGuard)
  • HTTP Interceptors
  • Auth Module (Login, Signup, OTP Verification)

πŸ”„ Account Lifecycle

  1. Student Registration

    • Student signs up with personal + academic data
    • Uploads identity document
    • Account status: Pending
  2. Support Review

    • Support reviews pending users
    • Can approve or reject with reason
  3. OTP Activation (if approved)

    • System generates 6-digit OTP
    • OTP expires in 10 minutes
    • Student verifies OTP
    • Account status: Pending β†’ Active
  4. Login

    • Active users can login
    • JWT token returned
    • Role-based routing

🎯 Roles

  • Student: Browse courses, enroll, learn, take exams
  • Parent: Read-only access to student reports
  • Teacher: Create courses, manage lessons, monitor students
  • Support: Review and approve/reject users
  • Admin: Full system management

πŸ“ API Endpoints

Authentication

  • POST /api/auth/register - Student registration
  • POST /api/auth/login - Login
  • POST /api/auth/verify-otp - Verify OTP
  • POST /api/auth/request-otp/{userId} - Request OTP
  • POST /api/auth/logout - Logout

Support

  • GET /api/support/pending-users - Get pending users
  • GET /api/support/user/{userId} - Get user details
  • POST /api/support/approve/{userId} - Approve user
  • POST /api/support/reject/{userId} - Reject user
  • POST /api/support/unblock/{userId} - Unblock user
  • GET /api/support/whatsapp-link/{userId} - Get WhatsApp link

πŸ”§ Configuration

Backend (appsettings.json)

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=LMSDb;..."
  },
  "JwtSettings": {
    "SecretKey": "YourSecretKey...",
    "Issuer": "LMS",
    "Audience": "LMS-Users",
    "ExpirationMinutes": 60
  },
  "BunnyNet": {
    "StorageApiKey": "YOUR_KEY",
    "CdnApiKey": "YOUR_KEY",
    ...
  },
  "Fawry": {
    "MerchantCode": "YOUR_CODE",
    "SecurityKey": "YOUR_KEY",
    ...
  }
}

Frontend

Update src/app/core/constants/api-endpoints.ts:

export const API_BASE_URL = 'https://localhost:5001/api';

πŸ“¦ Dependencies

Backend

  • ASP.NET Core 8
  • Entity Framework Core 8
  • Microsoft.AspNetCore.Identity
  • JWT Bearer Authentication
  • Hangfire
  • Swashbuckle (Swagger)

Frontend

  • Angular 17+
  • Angular Material
  • RxJS
  • HLS.js (for video playback)

🚧 In Progress

See PROJECT_STATUS.md for detailed status of:

  • Remaining API controllers
  • Frontend modules (Student, Teacher, Support, Admin dashboards)
  • Video streaming (Bunny.net)
  • Payment integration (Fawry)
  • Background jobs
  • Security features

πŸ“š Documentation

  • Backend README: backend/README.md
  • Project Status: PROJECT_STATUS.md
  • API Documentation: Available at /swagger when running

πŸ› οΈ Development

Backend

cd backend/LMS.API
dotnet watch run

Frontend

npm start
# or
ng serve

πŸ”’ Security Notes

  1. Change default JWT secret key in production
  2. Change default admin password
  3. Enable HTTPS in production
  4. Implement rate limiting
  5. Add request logging and audit trails
  6. Secure file uploads
  7. Implement proper CORS policies

πŸ“ž Support

For issues and questions, refer to:

  • Backend documentation: backend/README.md
  • Project status: PROJECT_STATUS.md

πŸ“„ License

This project is part of a comprehensive LMS solution.


Built with ❀️ using Angular 17+ and ASP.NET Core 8

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages