A complete Learning Management System built with Java 21 & Spring Boot, designed to manage courses, users (students / teachers), groups, communities, assignments, submissions, and content. This project demonstrates clean architecture, modular design, role-based access control, JWT authentication, and production-ready backend practices.
Purpose: Manage users and their roles.
Responsibilities:
- Register and authenticate users (Student, Teacher, Admin)
- Issue and validate JWT tokens
- Enforce role-based access control on APIs
- Manage user profiles and basic account data
Purpose: Handle the lifecycle of courses.
Responsibilities:
- Create, update, and delete courses
- Assign instructors/teachers to courses
- Manage course categories, tags, and metadata
- Expose paginated and sortable course listings
Purpose: Support teaching and evaluation workflow.
Responsibilities:
- Allow teachers to create assignments with deadlines and instructions
- Allow students to submit assignments (file or text)
- Track submission history and versions
- Record grades and feedback for each submission
- Provide assignment listings by course or student
Purpose: Store and serve learning materials.
Responsibilities:
- Upload and manage course resources (videos, documents, notes, etc.)
- Store files locally or in cloud storage (Cloudinary / S3, if configured)
- Provide secure and controlled file download / access
- Optionally generate signed URLs for protected content
Purpose: Notify users about important events.
Responsibilities:
- Send email notifications for:
- New course enrollment
- Upcoming or overdue assignment deadlines
- Grades or feedback published
- Provide a pluggable notification mechanism for future channels
Purpose: Organize students into groups for collaboration or administration.
Responsibilities:
- Create, update, and delete groups
- Assign students to groups
- Associate group-specific resources or activities
- Support group-based visibility or access rules where needed
Purpose: Provide community spaces around topics or institutions.
Responsibilities:
- Create, update, and delete communities
- Attach courses, groups, and content to each community
- Provide a real-time web chat endpoint (WebSocket) for each community
Purpose: Protect the API and data.
Responsibilities:
- JWT-based authentication (login, token validation)
- Spring Security configuration (filters, authentication providers)
- Method-level authorization using annotations ()
- Password encoding and secure credential handling
Purpose: Interact with the database in a clean, abstracted way.
Responsibilities:
- Use Spring Data JPA repositories for entities like User, Course, Assignment, Submission, Group, Community, etc.
- Define query methods with pagination and sorting support
- Encapsulate ORM logic and mapping between entities and DTOs
- Support projections for optimized read queries
| Component | Technology |
|---|---|
| Backend | Java 21, Spring Boot |
| Security | Spring Security, JWT |
| Database | PostgreSQL |
| ORM | Hibernate, Spring Data JPA |
| Documentation | Swagger / OpenAPI, Insomnia |
| Build Tool | Maven |
| Storage | Local filesystem / Cloudinary |
| Real-time | WebSocket (Spring), STOMP / Socket.IO |
LearningManagementSystem βββ .idea βββ .mvn βββ logstash βββ src β βββ main β βββ java β β βββ com β β βββ maven β β βββ neuto β β βββ annotation β β βββ aspect β β βββ config β β βββ controller β β βββ enum β β βββ exception β β βββ mapstruct β β βββ model β β βββ payload β β βββ repository β β βββ security β β βββ service β β βββ serviceImplement β β βββ utils β β βββ NeuApplication.java β βββ resources β βββ static β βββ templates β β βββ email β βββ application.yml β βββ application-dev.yml β βββ application-prod.yml β βββ logback-spring.xml β βββ messages β βββ messages_en.properties β βββ messages_bn.properties βββ pom.xml
git clone https://github.com/Mahi12333/Learning-Management-System.git
cd Learning-Management-SystemCreate a .env or set system environment variables used by application.yml:
SPRING_DATASOURCE_URL=jdbc:mysql://localhost:3306/lms
SPRING_DATASOURCE_USERNAME=root
SPRING_DATASOURCE_PASSWORD=your-password
JWT_SECRET=your_jwt_secret_key_here
CLOUDINARY_URL=cloudinary://api_key:api_secret@cloud_name # optionalspring:
datasource:
url: ${SPRING_DATASOURCE_URL}
username: ${SPRING_DATASOURCE_USERNAME}
password: ${SPRING_DATASOURCE_PASSWORD}
jpa:
hibernate:
ddl-auto: update
show-sql: true
properties:
hibernate:
dialect: org.hibernate.dialect.MySQL8DialectNote:
ddl-auto: updateis convenient for development only. Use migrations (Flyway / Liquibase) for production.
mvn clean package
mvn spring-boot:runApplication will start on http://localhost:8080 by default.
If Swagger / OpenAPI is enabled:
http://localhost:8080/swagger-ui/index.html
POST /api/auth/registerβ Register a new userPOST /api/auth/loginβ Authenticate and receive JWT
GET /api/coursesβ List coursesPOST /api/coursesβ Create a course (TEACHER/ADMIN)PUT /api/courses/{id}β Update a courseDELETE /api/courses/{id}β Remove a course
POST /api/assignmentsβ Create assignmentGET /api/assignments/course/{courseId}β Assignments for a course
POST /api/submissionsβ Submit assignment (multipart)GET /api/submissions/student/{studentId}β Student submissions
POST /api/groupsβ Create groupPUT /api/groups/{id}β Update groupPOST /api/groups/{id}/studentsβ Add students to group
POST /api/communitiesβ Create communityGET /api/communities/{id}/chatβ Web chat endpoint (WebSocket)
Expand endpoints with pagination, sorting, and filters as needed.
- Integration tests: Spring Boot Test, Testcontainers (optional for DB)
- Postman collection:
/docs/postman_collection.json(optional)
- Use DTOs for all controller input/output.
- Centralize exception handling with
@ControllerAdvice. - Validate requests with
@Validand custom validators. - Use role-based method security (
@PreAuthorize) for fine-grained access. - Externalize credentials (use Vault / secrets manager for prod).
- Add API rate limiting on sensitive endpoints.
- Use Flyway / Liquibase for schema migrations.
- Add logging + request tracing (Spring Sleuth / OpenTelemetry).
Contributions are welcome! Please:
- Fork the repo
- Create a feature branch
- Open a PR describing your changes
Include tests and keep commits atomic.
This project is licensed under the MIT License β see LICENSE file.
Maintainer β Mahitosh Giri Name (mahitoshgiri287.email@example.com)