Fix: Ensure Prisma client generates with platform-specific binaries for macOS users #495
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Resolves #494 - Prisma client is not generated for macOS users
Problem
When macOS users installed @friggframework/core from npm, they received pre-built Prisma clients with Linux binaries (rhel-openssl-3.0.x) but not macOS binaries. Running 'frigg start' would fail because the platform-specific query engine binary was missing.
This occurred because:
Solution
Following TDD, DDD, and hexagonal architecture best practices in the codebase:
New Domain Services (packages/core/database/utils/):
platform-detector.js: Detects current OS/arch and maps to Prisma binary targets
binary-validator.js: Validates Prisma client has platform-specific binaries
Enhanced Validation (packages/devtools/frigg-cli/):
database-validator.js: Updated checkPrismaClientGenerated()
start-command/index.js: Better error messages for platform mismatch
db-setup-command/index.js: Smart regeneration logic
Testing
Impact
Alternative Solutions Considered
This follows the project's patterns for domain-driven design, hexagonal architecture, and comprehensive test coverage.