Skip to content

harsav360/EdTechPlatform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Educational Platform (EdTech)

A modern, full-featured educational platform built with Spring Boot and Spring Security. This platform enables instructors to create and manage courses, students to enroll and learn, and administrators to oversee the entire ecosystem.

Java Spring Boot MongoDB License

📋 Table of Contents

✨ Features

Authentication & Authorization

  • User Registration & Login with email verification via OTP
  • JWT-based Authentication for secure API access
  • Role-based Access Control (Student, Instructor, Admin)
  • Password Reset functionality with email verification
  • Change Password for authenticated users

Course Management

  • Create, Edit, and Delete Courses (Instructor)
  • Course Categories for organized browsing
  • Course Sections and Subsections for structured content
  • Course Progress Tracking for students
  • Course Thumbnails via Cloudinary integration
  • Draft and Published status management

Payment Integration

  • Razorpay Payment Gateway integration
  • Secure Payment Processing for course enrollment
  • Payment Verification and order management
  • Multiple Student Enrollment support

Rating & Reviews

  • Course Rating System (1-5 stars)
  • Student Reviews for completed courses
  • Average Rating Calculation and display

Profile Management

  • User Profile Creation with additional details
  • Profile Updates (contact number, about, gender, date of birth)
  • Profile Image Upload via Cloudinary
  • Instructor Dashboard with enrolled students

Communication

  • Email Notifications for registration, enrollment, and updates
  • Contact Us Form for user inquiries
  • SMTP Integration for reliable email delivery

Media Management

  • Cloudinary Integration for image and video uploads
  • Secure URL Generation for media assets
  • Optimized Media Delivery

🛠 Technology Stack

Backend

  • Java 21 - Programming Language
  • Spring Boot 3.2.0 - Application Framework
  • Spring Security - Authentication & Authorization
  • Spring Data MongoDB - Database Integration
  • Spring Boot Mail - Email Services

Database

  • MongoDB - NoSQL Database for flexible data storage

Security & Authentication

  • JWT (JSON Web Tokens) - Stateless authentication
  • BCrypt - Password hashing
  • JJWT 0.11.5 - JWT implementation

External Services

  • Cloudinary - Media storage and delivery
  • Razorpay - Payment gateway integration
  • SMTP - Email delivery

Development Tools

  • Lombok - Boilerplate code reduction
  • Maven - Dependency management
  • Spring Boot DevTools - Development utilities

Testing

  • JUnit 5 - Unit testing framework
  • Mockito - Mocking framework
  • Spring Security Test - Security testing utilities

🏗 Architecture

This application follows a layered architecture pattern:

┌─────────────────────────────────────┐
│         Controllers Layer           │  ← REST API Endpoints
├─────────────────────────────────────┤
│         Service Layer               │  ← Business Logic
├─────────────────────────────────────┤
│         Repository Layer            │  ← Data Access
├─────────────────────────────────────┤
│         MongoDB Database            │  ← Data Persistence
└─────────────────────────────────────┘

Key Components:

  • Controllers: Handle HTTP requests and responses
  • Services: Implement business logic
  • Repositories: Manage database operations
  • DTOs: Data Transfer Objects for API communication
  • Entities: MongoDB document models
  • Configuration: Security, JWT, Cloudinary, and application settings
  • Utils: Helper classes (JWT utilities, etc.)
  • Exception: Custom exception handling

📦 Prerequisites

Before you begin, ensure you have the following installed:

External Service Accounts (Required)

  • Cloudinary Account - For media storage (Sign up)
  • Razorpay Account - For payment processing (Sign up)
  • SMTP Email Service - For sending emails (Gmail, SendGrid, etc.)

🚀 Installation

1. Clone the Repository

git clone https://github.com/yourusername/edtechplatform.git
cd edtechplatform

2. Set Up MongoDB

Option A: Local MongoDB

# Start MongoDB service
mongod --dbpath /path/to/your/data/directory

Option B: MongoDB Atlas (Cloud)

  • Create a free cluster at MongoDB Atlas
  • Get your connection string

3. Configure Environment Variables

Create a .env file in the root directory or set system environment variables:

# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017/studynotion
MONGODB_DATABASE=studynotion
MONGODB_AUTH_DATABASE=admin
MONGODB_USERNAME=root
MONGODB_PASSWORD=root

