FOR DEVELOPERS / END-TO-END EXAMPLE
Host data. Build your own .NET API.
Start with a small AmoosedWeb site, then build a custom C# library that reads its verified data through the published Reader package. The application calls your API, so you can replace the Reader adapter later.
What is in the ZIP?
site-project/: editable ordinary site, original PNG carrier, Amoosed app, JSON data, and build configuration.src/Example.Content/: your class library project, which buildsExample.Content.dll.GreetingApidepends onIGreetingSource;AmoosedGreetingSourceis the replaceable adapter using our Reader.src/Example.Console/: a small consumer that chooses the adapter and calls only your API.README.md,AGENTS.md, andCLAUDE.md: setup and shared agent instructions..codex/skills/and.claude/skills/: version-matched public skills for site building, maintenance, Pages hosting, and Reader integration.PROTOCOL-LICENSE.txt: the developer examples license.
The ZIP contains example source and agent guidance. Install the compiler and Reader packages separately from their official package listings. No generated build, private key, or native implementation source is included.
Build it with an AI coding agent
This download includes an agentic workflow, not just sample code. After extracting the ZIP, point your coding agent at its root AGENTS.md and README.md. Codex can use the four skills under .codex/skills/; Claude has the same skills under .claude/skills/ and a CLAUDE.md pointer. The skills cover building and maintaining the site, publishing to Pages, and reading hosted resources. They match the example's compiler version and use published packages without this private source repository.
Ask the agent to adapt IGreetingSource and GreetingApi to your data model, keep AmoosedWeb Reader calls inside AmoosedGreetingSource, build and verify the site, then run the .NET consumer against the local preview. This leaves your application code dependent on your API, so you can replace the Reader adapter later. Review the generated site and DLL before publishing.
1. Build and host the data
Install the compiler, extract the ZIP, and run these commands from its root. The included PNG is an existing ordinary-site image; the compiler adds a verified public JSON resource to its published copy.
amw build-project site-project site-project/public
amw verify-site site-project/public
amw serve site-project/publicOpen the loopback URL printed by the server. The ordinary page shows the image. The site-owned /amoosed.com/boot.html route opens the second experience, which reads the same JSON. Use the local URL for the next step.
2. Build your own DLL
On Windows x64 with the .NET 10 SDK, build the included class library. Its project references AmoosedWeb.Reader from NuGet, which brings the matching AmoosedWeb.Native dependency and copies the native Reader DLL into the app output. There is no manual binary copy or ABI selection.
dotnet build src/Example.Content/Example.Content.csproj
dotnet run --project src/Example.Console -- http://127.0.0.1:PORT/Replace PORT with the preview server’s printed port. The console calls GreetingApi and prints the verified greeting. AmoosedGreetingSource lists the verified index, downloads the JSON resource, parses it, and removes the temporary file. The Reader verifies carrier parts and the complete resource before returning it. See the Reader reference for the API and error behavior.
3. Keep the integration replaceable
In your own software, make your API interface describe what your application needs. Put the AmoosedWeb calls inside one adapter, then select that adapter at startup. The consumer uses IGreetingSource and GreetingApi; it does not import AmoosedWeb.Reader. A future adapter can use a database, local files, or another service while callers keep the same API.
The example uses a public hosted index, so anyone can discover the data. For private editions, read about external index and member keys; those are transferable bearer credentials, and your adapter should receive key file paths from trusted configuration.
4. Publish and check the host
Package the site source, then upload only the verified pages/ directory to a host that preserves carrier bytes and serves the required same-origin routes. The package creates a private local source-and-key backup outside the upload.
amw package-pages site-project site-project/distribution YOUR_PAGES_PROJECT
amw verify-managed site-project/distribution
amw verify-backup site-project/distribution
# After deploying pages/ to your HTTPS origin:
amw check-host https://your-site.example/
dotnet run --project src/Example.Console -- https://your-site.example/Follow the host contract for routes, headers, and byte preservation. The source ZIP can serve as a starting point for your own project; change its data model, site assets, and API contract to fit your application.