- Implement AddressReconcileQueueService to handle address reconciliation jobs between WHMCS and Salesforce. - Define job data structure and queue configuration for retries and error handling. - Add methods for enqueueing reconciliation jobs and retrieving queue health metrics. feat: create loading components for various services in the portal - Add loading skeletons for Internet, SIM, VPN, and public services configuration. - Implement loading states for account-related views including account details, services, and verification settings. - Introduce loading states for support case details and subscription actions. feat: implement OTP input component for user verification - Create OtpInput component to handle 6-digit OTP input with auto-focus and navigation. - Add LoginOtpStep component for OTP verification during login, including countdown timer and error handling. feat: define address domain constants for validation - Establish constants for address field length limits to ensure compliance with WHMCS API constraints. - Include maximum lengths for address fields and user input fields to maintain data integrity.
Prisma Configuration
Overview
This directory contains the Prisma schema and migrations for the BFF application.
Important: Docker Build Behavior
Canonical schema path
Prisma embeds the schema path into the generated client. We regenerate the client in Docker using the production layout so the embedded path is /app/prisma/schema.prisma.
Directory Structure
Development (Monorepo)
/project-root/
├── apps/bff/
│ ├── prisma/
│ │ ├── schema.prisma ← Schema here
│ │ └── migrations/
│ └── src/
└── packages/
Production (Docker Container)
/app/
├── prisma/
│ ├── schema.prisma ← Schema here (flattened)
│ └── migrations/
├── dist/
└── node_modules/
└── .prisma/client/ ← Generated client
Commands
| Command | Description |
|---|---|
pnpm db:generate |
Regenerate Prisma client (--schema=prisma/schema.prisma) |
pnpm db:migrate |
Run migrations (dev) with explicit schema path |
pnpm db:studio |
Open Prisma Studio with explicit schema path |
pnpm db:reset |
Reset database with explicit schema path |
Binary Targets
The schema includes binary targets for both development and production:
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
native: For local development (macOS, Windows, Linux)linux-musl-openssl-3.0.x: For Alpine Linux in Docker
Troubleshooting
"Could not load schema from path" Error
This error occurs when the Prisma client was generated with a different schema path than what exists in the current environment.
Solution: Ensure the Dockerfile regenerates the Prisma client from the production-like directory structure (see above).
Client Not Found
If you see "Prisma Client not found" errors:
- Run
pnpm db:generatelocally - For Docker, ensure the Dockerfile includes the
prisma generatestep
Migration Strategy
- Create migrations locally:
pnpm db:migrate - Commit the migration files
- In production, the entrypoint runs:
prisma migrate deploy --schema=/app/prisma/schema.prisma