A single-page application built with WebSharper.Mvu (WebSharper's Model-View-Update architecture) and WebSharper.UI. It manages a list of people — create, edit, delete — with client-side routing.
This is the front end of a client/server pair. It calls the sibling
PeopleAPI sample over REST and shares that API's model
(PersonData, EndPoint, ApiEndPoint, …) through a project reference, so the
two sides stay in sync by construction.
- The MVU pattern: typed
Model,Message,UpdateandView. - Composition of independent pages (
PeopleList,Creating,Editing) withWebSharper.Mvu'sPage.Single/Page.Create. - Client-side routing with
WebSharper.Siteletsinfer routers. - Calling a typed REST API: the client reuses the PeopleAPI model and its
inferred router (
Router.Infer<EndPoint>()+Router.FetchWith).
Start the API first, then the client, in two terminals:
cd ../PeopleAPI
dotnet run --project src # http://localhost:5585
dotnet run --project src # http://localhost:5479
Then open http://localhost:5479.
The client calls the API at http://localhost:5585 (see BaseUrl in
src/Update.fs), and the API allows the client's origin via CORS
(PeopleAPI/src/appsettings.json).
dotnet build src/PeopleClient.fsproj -c Release
Because the client references the PeopleAPI project, both repos must be checked out side by side — the CI does this.
Not deployed online: as the client half of a client/server pair, it is meant to be run together with PeopleAPI. CI builds it on every push.
