Bản đồ trả lời nhanh

Trang này là cửa vào khi bạn đang báo cáo hoặc bị hỏi bất ngờ. Cách dùng: đọc câu hỏi của thầy, trả lời theo mẫu ngắn, rồi mở trang/file tương ứng nếu thầy muốn xem sâu.

Câu trả lời 60 giây

LMS Hàng Hải là hệ thống học trực tuyến cho giảng viên, học viên và quản trị. Backend dùng Java 21/Spring Boot theo Clean Architecture và DDD; frontend dùng Angular 20; dữ liệu dùng PostgreSQL quản lý bằng Flyway; video dùng R2/Shaka/HLS/DASH; offline dùng PWA, IndexedDB/Dexie; Wiii được tích hợp như AI assistant nhưng mọi thao tác nguy hiểm đều phải qua LMS preview/diff và quyền người dùng.

Nếu thầy hỏi thì mở đâu?

Câu hỏi của thầy Trả lời ngắn Mở trang Nhắc file/bảng
Dự án dùng công nghệ gì? Angular 20, Spring Boot 3.2, PostgreSQL/Flyway, Docker, R2, Shaka, PWA, Wiii. Kiến trúc, Câu hỏi bảo vệ fe/src/app, backend/src/main/java, db/migration
Docs đã đủ và câu chữ ổn chưa? Mở audit: kiểm font, flow, thông tin, UX/UI, DB count, search, link và claim hygiene đều có evidence. Kiểm toán độ sẵn sàng, Checklist chất lượng docs bundle exec jekyll build, link-check, encoding scan, browser smoke
Code chia lớp như thế nào? Controller nhận request, use case giữ nghiệp vụ, domain repository là port, adapter/JPA làm hạ tầng. Backend, Sơ đồ application/usecase, domain/repository, infrastructure/persistence
Muốn sửa UI thì mở file nào? Tìm route/component trong features, sửa .html, .scss, .ts; giữ design token. Vị trí file code, Frontend fe/src/app/features/...
UX/UI thiết kế có hợp lý không? Có, vì LMS là tool vận hành đào tạo: ưu tiên role layout, sidebar/table/form, trạng thái rõ, Toast/ConfirmDialog, responsive và token #0056D2. UX/UI và design system teacher-dashboard.component.*, course-editor, shared/components
Nếu yêu cầu đổi màu/layout thì mở đâu? Mở component .html/.scss của màn hình, giữ design token, smoke desktop/mobile và không đổi logic nguy hiểm chỉ ở FE. UX/UI và design system, Vị trí file code fe/src/app/features/..., fe/src/app/shared/components
Muốn sửa logic backend thì đi đâu? Mở controller để tìm endpoint, rồi vào use case, repository adapter, migration nếu đổi DB. Vị trí file code, Luồng nghiệp vụ *ControllerV3, *UseCase, *JpaEntity
Database có bao nhiêu bảng? Theo Flyway và DB sống hiện tại: 78 application tables, 2 materialized views, 107 migration SQL files; flyway_schema_history không tính là bảng nghiệp vụ. SQL schema catalog, DB sống và ERD DBeaver backend/src/main/resources/db/migration, schema public
Vì sao V135 không phải 135 bảng? V135 là version migration cuối; có version bị bỏ trống và V54.1, nên số version không bằng số bảng. Database timeline V135__video_storage_governance.sql
Học viên xem nội dung nào? Học viên đọc course_publications snapshot, không đọc draft trực tiếp. Publication course_publications, courses, lessons
Payment chống sửa giá thế nào? Frontend chỉ điều hướng/hiển thị; backend verify IPN/webhook rồi mới cập nhật giao dịch. Payment PaymentControllerV3, payment_transactions
Wiii được làm gì? Wiii được quan sát, highlight, click target safe và tạo draft; không tự submit/delete/publish/grade/payment. Wiii WiiiContextService, data-wiii-click-safe
Video lớn xử lý ra sao? Upload presigned, lưu object storage, ingest bằng job/worker, phát HLS/DASH qua Shaka. Video/offline, Runtime video_assets, video_renditions, video_ingest_jobs
Nếu 20.000 người vào cùng lúc thì sao? Không đoán số tuyệt đối nếu chưa load test; nói theo bottleneck, cache, DB pool, video CDN/R2, autoscale. Câu hỏi bảo vệ Actuator, DB metrics, load-test report
Demo lỗi thì xử lý thế nào? Không mất bình tĩnh: chuyển sang docs, Swagger, CodeMap, DBeaver, rồi giải thích bằng evidence. Kịch bản demo, Troubleshooting docker ps, curl /actuator/health

12 luồng nghiệp vụ cần thuộc

