Small full-stack app: ASP.NET Core Web API + SQL Server + Angular (devices, users, JWT auth, search, optional AI descriptions).
- .NET SDK 8 or 9
- Node.js LTS (includes npm)
- SQL Server LocalDB or Express (default connection string targets LocalDB)
- Git
1. Database — in a terminal, go to the src folder inside this repo:
cd src
dotnet tool restore
dotnet tool run dotnet-ef database update --project DeviceManagement.Api2. API — same repo, new terminal (or stop after step 1 and use one terminal):
cd src\DeviceManagement.Api
dotnet runWait until you see a URL like http://localhost:5117. Open Swagger: http://localhost:5117/swagger.
3. Web UI — another terminal:
cd client\device-management-ui
npm install
npm startOpen http://localhost:4200. Log in with a seeded user (alice@company.test / Passw0rd!) or use Register.
Tip: The Angular app calls http://localhost:5117/api. If your API uses another port, edit client/device-management-ui/src/environments/environment.ts (apiUrl).
dotnet testfrom thesrcfolder — should report passing tests.- Swagger —
GET /api/devicesshould return 401 without a token; after login, call with Authorize (JWT) and you should get 200. - Browser — login → device list loads → open a device → create/edit/delete if you want.
- (Optional) AI description: set an API key —
dotnet user-secrets set "OpenAI:ApiKey" "YOUR_KEY" --project src/DeviceManagement.Api— then use “Generate description” in the UI.
| Path | Purpose |
|---|---|
src/DeviceManagement.sln |
Open in Visual Studio or build with dotnet build |
src/DeviceManagement.Api |
Web API |
client/device-management-ui |
Angular app |
database/ |
Optional SQL scripts (01-create.sql, 02-seed.sql, migration baseline) |
- Connection string:
src/DeviceManagement.Api/appsettings.json→ConnectionStrings:DefaultConnection - Seeded logins:
alice@company.test/bob@company.test, passwordPassw0rd!