Sign inSign up

mohdmusheer/std

By mohdmusheer

•Updated 9 days ago

Image
0

120

mohdmusheer/std repository overview

⁠EduManage — Training Institute Management System

A production-ready Enterprise Educational & Training Institute Management System built with Spring Boot 2.7.18, JSP Views, Spring Security, Spring Data JPA, and Neon PostgreSQL.


ā šŸ“– Backstory & Engineering Evolution

Originally built as an on-premise Java application using MySQL and SQL Server, EduManage was modernized and containerized to run seamlessly in modern cloud environments.

⁠Key Engineering Milestones & Solutions
  1. Serverless Cloud PostgreSQL Integration (Neon DB):

    • Migrated from legacy SQL Server/MySQL to Neon PostgreSQL serverless cloud infrastructure.
    • SCRAM-SHA-256 Authentication Fix: Resolved IllegalArgumentException: iteration must be >= 4096 caused by Spring Boot 2.7.18's default PostgreSQL driver (42.3.8) by upgrading to org.postgresql:postgresql:42.7.3.
  2. Startup Blocking & Resilient Initialization:

    • Fixed application startup hangs occurring between EntityManagerFactory initialization and Tomcat server launch.
    • Made DataInitializer⁠ non-blocking and transactional so default seed accounts (admin / admin123) are safely created without throwing uncaught startup errors or halting the container.
    • Added DataSourceConfig⁠ to sanitize and trim database connection URLs and secret credentials, preventing hidden space artifacts from breaking HikariCP authentication.
  3. External Service Resilience (S3 & SMTP):

    • Configured non-blocking fallbacks for S3-compatible cloud storage and added connection/timeout bounds (10,000ms) on JavaMail SMTP settings so third-party network failures do not prevent web application startup.
  4. Production Multi-Stage Dockerization:

    • Designed a minimal, secure multi-stage Dockerfile using standard OpenJDK 17 (eclipse-temurin:17-jre-alpine) that package the application as a standalone WAR and listen dynamically on environment-specified $PORT.

⁠✨ Features & User Roles

  • 🌐 Public Portal:
    • Landing page with course listings, contact form, and auto-triggering inquiry popup modal.
    • Public student registration form saved in PENDING state.
  • šŸ”‘ System Administrator:
    • Review and approve/reject pending student registrations (auto-generates student login upon approval).
    • Manage trainers, create course batches, assign trainers and students to batches.
    • Access system-wide reports and metrics.
  • šŸ‘Øā€šŸ« Trainer Dashboard:
    • View assigned batches and enrolled students.
    • Mark daily student attendance.
    • Publish task assignments and evaluate student file submissions with marks/feedback.
  • šŸŽ“ Student Dashboard:
    • View enrolled batch information and personal attendance records.
    • Access assigned tasks and submit assignment files.
    • Review trainer feedback and grades.

ā šŸ› ļø Prerequisites

  • Docker Desktop (Recommended) or Docker Engine 20+
  • JDK 17 and Maven 3.9+ (if building locally outside Docker)
  • Neon PostgreSQL Connection Connection String (or any PostgreSQL 12+ database)

ā āš™ļø Environment Configuration (.env)

Create or update a .env file in the root directory:

# Server Port
PORT=8080

# Neon PostgreSQL Database Connection
SPRING_DATASOURCE_URL=jdbc:postgresql://ep-crimson-grass-b5bw346l-pooler.c-7.us-east-2.aws.neon.tech/neondb?sslmode=require&channel_binding=require
SPRING_DATASOURCE_USERNAME=neondb_owner
SPRING_DATASOURCE_PASSWORD=your_neon_password_here

# S3-Compatible Cloud Storage Credentials
AWS_ENDPOINT_URL_S3=https://br-late-king-b5snzdyj.storage.c-7.us-east-2.aws.neon.tech
AWS_ACCESS_KEY_ID=your_access_key_here
AWS_SECRET_ACCESS_KEY=your_secret_key_here
AWS_REGION=us-east-2

# SMTP Email Configuration (Optional)
SPRING_MAIL_HOST=smtp.gmail.com
SPRING_MAIL_PORT=587
[email protected]
SPRING_MAIL_PASSWORD=your_app_password

ā šŸš€ Step-by-Step Build & Run Instructions

  1. Build the Docker Image:

    docker build -t edumanage:latest .
    
  2. Run the Docker Container:

    docker run -d -p 8080:8080 --env-file .env --dns 8.8.8.8 --name edumanage-app edumanage:latest
    
  3. Check Container Logs:

    docker logs -f edumanage-app
    

    Verify that logs contain Started EduManageApplication and >>> Default admin created: admin / admin123.

  4. Access Application: Open browser at: http://localhost:8080⁠


⁠Option 2: Local Maven Build
  1. Compile and Package WAR:

    mvn clean package -DskipTests
    
  2. Run Application:

    java -jar target/edumanage.war
    

ā šŸ” Default Administrator Login

On first boot, the system automatically initializes an admin user:

FieldValue
Usernameadmin
Passwordadmin123
RoleSystem Administrator

ā šŸ“‚ Project Architecture & Directory Structure

edumanage/
ā”œā”€ā”€ Dockerfile                  # Multi-stage Docker build manifest
ā”œā”€ā”€ .dockerignore               # Container build exclusions
ā”œā”€ā”€ .env                        # Local environment variables & secrets
ā”œā”€ā”€ pom.xml                     # Maven project descriptor & dependencies
ā”œā”€ā”€ LICENSE                     # MIT License
ā”œā”€ā”€ README.md                   # Project documentation
└── src/
    └── main/
        ā”œā”€ā”€ java/com/edumanage/
        │   ā”œā”€ā”€ config/         # SecurityConfig, DataSourceConfig, DataInitializer, MvcConfig
        │   ā”œā”€ā”€ controller/     # AdminController, TrainerController, StudentController, HomeController...
        │   ā”œā”€ā”€ model/          # User, Inquiry, Registration, Batch, Attendance, Task, Submission
        │   ā”œā”€ā”€ repository/     # Spring Data JPA Repository Interfaces
        │   └── service/        # Business Logic & Email/S3 Integration
        ā”œā”€ā”€ resources/
        │   └── application.properties  # Central application configuration
        └── webapp/
            └── WEB-INF/views/  # JSP Views & UI Components

ā šŸ“„ License

This project is licensed under the MIT License⁠.

Tag summary

Content type

Image

Digest

sha256:911d19a24…

Size

113.3 MB

Last updated

9 days ago

docker pull mohdmusheer/std