.NET 10 backend for LexBox and FwLite applications.
# Build all backend
dotnet build
# Run all tests
dotnet test
# Build specific project
dotnet build LexBoxApi/LexBoxApi.csproj
dotnet build FwLite/FwLiteMaui/FwLiteMaui.csproj --framework net10.0-windows10.0.19041.0| Directory | Purpose |
|---|---|
LexBoxApi/ |
Main API - GraphQL, auth, project management |
LexCore/ |
Core domain models shared across projects |
LexData/ |
EF Core data access, PostgreSQL |
FwLite/ |
FwLite apps (MAUI, Web) and MiniLcm API |
FwHeadless/ |
Headless service for hg sync, FwData processing |
Testing/ |
Integration and API tests |
Ycs/ |
Yjs CRDT implementation in C# |
Harmony is consumed as a NuGet package by default (SIL.Harmony, SIL.Harmony.Core, SIL.Harmony.Linq2db — versions pinned in Directory.Packages.props).
To build against local Harmony source (e.g. when developing the CRDT substrate), clone sillsdev/harmony as a sibling repo (../harmony), copy Directory.Build.props.user.example to Directory.Build.props.user, and set UseHarmonySource=true. Or pass -p:UseHarmonySource=true for a one-off build.
- Nullable: Enabled globally,
Nullablewarnings are errors - Implicit usings: Enabled
- Target framework: net10.0 (unless platform-specific)
- Async: Use
async/await, not.Resultor.Wait() - Records: Prefer for DTOs and immutable data
- Schema in
LexBoxApi/GraphQL/ - Use
[UseProjection],[UseFiltering],[UseSorting]attributes - Mutations return the modified entity
- DbContext in
LexData/ - Migrations:
dotnet ef migrations add <Name> --project LexData - Use
IQueryableprojections, avoid loading full entities
- Register services in
*Kernel.csfiles (e.g.,LexBoxKernel.cs) - Use
AddScopedfor request-scoped,AddSingletonfor app-wide
Directory.Build.props- Shared MSBuild propertiesDirectory.Packages.props- Central package managementLexBoxApi/Program.cs- API entry pointLexCore/Entities/- Domain entitiesTesting/Fixtures/- Test fixtures and utilities