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
| Path | Ownership |
|---|---|
libs/common | Cross-cutting tenant, auth, exception, idempotency, logging, and base-entity support |
libs/internal-api | Published in-process service interfaces and cross-module events |
libs/messaging | Shared AMQP constants used by queue-backed exam flows |
How To Read This Map
app,libs/*, and every includedmodules/*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 page | Gradle module | Primary source root | Main ownership | Main boundaries |
|---|---|---|---|---|
| Tenant Service | modules:tenant | modules/tenant/src/main/java/com/lumie/tenant | Tenant registry, lifecycle state, custom IDs/domains, onboarding, logos | Publishes TenantService and TenantCreatedEvent; used by auth, homepage, billing |
| Auth Service | modules:auth | modules/auth/src/main/java/com/lumie/auth | Registration, login, JWT, refresh, sessions, profile, avatar | Publishes AuthService, OwnerRegisteredEvent, StudentSelfRegisteredEvent; depends on Redis and tenant lookup |
| Billing Service | modules:billing | modules/billing/src/main/java/com/lumie/billing | Plans, subscriptions, billing keys, invoices, Alimtalk credits, tax invoices | Consumes TenantCreatedEvent; publishes BillingService; integrates with Toss and a stubbed Popbill adapter |
| Homepage Service | modules:homepage | modules/homepage/src/main/java/com/lumie/homepage | Tenant homepage config and anonymous public homepage lookup | Consumes TenantService through TenantLookupPort; owner-only writes |
| AI Service | modules:ai | modules/ai/src/main/java/com/lumie/ai | Conversations, chat proxying, tool execution, scheduled AI tasks | Integrates with chatbot-svc; re-enters backend through /internal/chatbot/**; uses a dedicated read-only JDBC path |
| Notification Service | modules:notification | modules/notification/src/main/java/com/lumie/notification | SMS sending, message history, templates | Uses tenant-scoped messaging records and billing quota checks |
| File Service | modules:file | modules/file/src/main/java/com/lumie/file | File metadata, uploads/downloads, textbook folders, file links | Integrates with MinIO; schedules object deletion after DB commit |
Education And Operations Modules
| Doc page | Gradle module | Primary source root | Main ownership | Main boundaries |
|---|---|---|---|---|
| Student Service | modules:student | modules/student/src/main/java/com/lumie/student | Student records, imports, exports, lifecycle, credential linkage | Publishes StudentService and StudentRegisteredEvent; depends on auth and class rules |
| Staff Service | modules:staff | modules/staff/src/main/java/com/lumie/staff | Staff lifecycle, permission catalog, staff permission assignments | Publishes StaffService; consumes OwnerRegisteredEvent; depends on auth, billing, and class |
| Class Service | modules:class | modules/class/src/main/java/com/lumie/classroom | Classes, schedules, enrollments, dashboards | Publishes ClassService; used by staff, attendance, lecture, assignment |
| Attendance Service | modules:attendance | modules/attendance/src/main/java/com/lumie/attendance | Attendance sessions, records, exports, statistics | Depends on class and student references |
| Assignment Service | modules:assignment | modules/assignment/src/main/java/com/lumie/assignment | Assignments, audience targets, submissions, dashboards, and exam-linked manual assignment grading orchestration | Publishes AssignmentService; depends on class, student, and exam internal APIs |
| Lecture Service | modules:lecture | modules/lecture/src/main/java/com/lumie/lecture | Lectures and class-targeted lecture visibility | Depends on class references and tenant-safe class-target tables |
| Content Service | modules:content | modules/content/src/main/java/com/lumie/content | Announcements, Q&A, reviews | Depends on file links and class-aware visibility rules |
| Exam Service | modules:exam | modules/exam/src/main/java/com/lumie/exam | Exams, templates, OMR jobs, reports, analytics | RabbitMQ, MinIO, direct worker HTTP, internal report/OMR surfaces, student backfill event |
| Tuition Service | modules:tuition | modules/tuition/src/main/java/com/lumie/tuition | Guardians, tuition invoices, tuition payments, cash receipts | External cash receipt and billing adapters; currently little published internal API surface |
Subsystem Shape
The included modules cluster into a few stable backend subsystems:
| Subsystem | Modules | Why they are grouped |
|---|---|---|
| Tenant and identity | tenant, auth, billing, homepage | Tenant bootstrap, authentication, quota, and tenant-facing config |
| Core academy operations | student, staff, class, attendance, assignment, lecture, content | Day-to-day academy data, scheduling, visibility, and lifecycle flows |
| Heavy async or external integrations | exam, ai, notification, file, tuition | Worker calls, messaging, storage, payment, and document-oriented integrations |
Cross-Module Patterns In Use
adapter/in/internal/*Adapteris the normal synchronous boundary shape forlibs/internal-apiimplementations.@ApplicationModuleListeneris the normal asynchronous boundary shape for cross-module follow-up after commit.examis the only module that currently useslibs/messagingdirectly, because it owns the RabbitMQ-backed grading and report pipelines.homepageandstaffshow the preferred pattern of consuming published contracts instead of reaching into another module's repositories.
Current Build Notes
app/build.gradle.ktsincludes every module listed above in the backend jar.modules/activity-logis present in the repository but absent fromsettings.gradle.kts, so it is not deployed.admin-svc.mddocuments thestaffmodule because the doc route kept the legacy backend naming.modules:classis namedclassat the Gradle level but uses the Java package rootcom.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 projectslists the included module paths fromsettings.gradle.kts, includingmodules:student,modules:staff,modules:class,modules:attendance,modules:assignment,modules:lecture, andmodules:content.- Docusaurus finishes without MDX or broken-link errors for
backend/modules.