Skip to content

Comments

Add Blazor frontend for supermarket receipt application#28

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/build-blazor-frontend
Draft

Add Blazor frontend for supermarket receipt application#28
Copilot wants to merge 4 commits intomainfrom
copilot/build-blazor-frontend

Conversation

Copy link

Copilot AI commented Dec 17, 2025

Implements a Blazor web UI for the supermarket receipt kata with parrot-themed branding.

Changes

New Blazor Project

  • SupermarketReceipt.BlazorApp/ - Blazor Server app targeting .NET 10
  • References existing SupermarketReceipt library for business logic
  • Added to solution file

Core Components

  • Services/SupermarketService.cs - Manages catalog, cart state, and checkout flow
    • Single source of truth for product definitions (name, unit, price)
    • Wraps FakeCatalog, Teller, and ShoppingCart from core library
  • Pages/Home.razor - Main UI with three sections:
    • Product catalog with configurable quantities
    • Special offers configuration (3-for-2, percentage discount, bulk pricing)
    • Shopping cart and receipt display

UI Features

  • Add products to cart with custom quantities
  • Configure offers per product (ThreeForTwo, TenPercentDiscount, TwoForAmount, FiveForAmount)
  • Generate receipts showing items, applied discounts, and totals
  • Parrot emoji branding throughout (🦜)

Running

cd csharp-ms/SupermarketReceipt.BlazorApp
dotnet run
# Navigate to http://localhost:5023

Screenshots

Initial state:
Initial view

Receipt with 3-for-2 discount applied:
Receipt with discount

Notes

  • Bootstrap libraries excluded via .gitignore (restored at build time)
  • Existing test project targets .NET 5 (unavailable) - pre-existing issue, does not affect new code
Original prompt

This section details on the original issue you should resolve

<issue_title>I want to have a frontend to test the application</issue_title>
<issue_description>Build a front-end using blazor for me supermarket recept app.</issue_description>

<agent_instructions>Use extra parrots</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 17, 2025 13:40
Co-authored-by: nstubbe <20206435+nstubbe@users.noreply.github.com>
…gnore

Co-authored-by: nstubbe <20206435+nstubbe@users.noreply.github.com>
Co-authored-by: nstubbe <20206435+nstubbe@users.noreply.github.com>
Copilot AI changed the title [WIP] Add frontend using Blazor for supermarket recept app Add Blazor frontend for supermarket receipt application Dec 17, 2025
Copilot AI requested a review from nstubbe December 17, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I want to have a frontend to test the application

2 participants