Skip to content

wyattdave/codeapp-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codeapp-js

JavaScript library, starter app, and sample apps for building Power Apps Code Apps with standard web technologies.

The repository is the primary source of truth for the project. The public site at codeappjs.com is useful for background and additional docs, but this repo reflects the latest files, examples, and starter assets.

What this repo includes

  • A deployable starter app in codeApp/
  • Runtime files in codeApp/dist/ including codeapp.js, power-apps-data.js, and connector assets
  • Example apps for Dataverse, Outlook, SharePoint, Groups, and full app scenarios under examples/
  • Connector schemas under schemas/
  • AI instructions and skills used for code-first app generation under AI/

Quick start

Prerequisites

  • Node.js
  • Power Platform CLI (pac) for deployment
  • A Power Platform environment with Code Apps enabled
  • Optional: VS Code with Copilot and Power Platform Tools

No package install is required for local serving. The repo uses a built-in Node static server.

Run a static server for the repo:

npm run start

Open the starter code app directly:

npm run start:codeapp

The starter app lives in codeApp/dist/ and is served without a build step.

Starter app structure

The default starter app is in codeApp/.

  • codeApp/power.config.json: Power Apps Code App configuration
  • codeApp/dist/index.html: app shell and import map for @microsoft/power-apps/data
  • codeApp/dist/index.js: starter boot file
  • codeApp/dist/codeapp.js: helper runtime used by samples and generated apps
  • codeApp/dist/power-apps-data.js: Power Apps data runtime bundle
  • codeApp/dist/connectors/: generated connector support files

Deploying a code app

  1. Update power.config.json with your target environment details.
  2. Authenticate with Power Platform CLI.
  3. Push the app to your environment.

Example:

pac auth create --environment https://<yourorg>.crm.dynamics.com
pac env who
pac code push --solutionName MyCodeApp

The app packages the configured buildPath from power.config.json, which defaults to ./dist in the included starter and examples.

Examples

The examples/ folder contains both focused demos and fuller application samples.

  • examples/dataverse Demo/: Dataverse-focused sample
  • examples/groups Demo/: Microsoft 365 Groups sample
  • examples/myProfile/: Office 365 Users sample
  • examples/outlook Demo/: Outlook mail and calendar sample
  • examples/sharepoint demo/: SharePoint sample
  • examples/apps/kanban/: fuller app example with generated source assets
  • examples/apps/planning Poker/: planning poker app assets
  • examples/apps/solution explorer/: solution explorer app assets
  • examples/apps/Solution Share/: solution sharing sample
  • examples/apps/todo/: todo app sample

Each sample includes its own power.config.json, and some include additional notes or agent artifacts.

Working with connectors

Connector schemas for common services are stored in schemas/, and example-specific generated assets may appear under an app's src/generated/ or dist/connectors/ folders.

This repo includes patterns and examples for:

  • Dataverse
  • SharePoint
  • Office 365 Outlook
  • Office 365 Users
  • Office 365 Groups
  • Jira
  • Teams
  • SQL
  • Key Vault

Repository layout

codeApp/         Starter code app and runtime assets
examples/        Demo apps and fuller sample applications
schemas/         Connector schema files
AI/              Skills and prompts for code generation workflows
agent/           Agent planning and supporting artifacts

Additional documentation

If you are starting fresh, begin with codeApp/, verify the app locally, then copy or adapt one of the examples that matches your connector and data source needs.

About

Vaniall JavaScript version of Code Apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors