Cross-platform hotel management system built in C#/.NET.
Includes a staff desktop app, guest web portal, and real-time backend
for bookings, housekeeping, and digital keys.
A .NET 8--based hotel platform with:
- Staff desktop app (front desk + housekeeping) built with Avalonia (Windows/macOS/Linux).
- Guest web/kiosk built with Blazor Server.
- Backend API using ASP.NET Core, EF Core, and Identity, with SignalR for live updates.
The desktop and backend also run on Windows/macOS/Linux.
Compared to the original project plan:
- The development database now uses SQLite (file-based) instead of LocalDB.
- The desktop app supports Mock and Live modes via configuration (no separate exe).
- The repo is organized as a .NET monorepo with three solution files.
- Docker, Nginx, and compose files are no longer part of the standard setup.
- GitHub workflows are minimal/optional and not required to run or develop the app locally.
- .NET 8 SDK
- Windows (primary target)
- (Optional) macOS/Linux for backend & desktop development
The backend uses a SQLite database file under:
src/Backend/KeyCard.Api/App_Data/keycard_dev.db
If the schema becomes out of sync, delete the DB file and let EF recreate it, or reapply migrations.
Apply migrations:
dotnet ef database update --project src/Backend/KeyCard.Infrastructure --startup-project src/Backend/KeyCard.Api
Reset DB:
- Stop backend\
- Delete:
src/Backend/KeyCard.Api/App_Data/keycard_dev.db\ - Re-run migrations or run API once to recreate
Open the root solution or area-specific solution:
KeyCard.Backend.slnKeyCard.Desktop.slnKeyCard.Web.sln
Select the desired run profile:
- Backend API
- Web Portal
- Desktop
- Backend + Web
- Backend + Desktop
- Full stack
Ports are shown in the startup logs.
Use built-in .vscode/launch.json:
- Open repo in VS Code\
- Go to Run & Debug\
- Choose configuration (Backend, Web, Desktop, or combinations)
dotnet run --project src/Backend/KeyCard.Api/KeyCard.Api.csproj
dotnet run --project src/Web/KeyCard.Web/KeyCard.Web.csproj
dotnet run --project src/Desktop/KeyCard.Desktop/KeyCard.Desktop.csproj
Backend should run first when using Web or Desktop.
The desktop app supports modes via config:
KeyCard:Mode = "Mock"
KeyCard:Mode = "Live"
KeyCard:ApiBaseUrl = "https://localhost:7224"
Example:
$env:KeyCard__Mode = "Live"
$env:KeyCard__ApiBaseUrl = "https://localhost:7224"
dotnet run --project src/Desktop/KeyCard.Desktop
- Guest bookings & availability search
- Check-in / Check-out workflows
- Room lifecycle tracking (Vacant → Occupied → Dirty → Cleaning → Inspected → Vacant)
- Real-time updates (SignalR)
- Guest self-check-in + digital key (QR)
- PDF invoices
- Language: C# / .NET 8
- Desktop: Avalonia (MVVM)
- Web: Blazor Server
- Backend: ASP.NET Core, EF Core, Identity, SignalR
- Database: SQLite
- Testing: xUnit, FluentAssertions
keycard.net/
├─ docs/
│ └─ architecture.md
├─ src/
│ ├─ Backend/
│ │ ├─ KeyCard.Api/
│ │ ├─ KeyCard.BusinessLogic/
│ │ ├─ KeyCard.Core/
│ │ ├─ KeyCard.Domain/
│ │ └─ KeyCard.Infrastructure/
│ ├─ Desktop/
│ │ └─ KeyCard.Desktop/
│ └─ Web/
│ └─ KeyCard.Web/
├─ tests/
├─ run/
└─ keycard.net.sln
Likely SQLite schema mismatch.
Fix:
- Delete
keycard_dev.db\ - Run migrations or restart backend
Update ports in launchSettings.json.
Verify KeyCard:Mode environment variable or appsettings entry.