The FossaApp Bridge provides shared frontend and backend functionality.
The Fossa.Bridge project is a shared F# library designed to encapsulate logic, validation, and domain models that are common to both the .NET backend and the TypeScript/JavaScript frontend. By using Fable, the F# code is transpiled into JavaScript/TypeScript for the frontend environment while simultaneously being compiled into a standard .NET library for the backend. This ensures a single source of truth for core business logic, API models, and data validation rules, reducing duplication and preventing synchronization issues between the client and server.
Install the NuGet package:
dotnet add package Fossa.BridgeInstall the NPM package:
npm install @fossa-app/bridgeor using Yarn:
yarn add @fossa-app/bridge- Shared API domain models.
- Common validation and helper logic.
- Consistent behavior across client and server.
To build both NPM and NuGet packages locally, run the included PowerShell script:
.\pack.ps1