How elesquina/pixellms works
Project type and purpose
• Pixel LMS is a full-stack web application (Learning Management System).
• Frontend: Single Page Application built with Vue.js.
• Backend: RESTful API server built with Spring Boot (Java).
• Database: Relational database managed via raw SQL (PostgreSQL or similar).
• Purpose: Manage courses, assignments, events, discussions, and role-based user access in an academic setting.
File structure
• Top-level directories:
• pixel_frontend/ – Vue.js application (components, views, router, plugins, assets).
• pixel_backend/ – Spring Boot application (controllers, models, repositories, security, utilities).
• sql/ – DDL scripts, stored procedures, transactions.
• dummy data/ – Test data generation notebooks and CSV files.
• Configuration files:
• application.properties in backend for DB and security settings.
• vue.config.js, babel.config.js, package.json in frontend.
• Build scripts:
• Maven wrapper (mvnw) for backend.
• npm scripts for frontend.
Read README for architecture and patterns
• MVC pattern: Controllers (REST layer), Models (domain objects), Views (Vue components).
• Design patterns:
• Factory (hashing algorithms)
• Strategy (row mapping)
• Command (permission checks)
• GlobalExceptionHandler (ControllerAdvice)
• Security: Bearer tokens, role-based permissions, interceptors.
Main components
a. Frontend SPA (Vue.js)
• Pages/Views (Login, Dashboard, Course Views, Admin Panels)
• API client module handling HTTP requests and token management
b. Backend REST API (Spring Boot)
• Controllers (AuthController, CourseController, TaskController, etc.)
• Security layer (TokenInterceptor, PermissionChecker, CommandRegistry)
• Service/Utility components (AuthHandler, FileStorageManager)
• Repository layer (DAO using raw SQL and RowMapperStrategy)
• GlobalExceptionHandler
c. Database
• Tables: user, course, task, calendar, discussion, message, file, etc.
• Stored procedures and transactional scripts
d. File storage
• Local filesystem or cloud bucket managed by FileStorageManager
e. External tools (for testing & data)
• Postman for API testing
• Python notebook for dummy-data generation
Relationships and interactions
• Frontend ↔ Backend: REST calls over HTTPS, Bearer token in Authorization header.
• Backend Security:
• On each request, TokenInterceptor validates token via TokenRegistry.
• PermissionChecker and CommandRegistry enforce RBAC per endpoint.
• Backend ↔ Database:
• Controllers delegate to repository layer, which executes raw SQL queries.
• RowMapperStrategy maps result sets into Java model objects.
• Backend ↔ File Storage:
• FileController uses FileStorageManager to save/retrieve files.
• Transactional boundaries:
• @Transactional on service methods coordinate multi-step operations (e.g., course creation).
Architectural patterns
• Layered MVC: separates presentation, business logic, data access.
• Command Pattern: encapsulates permission checks per action.
• Strategy Pattern: pluggable row mapping strategies.
• Factory Pattern: dynamic selection of hashing algorithm.
• Global Exception Handling: centralized error responses.