A simple inventory management application built with React and FastAPI, deployed to Azure Container Apps.
- Add new devices to inventory
- Edit device information (name, assigned to)
- View all devices
- Delete devices
- Frontend: React + Vite + TypeScript
- Backend: Python FastAPI with uv
- Database: Azure Cosmos DB (NoSQL)
- Hosting: Azure Container Apps
- Azure Developer CLI (azd)
- Docker
- Azure subscription
Use the devcontainer for a ready-to-deploy environment with Azure tooling preinstalled.
- Quickstart and troubleshooting: .devcontainer/README.md
- Golden path:
azd auth login→azd env new→azd env set AZURE_LOCATION <region>→azd up
cd backend
uv sync
uv run uvicorn src.main:app --reloadcd frontend
npm install
npm run devazd upThis single command will:
- Provision all Azure resources (Container Apps, Cosmos DB, Container Registry)
- Build and push Docker images
- Deploy frontend and backend (backend uses System-Assigned Managed Identity)
- Assign RBAC roles for the backend to access Cosmos DB
-
Be logged in to Azure:
azd auth login
The deployment sets and uses the following:
BACKEND_URL: Backend API endpoint for the frontendCOSMOS_ENDPOINT: Cosmos DB account endpointCOSMOS_DB_NAME: Database name (default:inventory)COSMOS_DEVICES_CONTAINER: Container name (default:devices)
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Frontend │─────>│ Backend │─────>│ Cosmos DB │
│ (React App) │ │ (FastAPI) │ │ (NoSQL) │
└──────────────┘ └──────────────┘ └──────────────┘
Container App Container App Serverless
This repository includes checkpoint branches for each task. If you need to catch up or start fresh from a specific point, use the commands below.
git stash && git switch task-1 # After completing Task 1
git stash && git switch task-2 # After completing Task 2
git stash && git switch task-3 # After completing Task 3
git stash && git switch task-4 # After completing Task 4If you want to preserve your current work before switching:
git add -A && git stash save "my work on task X"
git switch task-1To recover your stashed work later: git stash pop
If you want to completely discard all local changes and reset to a checkpoint:
git checkout -- . && git clean -fd && git switch task-1| Branch | Description |
|---|---|
main |
Starting point |
task-1 |
Completed Task 1 |
task-2 |
Completed Task 2 |
task-3 |
Completed Task 3 |
task-4 |
Completed Task 4 (final solution) |