MiniEdu is a modular, backend-focused microservices-based educational platform designed for scalability, security, and asynchronous communication.
- Docker – Containerization of microservices
- Kubernetes – Container orchestration and scaling
- AWS (planned) – Cloud hosting, S3 for media storage, SES for email delivery
- Redis – Distributed caching for tokens/sessions
- Apache Kafka – Asynchronous event-driven communication
- PostgreSQL – Relational database for persistent storage
- Java 17 – Primary language for microservices
- Spring Boot – Base framework for each microservice
- Spring Security – Secure access control using JWT
- gRPC – Fast inter-service communication
- Custom Security SDK – Shared JWT generation and validation
- Lombok & Java Records – Reduce boilerplate and ensure immutability
Handles:
- User registration
- Login
- Email verification (via
isActiveflag) - JWT generation using Security SDK
Responsibilities:
- Password hashing
- Stores user details in PostgreSQL
- Sends
UserRegisteredEventto Kafka for triggering verification emails
Endpoints:
POST /registerPOST /loginGET /verify?token=...
Provides:
generateToken(userDetails)– For issuing JWTs during loginvalidateToken(token)– For authenticating API requests
Used by:
- User Microservice
- Enrollment Microservice
- Course Microservice
Integrated directly as a dependency in each service.
Handles:
- Sending verification emails upon user registration
Responsibilities:
- Listens to
UserRegisteredEventfrom Kafka - Sends emails using SMTP or AWS SES
- Generates email verification links
Communication:
- Kafka subscriber
- Optional REST endpoint for internal testing
Handles:
- Enrolling users into available courses
Responsibilities:
- Validates JWT using Security SDK
- Stores user-course relationships
- May emit enrollment events for analytics
Endpoints:
POST /enrollGET /my-enrollments
Handles:
- Managing and serving course metadata and materials
Responsibilities:
- CRUD operations for courses
- Streams content (PDFs, videos, etc.)
- Validates JWT before granting access
Endpoints:
POST /coursesGET /courses/:idGET /courses
| Purpose | Type | Protocol |
|---|---|---|
| Client ↔ Microservices | REST | HTTP |
| Microservice ↔ Microservice | Synchronous | gRPC |
| Event Handling (e.g. emails) | Async | Kafka |
- Occurs after successful login or registration
- Generated via
Security SDKusing user details
- Included in
Authorization: Bearer <token>header - Validated inside each microservice using
Security SDK
Security SDK ensures:
- Token signature integrity
- Expiration and issuer validation
- Validates and stores user
- Sets
isActive = false - Emits
UserRegisteredEventto Kafka
- Generates a secure verification link
- Sends email to the user
- Verifies token from the link
- Sets
isActive = true
| Microservice | Role | Uses JWT (Security SDK) | Uses Kafka |
|---|---|---|---|
| User Service | User auth, registration, tokens | ✅ | ✅ |
| Email Service | Sends verification emails | ❌ | ✅ |
| Enrollment Service | Manages enrollments | ✅ | Optional |
| Course Service | Hosts course data/content | ✅ | Optional |
| Security SDK | Shared JWT logic | — | — |