System Architecture
Sakai LMS is built on a layered architecture that separates core services from presentation and tool functionality. This design enables modularity, extensibility, and maintainability across the platform.Architecture Layers
Sakai’s architecture consists of three primary layers:Kernel Layer
Core services and APIs that provide foundational functionality for all tools
Portal Layer
User interface framework that controls the outer UI and manages tool rendering
Tool Layer
Individual applications (assignments, gradebook, etc.) that provide specific functionality
High-Level Architecture Diagram
Component Manager
At the heart of Sakai is the Component Manager, which uses Spring Framework to configure and wire service implementations.The Component Manager creates the Sakai Application Context, which serves as the parent Spring context for the entire platform. Services are configured using
components.xml files in each module’s WEB-INF directory.Service Location Pattern
Sakai uses a service location pattern where tools access kernel services through the Component Manager rather than direct instantiation:Key Architectural Principles
1. Separation of Concerns
- Kernel: Provides core services (user management, authorization, content hosting)
- Portal: Manages UI chrome, navigation, and tool rendering
- Tools: Implement specific educational features
2. API/Implementation Split
Each service is defined as:- API (interface): Located in
kernel/api/src/main/java/org/sakaiproject/*/api/ - Implementation: Located in
kernel/kernel-impl/src/main/java/org/sakaiproject/*/impl/
3. Spring-Based Dependency Injection
Services are wired using Spring XML configuration:Portal Architecture
The portal layer controls the outer UI and manages how tools are rendered to users.Portal Components
SkinnableCharonPortal
SkinnableCharonPortal
Main portal implementation that handles requests and delegates to handlersLocation:
portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.javaPortal Handlers
Portal Handlers
Special URL handlers for different portal functions:
- Direct tool access:
/portal/directtool/{tool-id}?sakai.site={site-id} - Bug reports:
/portal/generatebugreport
Render Engine
Render Engine
Manages tool rendering using templates (Morpheus theme)Module:
portal-render-engine-implEntity Producer Pattern
Many kernel services implement theEntityProducer interface, which enables:
- Archive and merge functionality
- Import/export capabilities
- Consistent entity handling
Services like
SiteService, UserDirectoryService, ContentHostingService, and AuthzGroupService all implement EntityProducer, enabling consistent site import/export functionality.Technology Stack
- Backend Framework: Spring Framework (dependency injection, MVC)
- ORM: Hibernate (for database persistence)
- Template Engine: Thymeleaf (preferred for new development)
- Frontend: Web Components using Lit library, Bootstrap 5.2
- Java Version: Java 17 (trunk), Java 11 (Sakai 22/23)
Module Structure
Typical Sakai module structure:Next Steps
Kernel Services
Learn about core kernel services and APIs
Tool Architecture
Understand how tools are structured
Sites & Workspaces
Explore site and workspace concepts