Luồng Actor UI/route cần nhớ Backend/API Bảng/nguồn dữ liệu Invariant cần nói
Login/JWT/role Tất cả user Auth pages, AuthService AuthControllerV3, JWT filter users, login_attempts Backend security quyết định cuối cùng, UI guard chỉ hỗ trợ UX
Teacher tạo course Teacher Teacher dashboard, course editor CourseAuthoringControllerV3 courses, chapters, lessons Teacher sửa draft
Submit/approve Teacher, ORG_ADMIN/ADMIN Teacher submit, admin review review/approve use cases course_publications, course_review_events Learner đọc snapshot, không đọc draft
Student enroll/học Student Course detail, learning page enrollment/progress APIs enrollments, student_lesson_progress Cần entitlement hợp lệ
Quiz/question bank Teacher, Student Quiz editor, quiz attempt QuizControllerV3, QuestionControllerV3 quizzes, questions, quiz_attempts Không để AI/student tự submit trái quyền
Assignment/grading Teacher, Student Assignment pages, grading UI submission/rubric/grading APIs assignments, assignment_submissions, grading_audit_log Grade phải có role/ownership và audit
File/document upload Teacher/Admin Upload widgets, editor media PresignedUploadUseCase upload_sessions, file_attachments Upload lớn đi qua presigned flow
Video ingest/playback Teacher, Student Video block, learning player video asset/ingest/playback services video_assets, video_renditions, video_progress Ingest không chặn web request dài
Offline/PWA Student Download/offline learning sync/offline telemetry APIs IndexedDB, client_offline_storage_telemetry Backend vẫn là source of truth
Payment/revenue Student, Teacher/Admin Checkout, history, revenue pages PaymentControllerV3, VNPay/SePay use cases payment_transactions, revenue_splits, payout_requests Gateway/webhook verified mới là payment truth
Wiii/AI Teacher/Student AI chat/embed, Pointy target AI/Wiii token/context APIs chat_sessions, chat_messages, ai_insights Preview/diff trước apply; không mutation nguy hiểm
STCW competency Teacher/Admin Competency map CompetencyMappingController maritime_standards, standard_competencies, lesson_competency_mappings Mapping là evidence coverage, không thay lesson content

Cách nói cho đúng

Không nên nói Nên nói
“Database có 88 hoặc 108 bảng.” “Theo Flyway và DB sống hiện tại có 78 application tables, 2 materialized views, 107 migration SQL files; DBeaver có thể hiển thị thêm object kỹ thuật như flyway_schema_history.”
“108 SQL nghĩa là 108 Flyway migration.” rg --files -g '*.sql' có thể đếm cả SQL dump ngoài migration; Flyway migration trong backend/src/main/resources/db/migration hiện là 107 file.”
“UI đẹp là được.” “UI phải phục vụ nghiệp vụ LMS: role layout rõ, thao tác nguy hiểm có confirm/guard, responsive, trạng thái loading/empty/error và token nhất quán.”
“Web chịu được 500.000 người.” “Chưa có load test thì không khẳng định số tuyệt đối; em sẽ đo theo RPS, concurrent users, p95 latency, DB pool, cache và media bandwidth.”
“Wiii tự tạo và publish bài.” “Wiii tạo draft/patch; LMS hiển thị preview/diff, teacher/admin xác nhận thì LMS mới apply.”
“Frontend chặn là đủ.” “Frontend guard giúp UX, nhưng backend SecurityConfig, @PreAuthorize, ownership và use case mới là ranh giới an toàn.”
“Sửa migration cũ cho nhanh.” “Migration đã chạy thì không sửa; tạo migration mới để schema thay đổi có lịch sử.”

Công thức trả lời khi bị hỏi sâu

  1. Nói actor: ai thao tác?
  2. Nói UI: route/component nào?
  3. Nói API: controller/endpoint nào nhận request?
  4. Nói nghiệp vụ: use case nào giữ rule?
  5. Nói dữ liệu: bảng hoặc JSONB nào lưu?
  6. Nói an toàn: role, ownership, publication, payment truth, audit hoặc preview/diff.
  7. Nói evidence: build/test/link/smoke/curl/DB query nào chứng minh.

Lệnh kiểm nhanh trước buổi báo cáo

cd E:\Sach\Sua\LMS_hohulili
docker exec lms-docs-site bash -lc "cd /workspace/docs-site && bundle exec jekyll build"
node scripts\generate-schema-catalog.mjs
curl http://localhost:8088/actuator/health
cd fe
npm run build

Nếu localhost:8088 không phải backend LMS vì bị container khác chiếm port, đừng cố demo mù. Mở Chạy local và sửa code, kiểm docker ps, rồi giải thích bằng docs/code map trước.