How yayasan-arrofii-lms/backend works
This is an Express/TypeScript backend for the Sekolah Alam LMS. Its user-facing flow is API requests for accounts, classes, enrollment, learning materials, and quizzes, processed by controllers and services before data access through Prisma. The README also identifies collaboration and progress tracking as product capabilities; their detailed implementation is not sampled here. The graph separates those documented domains from verified call paths. Some connections are supported only by the SOURCE INDEX; unsampled internals are not expanded.
Main entry points: class.controller.ts Class controller · auth.service.ts Auth service · materialImage.service.ts Material images · auth.controller.ts Auth controller
Components 25
API and identity
- Express API
src/index.ts - Auth controller
src/api/v1/controllers/auth.controller.ts - Auth service
src/api/v1/services/auth.service.ts - User service
src/api/v1/services/user.service.ts - Token service
src/api/v1/services/token.service.ts - Email delivery
src/api/v1/helpers/email.ts
Learning workflows
- Class controller
src/api/v1/controllers/class.controller.ts - Class service
src/api/v1/services/class.service.ts - Enrollment controller
src/api/v1/controllers/enrollment.controller.ts - Enrollment service
src/api/v1/services/enrollment.service.ts - Learning materials
src/api/v1/controllers/material.controller.ts - Material images
src/api/v1/services/materialImage.service.ts - Quiz controller
src/api/v1/controllers/quiz.controller.ts - Quiz service
src/api/v1/services/quiz.service.ts - Recommendations
src/api/v1/services/recommendation.service.ts - Progress tracking
src/api/v1/controllers/dashboard.controller.ts
Persistence and media
- File handling
src/api/v1/helpers/file.ts - Image processing
src/api/v1/helpers/imageCompress.ts - Response formatting
src/api/v1/helpers/baseResponse.ts - User records
src/api/v1/repositories/user.repository.ts - Enrollment records
src/api/v1/repositories/enrollment.repository.ts - Quiz records
src/api/v1/repositories/quiz.repository.ts - Image records
src/api/v1/repositories/materialImage.repository.ts - Prisma database
src/database/index.ts
Other components
- Learners and educators
Connections 27
- Learners and educators → Express API: uses LMS
- Express API → Auth controller: routes requests
- Auth controller → Auth service: calls
src/api/v1/controllers/auth.controller.ts - Auth service → User service: manages users
src/api/v1/services/auth.service.ts - Auth service → Token service: uses tokens
src/api/v1/services/auth.service.ts - Auth service → Email delivery: sends OTP
src/api/v1/services/auth.service.ts - User service → User records: delegates
src/api/v1/services/user.service.ts - User records → Prisma database: reads and writes
src/api/v1/repositories/user.repository.ts - Token service → User service: uses users
src/api/v1/services/token.service.ts - Class controller → Class service: calls
src/api/v1/controllers/class.controller.ts - Class controller → Enrollment records: checks teacher
src/api/v1/controllers/class.controller.ts - Class controller → Image processing: optimizes images
src/api/v1/controllers/class.controller.ts - Class controller → File handling: saves uploads
src/api/v1/controllers/class.controller.ts - Enrollment controller → Enrollment service: calls
src/api/v1/controllers/enrollment.controller.ts - Enrollment service → Enrollment records: queries enrollment
src/api/v1/services/enrollment.service.ts - Enrollment records → Prisma database: reads and writes
src/api/v1/repositories/enrollment.repository.ts - Quiz controller → Quiz service: calls
src/api/v1/controllers/quiz.controller.ts - Quiz service → Quiz records: delegates
src/api/v1/services/quiz.service.ts - Quiz records → Prisma database: reads and writes
src/api/v1/repositories/quiz.repository.ts - Learning materials → Material images: manages images
- Material images → Image records: delegates
src/api/v1/services/materialImage.service.ts - Material images → File handling: uses file handling
src/api/v1/services/materialImage.service.ts - Material images → Image processing: processes images
- Auth controller → Response formatting: formats response
src/api/v1/controllers/auth.controller.ts - Enrollment controller → Response formatting: formats response
src/api/v1/controllers/enrollment.controller.ts - Learners and educators → Recommendations: gets recommendations
- Learners and educators → Progress tracking: views progress