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)
| Module | Backend File | Next.js Status | Priority | Notes |
|---|---|---|---|---|
| Stripe/Payments | paymentgateway/ | ✅ Schema + Actions created | ✅ Done | See app/orders/actions/createPaymentIntent.ts |
| Bookings | bookings/ | 🟡 Partial | Next | Port bookings.service.ts → server actions |
| Hotels (Amadeus) | hotel/ | 🟡 Partial | Next | See app/hotels/actions/hotel-actions.ts |
| Costs | costs/ | ❌ Missing | High | Pricing calculations, cost rules |
| Trips | trips/ | 🟡 Partial | High | Enhance current trip-engine |
H3🟠 Tier 2: Core Modules
| Module | Backend File | Next.js Status | Priority | Notes |
|---|---|---|---|---|
| Cities | cities/ | ✅ Exists | Done | Next.js has cities module |
| Users | users/ | ✅ Exists | Done | Next.js has User model |
| Items | items/ | ❌ Missing | Medium | Likely → Products module |
| Quotes | quotes/ | 🟡 Partial | Medium | Likely → Offers module |
| Trip-City-Plan | trip-city-plan/ | 🟡 Partial | Medium | Enhance TripCity model |
| Trip-Participant | trip-participant-detail/ | 🟡 Partial | Medium | → TripJoin enhancements |
H3🟡 Tier 3: Support Modules
| Module | Backend File | Next.js Status | Priority | Notes |
|---|---|---|---|---|
| Lander-Page | lander-page/ | ❌ Missing | Low | Landing page logic |
| Admin | admin/ | ❌ Missing | Low | Admin dashboard |
| Auth | auth/ | ✅ Exists | Done | NextAuth.js in Next.js |
| Common | common/ | 🟡 Partial | Low | Decorators → Next.js patterns |
H2🎯 Porting Rules (Next.js Architecture)
-
Controllers → Server Actions
- Backend:
bookings.controller.ts(REST endpoints) - Next.js:
app/bookings/actions/booking.actions.ts(server actions)
- Backend:
-
Services → Keep Business Logic
- Backend:
bookings.service.ts(business logic) - Next.js: Keep same logic, just export functions directly
- Backend:
-
Entities → Prisma Models
- Backend: TypeORM entities
- Next.js: Already in
prisma/schema.prisma
-
DTOs → TypeScript Interfaces
- Backend:
dto/create-booking.dto.ts - Next.js:
types/booking.types.ts
- Backend:
-
Modules → Folder Structure
- Backend:
api/bookings/(controller, service, module, entities, dto) - Next.js:
app/bookings/(actions/, components/, types/)
- Backend:
H2🚀 Porting Status (Updated 2026-05-04)
H3✅ Completed (Ready for Testing)
| Module | Backend Source | Next.js Location | Status |
|---|---|---|---|
| Stripe/Payments | paymentgateway/ | app/orders/actions/createPaymentIntent.ts, app/api/stripe/webhook/route.ts | ✅ Done |
| Hotels (Hotelbeds + Amadeus) | hotel/ | app/hotels/actions/hotel-actions.ts | ✅ Done |
| Costs Calculator | costs/costs.service.ts | app/trips/actions/trip-engine/rules/costs-calculator.ts | ✅ Done |
| Bookings | bookings/bookings.service.ts | app/bookings/actions/booking.actions.ts | ✅ Done |
| Trip-City-Plan | trip-city-plan/ | app/trips/actions/trip-city-plan.actions.ts | ✅ Done |
H3🟡 In Progress (Updated 2026-05-04)
| Module | Status | Notes |
|---|---|---|
| Items → Products | ✅ Complete | Next.js Products module covers backend Items CRUD |
| Trip-Participant | ✅ Complete | Covered by existing TripJoin model (same fields) |
| Lander-Page | ✅ Complete | Covered by app/(home)/ structure |
| Admin Module | ❌ Not Started | Low priority, admin dashboard |
H3❌ Not Started
| Module | Priority |
|---|---|
| Admin Module | Low |
| Lander-Page | Low |
| Trip-Participant Enhancements | Medium |
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)