EduSphere is a full-featured microservice-based educational platform built with Spring Boot. It demonstrates real-world architecture with:
- Inter-service communication (REST)
- Resilience patterns (like circuit breakers and retries)
- API gateway routing
- Docker-based containerization
- Comprehensive unit, integration, and repository testing
- Testcontainers-based integration testing with real PostgreSQL
This project is under active development. Structure and modules may change during development.
- Java 21
- Spring Boot 3
- Spring Data JPA
- Spring Web
- Spring Cloud Gateway (planned)
- PostgreSQL (per-service database)
- Flyway (database migrations)
- H2 Database (for local unit testing only)
- Testcontainers (for PostgreSQL-based integration tests)
- AWS SDK v2 (for S3-compatible storage)
- MinIO (local S3-compatible object storage)
- Swagger / OpenAPI 3
- Maven
- Docker & Docker Compose
Acts as an API Gateway and edge server, routing external requests to internal microservices and handling cross-cutting concerns like authentication, logging, and rate limiting.
Built with Spring Cloud Gateway.
Routes configured:
/edu/courses/** → forwards to courses-service/edu/profiles/** → forwards to profiles-service
This enables clean separation of client APIs from internal service URLs and simplifies client integration.
The Config Server provides centralized configuration management for all microservices in the edu-sphere system. It uses Spring Cloud Config to serve configuration properties from a Git repository.
Purpose:
- Centralizes and manages configuration for all environments (dev, test, prod).
- Enables configuration updates without rebuilding Docker images.
- Supports versioned configuration via Git.
Default setup:
- Runs on port
8888 - Registered with Eureka Discovery for service discovery
Eureka-based service registry that allows microservices to discover each other dynamically without hardcoding hostnames or ports.
Exposes dashboard at:
All other services (like courses-service, profiles-service) register themselves with Eureka at runtime.
Manages user profile data.
Endpoints:
POST /api/profiles/createPUT /api/profiles/updateGET /api/profiles/fetchDELETE /api/profiles/delete
Swagger UI: http://localhost:8080/swagger-ui/index.html
Handles courses, modules, and lessons.
Endpoints:
POST /api/courses/createPUT /api/courses/updateGET /api/courses/fetchDELETE /api/courses/delete
POST /api/modules/createPUT /api/modules/updateGET /api/modules/fetchDELETE /api/modules/delete
POST /api/lessons/createPUT /api/lessons/updateGET /api/lessons/fetchDELETE /api/lessons/delete
Swagger UI: http://localhost:8081/swagger-ui/index.html
Handles upload and download of educational content (images, PDFs, videos, etc). Files are stored in an S3-compatible object store (MinIO). Metadata is stored in PostgreSQL via the ContentItem entity.
Endpoints:
POST /contents/upload— Upload a fileGET /contents/download/{key}— Download a file by key
Swagger UI: http://localhost:8083/swagger-ui/index.html
Builds Docker images for all microservices and starts the system using Docker Compose.
./build-and-run.shMake sure Docker is running before executing this script.
Stops all running containers related to the project and removes their volumes. This is useful to reset the environment during development or troubleshooting.
./stop-and-clean.shStops all running services, removes containers, images, and volumes used by the system.
./stop-and-purge.shUse this to fully clean and reset the Docker environment, including local images and data volumes.
- JUnit-based controller tests
- Repository tests using H2 and
@DataJpaTest - Repository tests with Flyway-based database setup (
application-test-jpa.yml) - Integration tests using Testcontainers (PostgreSQL), Flyway migrations, and @SpringBootTest
- MockMvc tests for REST APIs
- Entity auditing tests
Testcontainers integration allows realistic PostgreSQL-backed testing scenarios with full isolation and no external dependencies.
MIT License