# JWT Configuration
JWT_SECRET=myVerySecretKeyThatShouldBeAtLeast256BitsLongForHS256Algorithm2024SecureTokenGeneration
JWT_EXPIRATION=86400000

# Cloudinary Configuration
CLOUD_NAME=your_cloudinary_cloud_name
API_KEY=your_cloudinary_api_key
API_SECRET=your_cloudinary_api_secret

# Razorpay Configuration
RAZORPAY_KEY=your_razorpay_key_id
RAZORPAY_SECRET=your_razorpay_secret_key

# Email Configuration (SMTP)
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME[email protected]
MAIL_PASSWORD=your_app_specific_password

Note: See EMAIL_CONFIGURATION_GUIDE.md for detailed email setup instructions.

4. Install Dependencies

mvn clean install

⚙️ Configuration

The application uses application.properties.yaml for configuration. Default values are provided, but you should override them using environment variables for production.

Key Configuration Files

  • src/main/resources/application.properties.yaml - Main configuration file
  • pom.xml - Maven dependencies and build configuration

Security Configuration

The application uses Spring Security with JWT tokens:

  • Public endpoints: /api/auth/**, /api/categories/**, /api/course/details/**
  • Protected endpoints: All other endpoints require authentication
  • Role-based access: Different roles (STUDENT, INSTRUCTOR, ADMIN) have different permissions

🏃 Running the Application

Development Mode

# Using Maven
mvn spring-boot:run

# Or using Maven wrapper (Windows)
.\mvnw.cmd spring-boot:run

# Or using Maven wrapper (Unix/Mac)
./mvnw spring-boot:run

Production Build

# Build the JAR file
mvn clean package -DskipTests

# Run the JAR
java -jar target/edtechplatform-0.0.1-SNAPSHOT.jar

The application will start on http://localhost:8080 by default.

📚 API Documentation

Base URL

http://localhost:8080

Authentication Endpoints

Method Endpoint Description Auth Required
POST /api/auth/sendotp Send OTP for registration No
POST /api/auth/signup Register new user No
POST /api/auth/login Login user No
POST /api/auth/changepassword Change password Yes

Course Endpoints

Method Endpoint Description Auth Required
POST /api/course/create Create new course Yes (Instructor)
PUT /api/course/edit Edit course details Yes (Instructor)
GET /api/course/details/{courseId} Get course details No
GET /api/course/instructor Get instructor's courses Yes (Instructor)
DELETE /api/course/delete/{courseId} Delete course Yes (Instructor)
POST /api/course/progress/update Update course progress Yes (Student)

Category Endpoints

Method Endpoint Description Auth Required
POST /api/categories/create Create category Yes (Admin)
GET /api/categories/all Get all categories No
GET /api/categories/{categoryId} Get category details No

Payment Endpoints

Method Endpoint Description Auth Required
POST /api/v1/payment/capturePayment Initiate payment Yes (Student)
POST /api/v1/payment/verifyPayment Verify payment Yes (Student)

Profile Endpoints

Method Endpoint Description Auth Required
PUT /api/v1/profile/update Update user profile Yes
DELETE /api/v1/profile/delete Delete user account Yes
GET /api/v1/profile/details Get profile details Yes
GET /api/v1/profile/enrolled-students Get enrolled students Yes (Instructor)

Rating & Review Endpoints

Method Endpoint Description Auth Required
POST /api/v1/review/create Create review Yes (Student)
GET /api/v1/review/average/{courseId} Get average rating No
GET /api/v1/review/all Get all reviews No

Section Endpoints

Method Endpoint Description Auth Required
POST /api/v1/section/create Create section Yes (Instructor)
PUT /api/v1/section/update Update section Yes (Instructor)
DELETE /api/v1/section/delete Delete section Yes (Instructor)

Subsection Endpoints

Method Endpoint Description Auth Required
POST /api/v1/subsection/create Create subsection Yes (Instructor)
PUT /api/v1/subsection/update Update subsection Yes (Instructor)
DELETE /api/v1/subsection/delete Delete subsection Yes (Instructor)

Contact Endpoints

Method Endpoint Description Auth Required
POST /api/v1/reach/contact Submit contact form No

About

A modern educational platform built using Spring Boot, Spring Security and MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages