Skip to content

Migration Progress

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

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.

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.

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
Legacy page or areaLegacy sourceNew backend API already availableStatusNotes
Home pagesite/controllers/Site.php#indexNoneNot MigratedStill rendered and composed fully from legacy website models and views
About Ussite/controllers/Site.php#aboutusNoneNot MigratedNo CMS or public content API yet in new backend
Education pagesite/controllers/Site.php#educationNoneNot MigratedStill legacy content-driven page
Services listingsite/controllers/Site.php#servicesNoneNot MigratedService catalog API does not exist yet in new backend
Service detailsite/controllers/Site.php#serviceDetailGET /consultants, GET /consultants/:id as partial support onlyPartialConsultant lookup exists, but service-detail and service-to-consultant page logic has not been rebuilt
Make appointment pagesite/controllers/Site.php#makeAppointmentNoneNot MigratedNew backend has no appointment API yet
Submit appointment formsite/controllers/Site.php#submitAppointmentNoneNot MigratedAppointment write flow still belongs to legacy backend
Careers pagesite/controllers/Careers.phpNoneNot MigratedNo dedicated careers API module in new backend
Public articles and CMS contentlegacy site and ACP content managementNoneNot MigratedNo article, page, FAQ, slider, partner, or event API module yet
Legacy page or areaLegacy sourceNew backend API already availableStatusNotes
Consultations landing pagesite/controllers/Consultations.php#indexGET /consultants, GET /consultants/:idPartialConsultant retrieval exists, but full consultation landing composition has not been rebuilt
Consultants list pagesite/controllers/Consultations.php#getConsultantsListGET /consultantsPartialNew backend can supply consultant list data, but category filters and page composition are still legacy
Consultant detail pagesite/controllers/Consultations.php#getConsultantByIDGET /consultants/:idPartialDetail read API exists, but page-specific enrichment and presentation logic remain legacy
Consultation categories pagesite/controllers/Consultations.php#categoriesGET /reference/categories as partial support onlyPartialGeneric category API exists, but there is no dedicated consultations-category API yet
Consultation category detailsite/controllers/Consultations.php#detailsNoneNot MigratedNo dedicated consultation domain API yet
Consultation library pagessite/controllers/Consultations.php#getConsultationLibraries, #getLibraryDetailsNoneNot MigratedLibrary and educational content APIs are missing
Join consultant pagesite/controllers/Consultations.php#joinConsultant, #joinConsultantByTypeNoneNot MigratedNo consultant application or enrollment API in new backend
Submit consultant enrollmentsite/controllers/Consultations.php#submitEnrollmentApplicationNoneNot MigratedApplication workflow still legacy-only
Legacy page or areaLegacy sourceNew backend API already availableStatusNotes
Courses landing pagesite/controllers/Courses.php#indexNoneNot MigratedNo course catalog API module exists yet
Course type listingsite/controllers/Courses.php#course_typeNoneNot MigratedFiltering logic still legacy-only
Course category pagesite/controllers/Courses.php#categoriesNoneNot MigratedNo dedicated course category API yet
Collection pagesite/controllers/Courses.php#collectionNoneNot MigratedCollection and subscription APIs are missing
Course detail pagesite/controllers/Courses.php#detailsNoneNot MigratedNo course detail API in the new backend
Submit course commentsite/controllers/Courses.php#submitCourseCommentNoneNot MigratedUser-generated course engagement still legacy-only
Add course to cartsite/controllers/Cart.php#insertCoursesIntoCartSessionNoneNot MigratedNo cart API or checkout API exists in new backend
Checkout pagesite/controllers/Cart.php#shoppingCartItemsNoneNot MigratedCart, promo code, and checkout logic remain in legacy backend
Proceed to paymentsite/controllers/Cart.php#proceedToPaymentPageNoneNot MigratedPayment orchestration has not been moved
Legacy page or areaLegacy sourceNew backend API already availableStatusNotes
Authentication areacustomer/controllers/Authentication.php/auth/token, /auth/refresh, /auth/verification, /auth/verification-confirm, /auth/register, logout endpointsMigratedAuth is the strongest migrated customer-facing area
Customer dashboard and profile operationscustomer/controllers/Customer.phpAuth-only supportPartialIdentity exists, but broader customer account APIs are not rebuilt
Customer consultants interactionscustomer/controllers/Consultants.phpGET /consultants, GET /consultants/:idPartialRead-side consultant access exists, but customer operational flows do not
Membership pagescustomer/controllers/Membership.phpNoneNot MigratedMembership domain has not moved
Support pagescustomer/controllers/Support.phpNoneNot MigratedNo support or ticket API in new backend
Trainer pagescustomer/controllers/Trainer.phpNoneNot MigratedTrainer-specific domain is not yet present
Legacy API domainLegacy sourceNew backend API already availableStatusNotes
Auth APIapi/controllers/Auth.php/auth/*MigratedNew backend clearly owns modern auth flows
Consultant APIapi/controllers/Consultant.php/consultants, /consultants/:idPartialRead API exists, but domain breadth is still smaller than legacy
Health APIapi/controllers/Health.php/healthMigratedOperational health endpoint already exists
Account APIapi/controllers/Account.phpAuth-related endpoints onlyPartialFull account management is not yet present
Consultation APIapi/controllers/Consultation.phpNoneNot MigratedNo equivalent consultation module yet
Course APIapi/controllers/Course.phpNoneNot MigratedNo equivalent course module yet
Clinic APIapi/controllers/Clinic.phpNoneNot MigratedNo clinic module yet
Treatment APIapi/controllers/Treatment.phpNoneNot MigratedNo treatment module yet
Home APIapi/controllers/Home.phpNoneNot MigratedNo public content aggregation API yet
Legacy admin domainLegacy sourceNew backend API already availableStatusNotes
Users and authentication adminacp/controllers/Users.php, Authentication.phpNoneNot MigratedNo admin identity API surface yet
Customers managementacp/controllers/Customers.phpNoneNot MigratedCustomer management remains legacy-only
Appointments managementacp/controllers/Appointments.phpNoneNot MigratedNo admin appointment module in new backend
Consultations managementacp/controllers/Consultations.phpNoneNot MigratedNo admin consultation operations yet
Courses managementacp/controllers/Courses.phpNoneNot MigratedNo admin course module yet
Branches and servicesacp/controllers/Branches.php, Services.phpNoneNot MigratedNo branch or service management API yet
Articles, FAQ, slider, menu, features, partners, portfolios, eventsmultiple ACP controllersNoneNot MigratedCMS administration remains entirely legacy
Memberships and subscriptionsacp/controllers/Memberships.php, Subscriptions.phpNoneNot MigratedSubscription management has not been moved
Notificationsacp/controllers/Notifications.phpMessaging infrastructure onlyPartialShared messaging service exists, but no admin notification domain API is present
Reports and sales reportsacp/controllers/Reports.php, Reports_V2.php, Sales_reports.phpNoneNot MigratedReporting remains legacy-only
Roles and permissionsacp/controllers/Roles.php, Groups.phpNoneNot MigratedNew 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

  • authentication core
  • token lifecycle
  • consultant read APIs
  • reference category API
  • Prisma-based data access foundation
  • health, logging, Sentry, i18n, and config infrastructure
  • customer identity model
  • consultant domain
  • legacy schema mapping
  • messaging integration support
  • 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

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.

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