How binhfnguyeen/englearn-backend works
Project type and purpose
• This is a full-stack e-learning web application:
• Frontend: Next.js (React-based UI)
• Backend: Spring Boot monolith exposing REST controllers, WebSocket endpoints, and GraphQL resolvers
• Database: MySQL for persistent data storage
• AI Chat Memory: Uses Spring AI chat memory repositories (JDBC)
• Auxiliary services: Email (OTP), authentication (JWT/OAuth)
File structure
• Top-level artifacts
• Dockerfile + Maven wrapper + pom.xml → build & containerization
• src/main/java/com/heulwen/configs → Spring configuration (security, WebSocket, AI chat)
• src/main/java/com/heulwen/controllers → REST API entry points
• src/main/java/com/heulwen/resolvers → GraphQL query/mutation resolvers
• src/main/java/com/heulwen/services → business logic layer
• src/main/java/com/heulwen/repositories → Spring Data JPA interfaces for MySQL
• src/main/java/com/heulwen/mapper → DTO ↔ entity conversion
• src/main/java/com/heulwen/pojo → JPA entity definitions
• src/main/java/com/heulwen/dto → request/response payload definitions
• src/main/java/com/heulwen/exceptions → global error handling
• src/main/resources → application.properties (DB, AI memory schemas)
README for additional insights
• Confirms stack and intended use (English learning site).
Detail without over-fragmentation
• Every layer: Presentation, API, Business, Persistence, External Integrations.
• Clarity of how components interact, where data lives, and how requests traverse the system.