Who calls what
BookDirect is a property management system (hotels, shortlets, apartments are all property) built as three repos. The Vue frontend still talks to Convex in production today. These docs describe the target stack.
- Frontend playbook — screens
- Middleware playbook — processors, webhooks, workers
- Core playbook — recommended Nellalink usage
Build new work against Core + Middleware, not Convex. The current user app is Vue 3; archived Next.js lives in _legacy/ and bookdirect-legacy-code.
mermaid
flowchart LR
subgraph fe [Frontend Vue]
GuestUI[Guest marketplace]
OwnerUI[Extranet dashboard]
end
subgraph mw [Middleware NestJS]
Pay[payments]
Refund[refunds]
Mail[emails]
Google[google-rates]
Avail[availability]
end
subgraph core [Core Laravel Nellalink]
Auth[users and JWT]
Entities[smart-meta-manager]
Meta[meta-data]
end
GuestUI -->|"auth, CRUD entities"| core
OwnerUI -->|"auth, CRUD entities"| core
GuestUI -->|"pay, refund, email, rates, availability"| mw
OwnerUI -->|"pay, refund, ARI, emails"| mw
mw -->|"save or update entities"| coreLayers
| Layer | Repo | Playbook |
|---|---|---|
| Frontend | frontend-bookdirect-user-app | Screens |
| Middleware | middleware-bookdirect-nestjs | Processors and workers |
| Core | backend-nellalink-laravel | Recommended usage |
Legacy reference (do not build new features here): bookdirect-legacy-code.
Routing preference
- Only Core has the operation → frontend calls Core (register, login, create property in v1).
- Middleware later adds the same job (example: upload property that also pushes Google) → playbooks switch to Middleware. Core is what Middleware calls, not what the frontend calls.
- One winner. The old URL moves to Do not call (superseded).
That is why every iteration must re-read Core explorer and Middleware explorer before editing playbooks. See prompts/iterate-docs.md.
What must not happen
- Do not persist bookings or properties in Middleware Mongo. The WIP branch
feature/core-booking-platform-endpointsdoes this today — do not follow it. - Do not add Paystack, Resend, or Google Hotel logic to Core Laravel.
- Do not compute availability only in the browser. v1 winner is Middleware
availability/check, which reads Core.
Folder map (Middleware)
Enable each folder in config/routes.json and register it in src/common/loaders/feature-loader.ts.
| Folder | Mount | Frontend calls it? |
|---|---|---|
availability | /api/v1/bookdirect/availability | Yes |
payments | /api/v1/bookdirect/payments | Yes |
refunds | /api/v1/bookdirect/refunds | Yes |
emails | /api/v1/bookdirect/emails | Yes (or Middleware triggers after webhook) |
google-rates | /api/v1/bookdirect/google-rates | Owner / admin |
file-manager | /api/v1/nellalink/file-manager | Yes (already live) |