How zayed-rahat/lms_project_dev-team_omega works
1. This is a three-app LMS monorepo: a Flutter application for Android/iOS/web, a React/Vite client web app, and a TypeScript/Node backend API. The apps are separated by boundary, but they share the same domain model and API contract.
2. The core business domain is learning-management: authentication, users, courses, course content, enrollments, quizzes, forums, attendance, events, profiles, and password recovery. Role separation is central: student, teacher/instructor, admin, and general authenticated user flows appear throughout the repo.
3. The backend (LMS-ServerAPP) is the system of record. It is structured as an Express-style layered API with controller -> service -> model -> route per feature, plus validators and shared middleware. The source tree is TypeScript under src/, with compiled output in dist/, showing a build-and-run server rather than direct TS execution.
4. Server request handling is explicitly cross-cutting: route handlers pass through validation middleware, auth middleware, standardized response helpers, and a global error handler. Custom error types are isolated under app/errors, so architecture diagrams should show a centralized error/response boundary around all modules.
5. Server modules are feature-based and map closely to LMS capabilities: User, Admin, Student, Courses, Content, Enrollment, Quizes, Forums, Attendance, and Events. Each module owns its own route/controller/service/model/validation files, which is a strong bounded-context signal.
6. The backend also owns integration concerns that affect the UI: sendEmail for notifications or recovery flows, uploadImage plus an uploads/ directory for persisted media, and date/time formatting utilities. These are not generic helpers; they are part of the application’s data flow and should be shown as server-side support services.
7. The React client (LMS-ClientAPP) is a browser SPA built with Vite, TypeScript, Redux, and route-based code organization. It uses a shared baseAPI and feature APIs/slices under src/redux/feature/*, so the web app’s data flow is component/page -> Redux API layer -> backend API.
8. The web app is strongly role-routed. There are separate route definitions for admin, student, and teacher flows, plus a PrivateRoute guard. Pages are grouped by business area rather than technical layer, such as Courses, Quiz, Forum, Resources, StudentPages, TeacherPages, and AdminPages.
9. The web client has a distinct analytics/reporting surface that is not just CRUD UI: chart components, ranking/score analytics, and PDF report components exist alongside LMS pages. That means the diagram should include a reporting/analytics branch fed from quiz and student data, not just operational screens.
10. The Flutter app (LMS-AndroidAPP/flutter_application) mirrors the same LMS domain but with a mobile-first architecture. It uses a module pattern with bindings, controllers, and views, plus repositories and providers for data access, indicating a GetX-style separation between UI state and API access.
11. The Flutter data layer is more explicit than the web client’s: there are typed payload/response models for each feature, a dedicated api_provider, and a login_response_provider for session/user state. The flow is typically route/view -> controller -> repository -> API provider -> backend, with model classes handling serialization boundaries.
12. The mobile app also carries platform and presentation infrastructure: Android and iOS native shells, asset bundles for fonts/icons/images/animations, bilingual strings (en, bn), theming, and reusable widgets. Those assets are part of the app shell rather than business logic, so they form the presentation boundary around the Flutter feature modules.
13. Across both frontends, the backend API contract is mirrored in the type/model files. Flutter has request/response classes; the React app has TypeScript interfaces under src/Types; and both align around the same LMS entities. This is a strong sign that the API is the shared integration boundary between clients and server.
14. Deployment/configuration is separated by app as well: there is a GitHub Actions workflow at the repo root, Vercel config files, and server build artifacts. For an architecture diagram, treat these as delivery/deployment concerns outside the runtime request path, but still part of the system boundary.
Main entry points: middlewares Core middleware · server.ts Server entry · Courses Learning modules · pages Business pages
Components 16
Flutter app
Mobile-first LMS client with GetX-style module separation and explicit API/data models.
- App shell · Android/iOS/web shell, main entry, routes, theme, localization, and reusable widgets.
LMS-AndroidAPP/flutter_application/lib/main.dart - Feature modules · Route/view/controller modules for login, courses, content, forum, quiz, profile, and recovery flows.
LMS-AndroidAPP/flutter_application/lib/app/modules - Data layer · Repositories, API provider, session provider, and typed payload/response models for backend calls.
LMS-AndroidAPP/flutter_application/lib/app/data - Assets · Native shells plus fonts, icons, images, animations, and localized strings for presentation.
LMS-AndroidAPP/flutter_application/assets
React app
Vite SPA with Redux feature APIs, role-based routes, and analytics/reporting UI.
- Web shell · Top-level React app, layouts, shared hooks, and route composition for browser delivery.
LMS-ClientAPP/src/App.tsx - Role routes · PrivateRoute plus admin, student, and teacher route sets that partition the SPA by role.
LMS-ClientAPP/src/routes - Redux API · Base API and feature slices for auth, courses, content, quiz, forums, attendance, events, students, and instructors.
LMS-ClientAPP/src/redux - Business pages · Feature-oriented pages for courses, quiz, forum, resources, student, teacher, and admin workflows.
LMS-ClientAPP/src/pages - Reporting · Charts, rankings, score distribution, and PDF report components fed by quiz and student data.
LMS-ClientAPP/src/components/Anaytics
Node API
Express-style TypeScript backend that owns the LMS domain and shared API contract.
- Server entry · TypeScript source entry that composes the application and compiled dist output for deployment.
LMS-ServerAPP/src/server.ts - Core middleware · Auth, validation, standardized responses, not-found handling, and the global error handler.
LMS-ServerAPP/src/app/middlewares - Error types · Centralized AppError, validation, and Zod error types used across all request paths.
LMS-ServerAPP/src/app/errors - People & access · User, Admin, Student, and role-centric access flows with per-feature controller/service/model/route structure.
LMS-ServerAPP/src/app/modules/User - Learning modules · Courses, Content, Enrollment, Quizes, Forums, Attendance, Events, and Notes domain modules.
LMS-ServerAPP/src/app/modules/Courses - Support services · Email notifications, image upload storage, and time/date formatting utilities used by domain flows.
LMS-ServerAPP/src/app/utils
Delivery
Repo-level deployment and build concerns outside the runtime request path.
- Deploy config · GitHub Actions workflow and Vercel configuration for app deployment and build delivery.
.github/workflows/deploy.yml
Connections 19
- App shell → Feature modules: navigates · App shell loads feature modules through route composition.
- Feature modules → Data layer: reads/writes · Controllers and repositories call the data layer for API access and session state.
- Data layer → Server entry: API calls · Typed request/response models align with the shared backend contract.
- App shell → Assets: renders · Presentation layer consumes assets, localization, and theming resources.
- Web shell → Role routes: navigates · SPA composition is driven by guarded role routes.
- Role routes → Business pages: loads · Routes resolve into business-area pages.
- Business pages → Redux API: dispatches · Pages and components use Redux feature APIs and slices for server communication.
- Redux API → Server entry: API calls · Shared base API talks to the backend as system of record.
- Business pages → Reporting: feeds · Quiz and student data flow into charts and PDF reporting surfaces.
- Server entry → Core middleware: passes through · All incoming requests traverse auth, validation, response, and error middleware.
- Core middleware → Error types: raises · Cross-cutting failures are normalized into shared error types.
- Core middleware → People & access: routes to · People and access requests enter the feature modules.
- Core middleware → Learning modules: routes to · Learning domain requests enter the feature modules.
- People & access → Support services: uses · User and recovery flows invoke email, image, and time utilities.
- Learning modules → Support services: uses · Course, content, quiz, and event flows depend on shared support services.
- People & access → Learning modules: shares contract · Role and identity data are reused across learning features.
- Reporting → Learning modules: consumes data · Reporting surfaces derive from quiz, course, and student records.
- Deploy config → Web shell: deploys · Root delivery config includes the web client deployment path.
- Deploy config → Server entry: builds · Delivery config also covers the server build/run artifact path.