Skip to main content
All Docs
FeaturesmyProp (AgentOS People Portal)Updated April 4, 2026

Fixing the BFF Route Path Bug in v0.1.87

Fixing the BFF Route Path Bug in v0.1.87

Type: Critical Bug Fix
Version: 0.1.87
Affected component: src/app/api/bff/[...path]/route.ts

Background

myProp's backend-for-frontend (BFF) layer acts as a secure proxy between the client portal UI and the AgentOS (letmc.com) REST API. All data fetching for landlord, tenant, buyer, contractor, and messaging flows passes through this BFF.

A helper function — ppPath() — was responsible for constructing the URL suffix that gets appended to the base AgentOS host before each API call.

The Problem

ppPath() was building paths using the following prefix for every call:

/v1/corporate/peopleportal/letmcletting/{clientName}

This is the correct prefix only for upload endpoints such as:

  • maintenance-request uploads
  • tenancy-application uploads
  • generic/upload

For all other AgentOS REST API calls, the correct base path is simply:

/{clientName}/...

Because every ppGet and ppPost call in the BFF used ppPath(), all non-upload API calls were being sent to the wrong URLs. This affected data retrieval for:

Portal typeExample calls affected
LandlordProperty details, financial statements, maintenance
TenantTenancy info, rent statements, documents
BuyerOffer status, property details
ContractorJob instructions, maintenance requests
MessagingConversation threads

The Fix

ppPath() was updated to return the correct path format:

// Before (incorrect)
return `/v1/corporate/peopleportal/letmcletting/${cn}${suffix}`;

// After (correct)
return `/${cn}${suffix}`;

Upload endpoints are handled entirely separately in src/lib/letmc/upload.ts, which continues to construct the full /v1/corporate/peopleportal/letmcletting/ path correctly and is unaffected by this change.

What This Means

  • All BFF data fetching routes now call the correct AgentOS API endpoints.
  • Portal data for landlords, tenants, buyers, contractors, and messaging will load as expected.
  • File upload functionality is unchanged.
  • No changes were made to authentication, session handling, or the public API surface.

Files Changed

FileChange
src/app/api/bff/[...path]/route.tsFixed ppPath() to omit the upload-specific URL prefix
src/lib/letmc/upload.tsNo change — upload path construction was already correct