Chuyển đến nội dung
Skillpedia
Ứng dụng di động40k · #7333

power-apps-code-app-scaffold

Skill này làm gì

Chương trình này tạo cấu trúc cơ bản cho một ứng dụng web tùy chỉnh trong Power Apps. Nó thiết lập mọi thứ bạn cần để bắt đầu viết mã, như công cụ ban đầu và các file.

Khi nào nên dùng

  • ✓Khi bạn muốn tạo một ứng dụng web mới trong Power Apps bằng mã.
  • ✓Khi bạn cần một điểm khởi đầu có tổ chức cho dự án ứng dụng.
  • ✓Khi bạn muốn đảm bảo ứng dụng tuân theo thực hành tốt nhất ngay từ đầu.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/github/awesome-copilot/blob/main/skills/power-apps-code-app-scaffold/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo cấu trúc ban đầu cho một Power Apps Code App.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng các công cụ dòng lệnh để thiết lập dự án với React và TypeScript. Sau đó, nó thêm các cấu hình cần thiết để ứng dụng hoạt động trong môi trường Power Apps.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

…

Câu hỏi thường gặp

Power Apps Code App là gì?

Đây là cách xây dựng ứng dụng tùy chỉnh trong Power Apps bằng mã, thay vì chỉ dùng các công cụ trực quan. Nó cho phép linh hoạt hơn và tích hợp tốt hơn với các dịch vụ khác.

Tôi có cần biết lập trình không?

Có, chương trình này dành cho những ai muốn xây dựng ứng dụng bằng mã. Nó thiết lập một dự án cho lập trình viên.

Những công nghệ nào được dùng?

Nó dùng React và TypeScript, là các công nghệ phát triển web phổ biến, cùng công cụ Power Apps CLI để tích hợp.

Chi tiết

Mô tả gốc của tác giả

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

repo: github/awesome-copilot

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7333
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự