TipCalc is a small Blazor Progressive Web App (PWA) for calculating tips and managing tip history. It is implemented in C# (Blazor) with a minimal JavaScript interop layer and is configured for deployment to Azure Static Web Apps.
- Calculate tip amounts from a bill and percentage
- Progressive Web App support (installable / offline caching)
- .NET / Blazor (C#)
- JavaScript (small helper scripts)
- xUnit for unit tests
- Azure Static Web Apps (deployment)
- .NET SDK (match project target framework; see project files)
- Optional: Visual Studio or Visual Studio Code
Verify .NET is installed:
dotnet --versionFrom the repository root:
- Restore and build:
dotnet restore ./src/TipCalc.slnx
dotnet build ./src/TipCalc.slnx- Run the app locally:
dotnet run --project ./src/TipCalc/TipCalc.csprojOpen the URL printed by dotnet run (usually https://localhost:5001).
Run unit tests:
dotnet test ./src/TipCalc.TestsBuild for production:
dotnet publish -c Release -o ./publish ./src/TipCalc/TipCalc.csprojThis repository includes staticwebapp.config.json and a GitHub Actions workflow for Azure Static Web Apps. See Azure Static Web Apps docs for full CI/CD setup.
- Fork the repo and create a branch:
feat/<name>orfix/<name>. - Write tests for new features or bug fixes.
- Run
dotnet testanddotnet buildlocally. - Run
dotnet formator follow the project's.editorconfig(add one if missing). - Submit a pull request with a description, testing steps, and related issue links.
This project is licensed under the terms in LICENSE.