Skip to content

Repository files navigation

🏫 ElearnON - E-Learning REST API

JavaSpring BootPostgreSQLJWT

📌 Project Overview

ElearnON is a REST API built using Spring Boot, PostgreSQL, and JWT authentication for an E-Learning System. It allows students to enroll in courses, instructors to manage content, and provides authentication and role-based access control.

🚀 Features

  • User Authentication & Authorization (Spring Security + JWT)
  • Role-Based Access Control (Admin, Instructor, Student)
  • Course & Lesson Management
  • Enrollment & Progress Tracking(In Progress ⏳)
  • Certificate Generation(Not Started 🚧)
  • Reviews & Ratings(Not Started 🚧)
  • OpenAPI Documentation (Swagger UI)

🏗 Tech Stack

TechnologyDescription
Java 21Backend language
Spring Boot 3.4.3Application framework
Spring Security & JWTAuthentication & Authorization
Spring Data JPAORM for database interaction
PostgreSQLRelational database
MapStructDTO mapping
LombokReduces boilerplate code
SpringDoc OpenAPIAPI Documentation

📂 Project Structure

📦 src/main/java/com/system/training ┣ 📂 config # Security & configurations ┣ 📂 controller # REST controllers ┣ 📂 DTO # Data Transfer Objects ┣ 📂 enums # Enum types ┣ 📂 exception # Custom exception handling ┣ 📂 mappers # DTO to entity mappers ┣ 📂 model # Entity models ┣ 📂 repository # Database repositories ┣ 📂 service # Business logic layer ┗ 📜 TrainingApplication.java # Main Spring Boot Application 

⚙️ Setup & Installation

1️⃣ Clone the Repository

git clone https://github.com/devcom33/ElearnON.git cd ElearnON 

2️⃣ Configure Database

Update application.properties with your PostgreSQL credentials:

spring.datasource.url=jdbc:postgresql://localhost:5432/elearnon spring.datasource.username=your_db_user spring.datasource.password=your_db_password spring.jpa.hibernate.ddl-auto=update spring.security.jwt.secret=your-secret-key 

3️⃣ Build & Run the Project

mvn clean install mvn spring-boot:run 

4️⃣ API Documentation

After running the app, visit:

🔗 Swagger UI:http://localhost:8080/swagger-ui/index.html

🔐 Authentication

To access secured endpoints, generate a JWT token by logging in:

POST/api/auth/login

{
"email": "mouad@gmail.com",
"password": "password"
}

Use the received JWT token in headers:

Authorization: Bearer <your-token>

🛠 API Endpoints

EndpointDescriptionAccess
POST /api/auth/registerRegister new userPublic
POST /api/auth/loginAuthenticate & get JWTPublic
GET /api/coursesGet all coursesPublic
POST /api/coursesCreate a new courseInstructor
POST /api/enrollmentsEnroll a student (In Progress ⏳)Student
GET /api/progressGet user progress (In Progress ⏳)Student
POST /api/reviewsAdd course review (Not Started 🚧)Student

📜 License

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


💡 Contributions & Issues
Feel free to open issues or submit pull requests! 🚀

🔗 Author:Devcom33

About

A Spring Boot API for managing eLearning platforms, featuring course management, user authentication, and enrollment handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages