Migration Progress
Migration Progress
Section titled “Migration Progress”Purpose
Section titled “Purpose”This page tracks how much of the legacy motmaina-website backend has already been moved into the new backend/ service, what is already available, and which business areas still remain in the legacy application.
The status below is based on:
- currently implemented NestJS modules, controllers, and services in
backend/src - currently mapped tables in
backend/prisma/schema.prisma - legacy business domains still visible in
motmaina-website/application/modules
How to Read This Status
Section titled “How to Read This Status”There are two different migration signals in this repository and they should not be confused:
- backend foundation migrated: the new backend already has reusable platform infrastructure such as auth, Prisma, health, i18n, and messaging
- business domain migrated: a real product capability already has a first-class API module and usable service logic in the new backend
This distinction matters because the Prisma schema already maps many legacy tables, but most of those domains do not yet have complete application modules in the new backend.
Current Progress Estimate
Section titled “Current Progress Estimate”Based on the current codebase, the migration is best described as:
- foundation migration: roughly
65% to 75%complete - business capability migration: roughly
25% to 35%complete
This is an estimate, not a precise KPI. It reflects that the technical platform of the new backend is already in place, while only a smaller subset of legacy product capabilities has been rebuilt as active modules.
Migration Table by Area
Section titled “Migration Table by Area”The table below is the most practical view of migration status. It maps legacy pages or domains to the APIs that already exist in the new backend.
Legend:
- Migrated
- Partial
- Not Migrated
Public Website and Discovery Pages
Section titled “Public Website and Discovery Pages”| Legacy page or area | Legacy source | New backend API already available | Status | Notes |
|---|---|---|---|---|
| Home page | site/controllers/Site.php#index | None | Not Migrated | Still rendered and composed fully from legacy website models and views |
| About Us | site/controllers/Site.php#aboutus | None | Not Migrated | No CMS or public content API yet in new backend |
| Education page | site/controllers/Site.php#education | None | Not Migrated | Still legacy content-driven page |
| Services listing | site/controllers/Site.php#services | None | Not Migrated | Service catalog API does not exist yet in new backend |
| Service detail | site/controllers/Site.php#serviceDetail | GET /consultants, GET /consultants/:id as partial support only | Partial | Consultant lookup exists, but service-detail and service-to-consultant page logic has not been rebuilt |
| Make appointment page | site/controllers/Site.php#makeAppointment | None | Not Migrated | New backend has no appointment API yet |
| Submit appointment form | site/controllers/Site.php#submitAppointment | None | Not Migrated | Appointment write flow still belongs to legacy backend |
| Careers page | site/controllers/Careers.php | None | Not Migrated | No dedicated careers API module in new backend |
| Public articles and CMS content | legacy site and ACP content management | None | Not Migrated | No article, page, FAQ, slider, partner, or event API module yet |
Consultation Pages
Section titled “Consultation Pages”| Legacy page or area | Legacy source | New backend API already available | Status | Notes |
|---|---|---|---|---|
| Consultations landing page | site/controllers/Consultations.php#index | GET /consultants, GET /consultants/:id | Partial | Consultant retrieval exists, but full consultation landing composition has not been rebuilt |
| Consultants list page | site/controllers/Consultations.php#getConsultantsList | GET /consultants | Partial | New backend can supply consultant list data, but category filters and page composition are still legacy |
| Consultant detail page | site/controllers/Consultations.php#getConsultantByID | GET /consultants/:id | Partial | Detail read API exists, but page-specific enrichment and presentation logic remain legacy |
| Consultation categories page | site/controllers/Consultations.php#categories | GET /reference/categories as partial support only | Partial | Generic category API exists, but there is no dedicated consultations-category API yet |
| Consultation category detail | site/controllers/Consultations.php#details | None | Not Migrated | No dedicated consultation domain API yet |
| Consultation library pages | site/controllers/Consultations.php#getConsultationLibraries, #getLibraryDetails | None | Not Migrated | Library and educational content APIs are missing |
| Join consultant page | site/controllers/Consultations.php#joinConsultant, #joinConsultantByType | None | Not Migrated | No consultant application or enrollment API in new backend |
| Submit consultant enrollment | site/controllers/Consultations.php#submitEnrollmentApplication | None | Not Migrated | Application workflow still legacy-only |
Courses, Cart, and Commerce Pages
Section titled “Courses, Cart, and Commerce Pages”| Legacy page or area | Legacy source | New backend API already available | Status | Notes |
|---|---|---|---|---|
| Courses landing page | site/controllers/Courses.php#index | None | Not Migrated | No course catalog API module exists yet |
| Course type listing | site/controllers/Courses.php#course_type | None | Not Migrated | Filtering logic still legacy-only |
| Course category page | site/controllers/Courses.php#categories | None | Not Migrated | No dedicated course category API yet |
| Collection page | site/controllers/Courses.php#collection | None | Not Migrated | Collection and subscription APIs are missing |
| Course detail page | site/controllers/Courses.php#details | None | Not Migrated | No course detail API in the new backend |
| Submit course comment | site/controllers/Courses.php#submitCourseComment | None | Not Migrated | User-generated course engagement still legacy-only |
| Add course to cart | site/controllers/Cart.php#insertCoursesIntoCartSession | None | Not Migrated | No cart API or checkout API exists in new backend |
| Checkout page | site/controllers/Cart.php#shoppingCartItems | None | Not Migrated | Cart, promo code, and checkout logic remain in legacy backend |
| Proceed to payment | site/controllers/Cart.php#proceedToPaymentPage | None | Not Migrated | Payment orchestration has not been moved |
Customer Area
Section titled “Customer Area”| Legacy page or area | Legacy source | New backend API already available | Status | Notes |
|---|---|---|---|---|
| Authentication area | customer/controllers/Authentication.php | /auth/token, /auth/refresh, /auth/verification, /auth/verification-confirm, /auth/register, logout endpoints | Migrated | Auth is the strongest migrated customer-facing area |
| Customer dashboard and profile operations | customer/controllers/Customer.php | Auth-only support | Partial | Identity exists, but broader customer account APIs are not rebuilt |
| Customer consultants interactions | customer/controllers/Consultants.php | GET /consultants, GET /consultants/:id | Partial | Read-side consultant access exists, but customer operational flows do not |
| Membership pages | customer/controllers/Membership.php | None | Not Migrated | Membership domain has not moved |
| Support pages | customer/controllers/Support.php | None | Not Migrated | No support or ticket API in new backend |
| Trainer pages | customer/controllers/Trainer.php | None | Not Migrated | Trainer-specific domain is not yet present |
Legacy API Domain Comparison
Section titled “Legacy API Domain Comparison”| Legacy API domain | Legacy source | New backend API already available | Status | Notes |
|---|---|---|---|---|
| Auth API | api/controllers/Auth.php | /auth/* | Migrated | New backend clearly owns modern auth flows |
| Consultant API | api/controllers/Consultant.php | /consultants, /consultants/:id | Partial | Read API exists, but domain breadth is still smaller than legacy |
| Health API | api/controllers/Health.php | /health | Migrated | Operational health endpoint already exists |
| Account API | api/controllers/Account.php | Auth-related endpoints only | Partial | Full account management is not yet present |
| Consultation API | api/controllers/Consultation.php | None | Not Migrated | No equivalent consultation module yet |
| Course API | api/controllers/Course.php | None | Not Migrated | No equivalent course module yet |
| Clinic API | api/controllers/Clinic.php | None | Not Migrated | No clinic module yet |
| Treatment API | api/controllers/Treatment.php | None | Not Migrated | No treatment module yet |
| Home API | api/controllers/Home.php | None | Not Migrated | No public content aggregation API yet |
Admin and ACP Operations
Section titled “Admin and ACP Operations”| Legacy admin domain | Legacy source | New backend API already available | Status | Notes |
|---|---|---|---|---|
| Users and authentication admin | acp/controllers/Users.php, Authentication.php | None | Not Migrated | No admin identity API surface yet |
| Customers management | acp/controllers/Customers.php | None | Not Migrated | Customer management remains legacy-only |
| Appointments management | acp/controllers/Appointments.php | None | Not Migrated | No admin appointment module in new backend |
| Consultations management | acp/controllers/Consultations.php | None | Not Migrated | No admin consultation operations yet |
| Courses management | acp/controllers/Courses.php | None | Not Migrated | No admin course module yet |
| Branches and services | acp/controllers/Branches.php, Services.php | None | Not Migrated | No branch or service management API yet |
| Articles, FAQ, slider, menu, features, partners, portfolios, events | multiple ACP controllers | None | Not Migrated | CMS administration remains entirely legacy |
| Memberships and subscriptions | acp/controllers/Memberships.php, Subscriptions.php | None | Not Migrated | Subscription management has not been moved |
| Notifications | acp/controllers/Notifications.php | Messaging infrastructure only | Partial | Shared messaging service exists, but no admin notification domain API is present |
| Reports and sales reports | acp/controllers/Reports.php, Reports_V2.php, Sales_reports.php | None | Not Migrated | Reporting remains legacy-only |
| Roles and permissions | acp/controllers/Roles.php, Groups.php | None | Not Migrated | New backend does not yet expose admin RBAC management |
Present in the New Backend Data Layer but Not Yet Fully Migrated as Business Modules
Section titled “Present in the New Backend Data Layer but Not Yet Fully Migrated as Business Modules”The Prisma schema already maps a broad portion of the legacy database, including areas such as:
- customers
- consultants
- appointments
- articles
- branches
- auth-related tables
- multiple CMS and operational tables
However, schema presence does not mean feature migration is complete.
For most of these domains, the current state is:
- database tables are recognized
- typed Prisma access is technically possible
- dedicated business modules and workflows are still missing
Migration status: data-aware, but not application-complete
What Has Been Moved Versus What Has Not
Section titled “What Has Been Moved Versus What Has Not”Clearly moved
Section titled “Clearly moved”- authentication core
- token lifecycle
- consultant read APIs
- reference category API
- Prisma-based data access foundation
- health, logging, Sentry, i18n, and config infrastructure
Started but not complete
Section titled “Started but not complete”- customer identity model
- consultant domain
- legacy schema mapping
- messaging integration support
Not yet materially moved
Section titled “Not yet materially moved”- appointments
- consultations end-to-end
- courses
- cart and checkout style flows
- memberships and subscriptions
- clinic and treatment APIs
- public CMS and website content APIs
- ACP and admin operations
- reporting and operational analytics
Recommended Interpretation
Section titled “Recommended Interpretation”The new backend should currently be treated as an emerging replacement platform, not yet a full replacement for motmaina-website.
It is already strong enough to support:
- modern authentication
- new mobile or frontend integration work
- selected consultant and reference APIs
- future domain-by-domain migration on top of Prisma and NestJS
It is not yet strong enough to fully retire the legacy backend because too many operational and business-critical domains still live only in the legacy application.
Practical Migration Summary
Section titled “Practical Migration Summary”If the question is, “Has the backend migration started?” the answer is clearly yes.
If the question is, “Can the new backend already replace the full legacy website backend?” the answer is clearly no.
The current state is best summarized as:
- the platform foundation is in place
- authentication is the strongest migrated business area
- a small number of read-oriented domains are active
- most commercial, operational, CMS, and admin domains are still legacy-owned