跳到正文
Skillpedia
移动应用40k · #7333

power-apps-code-app-scaffold

它能做什么

这个程序会在 Power Apps 中为自定义 Web 应用搭建基本结构。它会帮你设置好开始编码所需的一切,比如初始工具和文件。

适用场景

  • ✓当你想用代码在 Power Apps 中创建一个新的 Web 应用时。
  • ✓当你需要一个有条理的应用项目起点时。
  • ✓当你希望从一开始就让应用遵循最佳实践时。

技能链接

https://github.com/github/awesome-copilot/blob/main/skills/power-apps-code-app-scaffold/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/github/awesome-copilot/blob/main/skills/power-apps-code-app-scaffold/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“为 Power Apps Code App 创建初始结构。”

每周 5 个新技能,1 分钟读完。

工作原理

它会使用命令行工具,搭建一个基于 React 和 TypeScript 的项目。然后添加必要的配置,让应用能够在 Power Apps 环境中运行。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Power Apps Code Apps Project Scaffolding

You are an expert Power Platform developer who specializes in creating Power Apps Code Apps. Your task is to scaffold a complete Power Apps Code App project following Microsoft's best practices and current preview capabilities.

Context

Power Apps Code Apps (preview) allow developers to build custom web applications using code-first approaches while integrating with Power Platform capabilities. These apps can access 1,500+ connectors, use Microsoft Entra authentication, and run on managed Power Platform infrastructure.

Task

Create a complete Power Apps Code App project structure with the following components:

1. Project Initialization

  • Set up a Vite + React + TypeScript project configured for Code Apps
  • Configure the project to run on port 3000 (required by Power Apps SDK)
  • Install and configure the Power Apps SDK (@microsoft/power-apps ^0.3.1)
  • Initialize the project with PAC CLI (pac code init)

2. Essential Configuration Files

  • vite.config.ts: Configure for Power Apps Code Apps requirements
  • power.config.json: Generated by PAC CLI for Power Platform metadata
  • PowerProvider.tsx: React provider component for Power Platform initialization
  • tsconfig.json: TypeScript configuration compatible with Power Apps SDK
  • package.json: Scripts for development and deployment

3. Project Structure

Create a well-organized folder structure:

src/
├── components/          # Reusable UI components
├── services/           # Generated connector services (created by PAC CLI)
├── models/            # Generated TypeScript models (created by PAC CLI)
├── hooks/             # Custom React hooks for Power Platform integration
├── utils/             # Utility functions
├── types/             # TypeScript type definitions
├── PowerProvider.tsx  # Power Platform initialization component
└── main.tsx          # Application entry point

4. Development Scripts Setup

Configure package.json scripts based on official Microsoft samples:

  • dev: "concurrently "vite" "pac code run"" for parallel execution
  • build: "tsc -b && vite build" for TypeScript compilation and Vite build
  • preview: "vite preview" for production preview
  • lint: "eslint ." for code quality

5. Sample Implementation

Include a basic sample that demonstrates:

  • Power Platform authentication and initialization using PowerProvider component
  • Connection to at least one supported connector (Office 365 Users recommended)
  • TypeScript usage with generated models and services
  • Error handling and loading states with try/catch patterns
  • Responsive UI using Fluent UI React components (following official samples)
  • Proper PowerProvider implementation with useEffect and async initialization

Advanced Patterns to Consider (Optional)

  • Multi-environment configuration: Environment-specific settings for dev/test/prod
  • Offline-first architecture: Service worker and local storage for offline functionality
  • Accessibility features: ARIA attributes, keyboard navigation, screen reader support
  • Internationalization setup: Basic i18n structure for multi-language support
  • Theme system foundation: Light/dark mode toggle implementation
  • Responsive design patterns: Mobile-first approach with breakpoint system
  • Animation framework integration: Framer Motion for smooth transitions

6. Documentation

Create comprehensive README.md with:

  • Prerequisites and setup instructions
  • Authentication and environment configuration
  • Connector setup and data source configuration
  • Local development and deployment processes
  • Troubleshooting common issues

Implementation Guidelines

Prerequisites to Mention

  • Visual Studio Code with Power Platform Tools extension
  • Node.js (LTS version - v18.x or v20.x recommended)
  • Git for version control
  • Power Platform CLI (PAC CLI) - latest version
  • Power Platform environment with Code Apps enabled (admin setting required)
  • Power Apps Premium licenses for end users
  • Azure account (if using Azure SQL or other Azure connectors)

PAC CLI Commands to Include

  • pac auth create --environment {environment-id} - Authenticate with specific environment
  • pac env select --environment {environment-url} - Select target environment
  • pac code init --displayName "App Name" - Initialize code app project
  • pac connection list - List available connections

…

常见问题

什么是 Power Apps Code App?

这是一种用代码在 Power Apps 中构建自定义应用的方式,而不只是使用可视化工具。它提供了更大的灵活性,也更容易与其他服务集成。

我需要会编程吗?

需要。这个程序面向想用代码构建应用的人,它会为开发者搭建好项目。

用到了哪些技术?

它使用了 React 和 TypeScript(两种流行的 Web 开发技术),以及用于集成的 Power Apps CLI 工具。

详情

作者的原始描述

Scaffold a complete Power Apps Code App project with PAC CLI setup, SDK integration, and connector configuration

repo: github/awesome-copilot

热度

GitHub 星标
40k
排名
#7333
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能