MolinoPro

backend-porting-tracker

Master Codebase Guidebook
Markdown + HTML Dev-Docs Renderer - Frontend Client Module

Default Index
Open README.md
Root: README.md_PRD
Milestones
H1Backend → Next.js Porting Tracker

Goal: Port all features from deprecated-nextjs-backend-logic-model to Next.js architecture
Architecture: Server Actions (not API routes for mutations), keep original business logic
Renames: Plans → Experiences (already done in Next.js)


H2📊 Porting Status (Priority Order)
H3🔴 Tier 1: Revenue-Critical (DO FIRST)
ModuleBackend FileNext.js StatusPriorityNotes
Stripe/Paymentspaymentgateway/✅ Schema + Actions created✅ DoneSee app/orders/actions/createPaymentIntent.ts
Bookingsbookings/🟡 PartialNextPort bookings.service.ts → server actions
Hotels (Amadeus)hotel/🟡 PartialNextSee app/hotels/actions/hotel-actions.ts
Costscosts/❌ MissingHighPricing calculations, cost rules
Tripstrips/🟡 PartialHighEnhance current trip-engine
H3🟠 Tier 2: Core Modules
ModuleBackend FileNext.js StatusPriorityNotes
Citiescities/✅ ExistsDoneNext.js has cities module
Usersusers/✅ ExistsDoneNext.js has User model
Itemsitems/❌ MissingMediumLikely → Products module
Quotesquotes/🟡 PartialMediumLikely → Offers module
Trip-City-Plantrip-city-plan/🟡 PartialMediumEnhance TripCity model
Trip-Participanttrip-participant-detail/🟡 PartialMedium→ TripJoin enhancements
H3🟡 Tier 3: Support Modules
ModuleBackend FileNext.js StatusPriorityNotes
Lander-Pagelander-page/❌ MissingLowLanding page logic
Adminadmin/❌ MissingLowAdmin dashboard
Authauth/✅ ExistsDoneNextAuth.js in Next.js
Commoncommon/🟡 PartialLowDecorators → Next.js patterns

H2🎯 Porting Rules (Next.js Architecture)
  1. Controllers → Server Actions

    • Backend: bookings.controller.ts (REST endpoints)
    • Next.js: app/bookings/actions/booking.actions.ts (server actions)
  2. Services → Keep Business Logic

    • Backend: bookings.service.ts (business logic)
    • Next.js: Keep same logic, just export functions directly
  3. Entities → Prisma Models

    • Backend: TypeORM entities
    • Next.js: Already in prisma/schema.prisma
  4. DTOs → TypeScript Interfaces

    • Backend: dto/create-booking.dto.ts
    • Next.js: types/booking.types.ts
  5. Modules → Folder Structure

    • Backend: api/bookings/ (controller, service, module, entities, dto)
    • Next.js: app/bookings/ (actions/, components/, types/)

H2🚀 Porting Status (Updated 2026-05-04)
H3✅ Completed (Ready for Testing)
ModuleBackend SourceNext.js LocationStatus
Stripe/Paymentspaymentgateway/app/orders/actions/createPaymentIntent.ts, app/api/stripe/webhook/route.ts✅ Done
Hotels (Hotelbeds + Amadeus)hotel/app/hotels/actions/hotel-actions.ts✅ Done
Costs Calculatorcosts/costs.service.tsapp/trips/actions/trip-engine/rules/costs-calculator.ts✅ Done
Bookingsbookings/bookings.service.tsapp/bookings/actions/booking.actions.ts✅ Done
Trip-City-Plantrip-city-plan/app/trips/actions/trip-city-plan.actions.ts✅ Done
H3🟡 In Progress (Updated 2026-05-04)
ModuleStatusNotes
Items → Products✅ CompleteNext.js Products module covers backend Items CRUD
Trip-Participant✅ CompleteCovered by existing TripJoin model (same fields)
Lander-Page✅ CompleteCovered by app/(home)/ structure
Admin Module❌ Not StartedLow priority, admin dashboard
H3❌ Not Started
ModulePriority
Admin ModuleLow
Lander-PageLow
Trip-Participant EnhancementsMedium

H2📋 Progress Log
  • Stripe Integration (PaymentIntent, Webhook, StripeCheckout)
  • Hotels Module (Hotelbeds API - was working in NestJS, Amadeus backup)
  • Costs Calculator (all business logic from costs.service.ts)
  • Bookings Module (ported from bookings.service.ts)
  • Trip-City-Plan (Experience→TripCity attachments)
  • Items → Products Merge
  • Trip-Participant Enhancements
  • Lander-Page
  • Admin Module

Current Focus: Port Costs Module (high impact for trip pricing)