Migrating a PySide6 desktop app to a Vite/TypeScript web app deployable as a Power Apps Code App.
What is a Power Apps Code App?
A Code App is a web app (HTML/CSS/JS) hosted and distributed through Power Apps. It runs inside the Power Apps player, can reference Power Platform connectors, and is managed like any canvas app — sharing, versioning, environments — without requiring a SharePoint or Azure host. Built and deployed with the Power Platform CLI (pac code).
Scenario — Expense Report Currency Converter: load multi-currency expenses + exchange rates from CSV, convert to USD with date-matched rates (fallback to nearest prior date), display summary cards + detail table.
Code App (Power Apps player)![]() |
Desktop App (PySide6)![]() |
| Desktop (Python) | Code App (TypeScript) |
|---|---|
core.py |
src/core/ |
ui.py (PySide6 widgets) |
index.html + src/main.ts |
QTableWidget |
HTML <table> + DOM |
QFileDialog |
<input type="file"> |
csv module |
String.split() parsing |
# Desktop
cd desktop-app && pip install pyside6 && python main.py
# Code App (local dev)
cd code-app && npm install && npm run devcd code-app
# Build
npm run build
# First-time setup: register new app in the active environment
pac auth create --deviceCode # sign in
pac org select --environment <env-url> # set target environment
pac code init --displayName "Expense Report Calculator" \
--buildPath "./dist" \
--fileEntryPoint "index.html"
# Deploy (subsequent pushes)
pac code push
# Verify
pac code list
