Skip to Content
TAdminQuick start and sample host

Quick start and sample host

On this page

Run the complete sample

Get the source from the TAdmin repository  and run these commands from its root.

Requires Windows, the .NET 10 SDK, Node.js 22.12+ and npm. The sample build invokes Windows PowerShell through powershell.exe.

dotnet run --project samples/TAdmin.Sample/TAdmin.Sample.csproj -f net10.0

Open http://127.0.0.1:6200/. The local sample starts with admin / 111111. Its build installs and compiles the shared frontend and sample frontend when needed, then embeds the pages in the host assembly. The first build requires an available npm registry.

Confirm the integration in this order:

  1. The terminal prints a TAdmin Sample: listener address, indicating the HTTP hosted service has started.
  2. Open it to see the login page. The same port serves embedded pages and /api.
  3. Sign in with the sample account and load the current user, menus and administration pages.
  4. Reload to verify session restoration. After logout, protected navigation should return to the login flow.

Databases and logs are under DB and Logs in the host output directory. The bootstrap administrator is created during initialization only. Changing the bootstrap password setting does not overwrite an existing account.

To check the API independently, run this in PowerShell:

curl.exe -i http://127.0.0.1:6200/api/auth/GetLoginPasswordPublicKey

Expect a JSON result envelope. On success, code is 200 and data contains keyId, publicKey, nonce, algorithm and expiresAt. This issues a one-time challenge without signing in. See authentication for the complete password protocol.

Frontend development

Keep the backend running. In another terminal, from the same repository root, run:

npm --prefix samples/TAdmin.Sample/web run dev

Open http://127.0.0.1:5174/. Vite proxies /api to the sample backend; set TADMIN_SAMPLE_API to change that target. Password encryption uses Web Crypto, so access the page through localhost, a loopback address or HTTPS.

Install in your application

dotnet add package TAdmin dotnet add package TUtility.Generator

Run these commands in the backend project. Build the Vue frontend from the repository’s web source and reference it through a local directory; see Vue source integration. Keep related package versions compatible. See hosting for startup generator registration and execution.

After installation, configure startup and HTTP services and Vue adapters. See the device module example to add an API, menu and page.

Sample source map

FileIntegration responsibility
samples/TAdmin.Sample/Program.csJSON configuration, generated startup runner and generic host
SampleStartup.csShared container, controllers, filters and hosted service
Hosting/SampleWebApiService.csHTTP lifetime, JSON, authentication plugins and static pages
Permission/SampleMenuProvider.csModule identity, menu / button seeds and route validation
web/src/main.tscreateTAdminPlugin and host adapters
web/src/api/client.ts, web/src/api/session.tsSession singleton, persistence, requests, password encryption and refresh
web/src/routerActual routes and trusted component registration

Diagnose the first run

SymptomNext check
Build waits during frontend dependency installationCheck the npm registry and network; the first build installs shared and sample dependencies
powershell.exe cannot be foundThe complete sample build currently uses Windows PowerShell; run it in the environment described above
APIs respond but the home page is missingCheck frontend build and embedded resources; do not skip frontend building on the first run
Port 5174 opens but login requests failInspect /api requests in browser Network, backend port 6200 and TADMIN_SAMPLE_API
Password encryption is unavailableUse localhost, loopback or HTTPS, and check crypto.subtle
The sample password does not workConfirm the current sample and database; bootstrap settings do not overwrite an existing account

For 404, 401, 403 and menu loading failures in your host, continue with integration troubleshooting.