Project

🌍 Real Client Scenario

Follow a real project from start to finish. This is exactly what you would do for a real client.

📋 The Client

Name: Sarah's Bakery

Location: Toronto, Ontario

Business: A small bakery that wants to sell cakes and pastries online.

Problem: They have no website. They take orders by phone and paper. They lose orders and cannot grow.

Goal: Build an online store that is fast, safe, and always online.

Step 1: Build the App

You build a web app with ASP.NET Core Razor Pages and SQL Server. It has:

  • Product list with photos and prices
  • Shopping cart
  • Checkout with Stripe payment
  • Admin dashboard to add products

You test it on your laptop. It works.

Step 2: Put It in Docker

You write a Dockerfile to package the app. Now it runs the same on your laptop, the test server, and the cloud.

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out

FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "BakeryApp.dll"]

Step 3: Set Up CI/CD

You create a GitHub Actions workflow. Every time you push code:

  1. It builds the app.
  2. It runs all tests.
  3. It builds the Docker image.
  4. It deploys to Azure.

Now you do not need to deploy by hand. It is automatic.

Step 4: Deploy to the Cloud

You use Terraform to create the cloud servers in code. Then you deploy the Docker container to Azure.

The site is now live at www.sarahsbakery.ca with HTTPS and a custom domain.

Step 5: Monitor

You set up Prometheus and Grafana to watch the system.

  • You see CPU and memory usage.
  • You get an alert if the site goes down.
  • You check how many orders come in each day.

🎉 The Results

  • Sarah's Bakery now has a real online store.
  • Orders go up 40% in the first month.
  • Deployments take 5 minutes instead of 2 days.
  • The site stays online 99.9% of the time.
  • Sarah can add products herself without calling a developer.

✅ What You Learned

  • How to build a real app for a real client.
  • How to use Docker to package it.
  • How to set up CI/CD to deploy automatically.
  • How to use Terraform to create cloud servers.
  • How to monitor the system and fix problems early.