Skip to main content

Modules

This page is an overview map of the Gradle subprojects currently included in lumie-backend/settings.gradle.kts. Use it to understand module families, shared libraries, and where to jump for reference-grade details. For route, DTO, and failure-contract specifics, use the individual module pages linked below.

Every module here ships inside the same Spring Boot application and shares the same JVM, transaction manager, and PostgreSQL tenant model.

Shared Libraries

PathOwnership
libs/commonCross-cutting tenant, auth, exception, idempotency, logging, and base-entity support
libs/internal-apiPublished in-process service interfaces and cross-module events
libs/messagingShared AMQP constants used by queue-backed exam flows

How To Read This Map

  • app, libs/*, and every included modules/* subproject are assembled into one deployable backend jar.
  • Module names describe ownership boundaries inside the monolith, not separately deployed Java services.
  • Each linked module page is the source of truth for its public surface, internal API, data contracts, and failure behavior.

Platform Modules

Doc pageGradle modulePrimary source rootMain ownershipMain boundaries
Tenant Servicemodules:tenantmodules/tenant/src/main/java/com/lumie/tenantTenant registry, lifecycle state, custom IDs/domains, onboarding, logosPublishes TenantService and TenantCreatedEvent; used by auth, homepage, billing
Auth Servicemodules:authmodules/auth/src/main/java/com/lumie/authRegistration, login, JWT, refresh, sessions, profile, avatarPublishes AuthService, OwnerRegisteredEvent, StudentSelfRegisteredEvent; depends on Redis and tenant lookup
Billing Servicemodules:billingmodules/billing/src/main/java/com/lumie/billingPlans, subscriptions, billing keys, invoices, Alimtalk credits, tax invoicesConsumes TenantCreatedEvent; publishes BillingService; integrates with Toss and a stubbed Popbill adapter
Homepage Servicemodules:homepagemodules/homepage/src/main/java/com/lumie/homepageTenant homepage config and anonymous public homepage lookupConsumes TenantService through TenantLookupPort; owner-only writes
AI Servicemodules:aimodules/ai/src/main/java/com/lumie/aiConversations, chat proxying, tool execution, scheduled AI tasksIntegrates with chatbot-svc; re-enters backend through /internal/chatbot/**; uses a dedicated read-only JDBC path
Notification Servicemodules:notificationmodules/notification/src/main/java/com/lumie/notificationSMS sending, message history, templatesUses tenant-scoped messaging records and billing quota checks
File Servicemodules:filemodules/file/src/main/java/com/lumie/fileFile metadata, uploads/downloads, textbook folders, file linksIntegrates with MinIO; schedules object deletion after DB commit

Education And Operations Modules

Doc pageGradle modulePrimary source rootMain ownershipMain boundaries
Student Servicemodules:studentmodules/student/src/main/java/com/lumie/studentStudent records, imports, exports, lifecycle, credential linkagePublishes StudentService and StudentRegisteredEvent; depends on auth and class rules
Staff Servicemodules:staffmodules/staff/src/main/java/com/lumie/staffStaff lifecycle, permission catalog, staff permission assignmentsPublishes StaffService; consumes OwnerRegisteredEvent; depends on auth, billing, and class
Class Servicemodules:classmodules/class/src/main/java/com/lumie/classroomClasses, schedules, enrollments, dashboardsPublishes ClassService; used by staff, attendance, lecture, assignment
Attendance Servicemodules:attendancemodules/attendance/src/main/java/com/lumie/attendanceAttendance sessions, records, exports, statisticsDepends on class and student references
Assignment Servicemodules:assignmentmodules/assignment/src/main/java/com/lumie/assignmentAssignments, audience targets, submissions, dashboards, and exam-linked manual assignment grading orchestrationPublishes AssignmentService; depends on class, student, and exam internal APIs
Lecture Servicemodules:lecturemodules/lecture/src/main/java/com/lumie/lectureLectures and class-targeted lecture visibilityDepends on class references and tenant-safe class-target tables
Content Servicemodules:contentmodules/content/src/main/java/com/lumie/contentAnnouncements, Q&A, reviewsDepends on file links and class-aware visibility rules
Exam Servicemodules:exammodules/exam/src/main/java/com/lumie/examExams, templates, OMR jobs, reports, analyticsRabbitMQ, MinIO, direct worker HTTP, internal report/OMR surfaces, student backfill event
Tuition Servicemodules:tuitionmodules/tuition/src/main/java/com/lumie/tuitionGuardians, tuition invoices, tuition payments, cash receiptsExternal cash receipt and billing adapters; currently little published internal API surface

Subsystem Shape

The included modules cluster into a few stable backend subsystems:

SubsystemModulesWhy they are grouped
Tenant and identitytenant, auth, billing, homepageTenant bootstrap, authentication, quota, and tenant-facing config
Core academy operationsstudent, staff, class, attendance, assignment, lecture, contentDay-to-day academy data, scheduling, visibility, and lifecycle flows
Heavy async or external integrationsexam, ai, notification, file, tuitionWorker calls, messaging, storage, payment, and document-oriented integrations

Cross-Module Patterns In Use

  • adapter/in/internal/*Adapter is the normal synchronous boundary shape for libs/internal-api implementations.
  • @ApplicationModuleListener is the normal asynchronous boundary shape for cross-module follow-up after commit.
  • exam is the only module that currently uses libs/messaging directly, because it owns the RabbitMQ-backed grading and report pipelines.
  • homepage and staff show the preferred pattern of consuming published contracts instead of reaching into another module's repositories.

Current Build Notes

  • app/build.gradle.kts includes every module listed above in the backend jar.
  • modules/activity-log is present in the repository but absent from settings.gradle.kts, so it is not deployed.
  • admin-svc.md documents the staff module because the doc route kept the legacy backend naming.
  • modules:class is named class at the Gradle level but uses the Java package root com.lumie.classroom.

Verification

cd /Users/bluemayne/Projects/Lumie/lumie-backend
./gradlew projects
cd /Users/bluemayne/Projects/Lumie/lumie-document/docusaurus
npm run build

Expected success signals:

  • ./gradlew projects lists the included module paths from settings.gradle.kts, including modules:student, modules:staff, modules:class, modules:attendance, modules:assignment, modules:lecture, and modules:content.
  • Docusaurus finishes without MDX or broken-link errors for backend/modules.