This plan outlines the implementation of the FluentSample Power Apps Code App - a static template project with navigation and connector UI examples using mock data. The goal is to create a complete, functional app that others can clone and extend with their own data connectors for learning purposes.
Key Goal: Create a committable template that demonstrates Power Apps Code Apps best practices, which developers can use as a starting point to add their own live connectors.
-
Create Vite Project
- Run
npm create vite@latest FluentSample -- --template react-ts - Navigate to project:
cd FluentSample - Install base dependencies:
npm install
- Run
-
CRITICAL React Version Downgrade
- MUST downgrade to React 18.2.0:
npm install react@^18.2.0 react-dom@^18.2.0 - This ensures Power Apps Code SDK compatibility
- MUST downgrade to React 18.2.0:
-
Install Power Apps SDK (Local Version)
# Use your local Power Apps SDK file (new version) npm install ./PowerAppsSDK/7-16-pa-client-power-code-sdk-0.0.1\ 1.tgz
-
Configure Vite for Power Apps Update
vite.config.ts:import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import path from "path"; export default defineConfig({ base: "./", server: { host: "::", port: 3000, }, plugins: [react()], resolve: { alias: { "@": path.resolve(__dirname, "./src"), }, }, });
-
Update Package.json Scripts
{ "scripts": { "dev": "start vite && start pac code run", "build": "tsc -b && vite build", "lint": "eslint .", "preview": "vite preview" } } -
Install Core Dependencies (Static Development First)
{ "@fluentui/react-components": "^9.54.0", "@fluentui/react-icons": "^2.0.0", "react-router-dom": "^6.26.0", "@tanstack/react-query": "^5.56.0", "react": "^18.2.0", "react-dom": "^18.2.0", "typescript": "^5.8.3" }
-
PowerProvider Setup in main.tsx
- Wrap App with PowerProvider
- Configure FluentProvider with webLightTheme
- Set up QueryClient for TanStack Query
-
Create Mock Data Files
src/mockData/office365Data.ts- User profiles, calendar, emailssrc/mockData/sqlData.ts- Projects, tasks, relationshipssrc/mockData/customApiData.ts- Asset management datasrc/mockData/paginationData.ts- Large datasets (100+ items)
-
Build Static UI Components
- Navigation system with static routes
- Connector example pages using mock data
- Pagination components with mock datasets
- Responsive layout and components
-
Project Structure Setup
- Create folder structure as defined in requirements
- Set up ESLint and Prettier configurations
- Configure path aliases for imports
-
Theme and Design System
- Configure Fluent UI theme
- Set up responsive breakpoints
- Create design tokens for consistency
-
Static Navigation System
- Set up React Router with static routes
- Create navigation components
- Implement responsive mobile navigation
-
Mock Data Integration
- Connect components to mock data sources
- Implement pagination with static datasets
- Create realistic data relationships
- Project builds and runs with
npm run dev - React 18.2.0 compatibility confirmed
- PowerProvider and FluentProvider properly configured
- Complete navigation between all pages works with mock data
- All Fluent UI components render correctly
- Pagination works with static datasets
- TypeScript compilation is error-free
- App is fully functional as a learning template
- Clear code structure for others to extend with real connectors
- Comprehensive mock data that demonstrates realistic scenarios
Template Goal: Provide a complete, working app that developers can use to learn Power Apps Code Apps patterns and replace mock data with real connectors.
-
React Router Setup
- Configure all route definitions for connector examples
- Implement 404 handling with helpful messages
- Add route descriptions for learning purposes
-
Navigation Components
NavigationMenu- Main navigation with clear descriptionsSideNavigation- Collapsible side panel with iconsBreadcrumbs- Page hierarchy for easy navigationMobileMenu- Responsive hamburger menu
-
Complete App Layout
- Header with app title and navigation
- Side navigation panel with connector examples
- Main content area with consistent spacing
- Footer with learning resources
-
Responsive Design
- Mobile-first approach for all screen sizes
- Tablet and desktop breakpoints
- Touch-friendly interactions throughout
- Landing Experience
- Welcome section explaining the template purpose
- Overview of available connector examples
- Getting started guide for developers
- Link to documentation and setup instructions
- Office 365 Mock UI
- User profile display with mock data
- Calendar events list with sample entries
- Email messages preview
- Contact directory with search
- Clear indicators that data is mocked
- Code comments showing where to add real connectors
- SQL Mock UI
- Data grid with sortable columns
- CRUD operation forms (mock actions)
- Search and filter functionality
- Pagination with large mock datasets
- Placeholder areas for real database connections
- Code structure ready for SQL connector integration
- Custom API Mock UI
- API response display with formatted JSON
- Different HTTP method examples (GET, POST, PUT, DELETE)
- Request/response visualization
- Error handling scenarios with mock errors
- Template structure for custom connector integration
- Essential Components
LoadingSpinner- Consistent loading statesErrorBoundary- Error handling wrapperToastNotification- User feedback systemConfirmDialog- Deletion confirmationsCodeSnippet- Copy-to-clipboard code examples
- Pagination Components
PaginationControls- Navigation buttonsPageSizeSelector- Items per pagePageInfo- Current page displayusePaginationhook - Reusable pagination logic- Mock data integration showing how to implement with real data
- Inline Documentation
- Code comments explaining Power Apps patterns
- TypeScript interfaces showing data structures
- Examples of how to replace mock data with real connectors
- Best practices documentation in README
- Realistic Mock Datasets
office365Data.ts- Users, calendar, emails (50+ entries)sqlData.ts- Projects, tasks, relationships (100+ entries)customApiData.ts- Asset management data (varied responses)paginationData.ts- Large datasets for pagination testing
- Connector Integration Points
- Clear separation between UI and data layers
- Hooks ready for real connector implementation
- Service layer architecture for easy data source swapping
- Error handling patterns for connector failures
- Code Quality & Consistency
- ESLint/Prettier configuration
- TypeScript strict mode compliance
- Consistent naming conventions
- Clean, readable code structure
- Comprehensive README
- Quick start guide
- How to replace mock data with real connectors
- Power Apps Code Apps best practices
- Common patterns and examples
- Troubleshooting guide
- Production Ready Template
- Accessibility compliance (WCAG 2.1 AA)
- Responsive design on all devices
- Performance optimization
- Error handling throughout
- Phase 1: Vite setup with Power Apps SDK and complete project structure
- Phase 2: Full navigation system and responsive layout
- Phase 3: All connector example pages with comprehensive mock data and UI
- Phase 4: Shared components and pagination system
- Phase 5: Comprehensive mock data and template structure
- Phase 6: Final polish, documentation, and accessibility
Final Goal: A complete, production-ready template that developers can clone, run immediately, and use as a learning foundation to add their own Power Apps connectors.
- Immediate usability:
npm install && npm run devworks out of the box - Complete functionality: All features work with mock data
- Clear code structure: Easy to understand and extend
- Comprehensive examples: Covers all major connector patterns
- Good documentation: README explains how to add real connectors
- Accessibility compliant: WCAG 2.1 AA standards
- Mobile responsive: Works on all device sizes
- Zero errors: Clean TypeScript compilation
- Performance optimized: Fast loading and smooth interactions
- Demonstrates Power Apps Code Apps best practices
- Shows proper Fluent UI implementation
- Illustrates pagination and data management patterns
- Provides clear separation between UI and data layers
- Includes comprehensive inline documentation
- Quick Start: Complete working app to learn from
- Best Practices: Follows Microsoft recommended patterns
- Extensible: Easy to replace mock data with real connectors
- Modern Stack: Uses latest Fluent UI v9, React Router, TypeScript
- Comprehensive Examples: Office 365, SQL, and Custom API patterns
- Realistic Scenarios: Mock data that represents real-world use cases
- Code Documentation: Inline comments explaining Power Apps concepts
- Progressive Enhancement: Shows how to build static-first, then add connectors
- ✅ Phase 1: Set up Vite project with Power Apps SDK
- ✅ Phase 2: Build navigation and layout system
- ✅ Phase 3: Create all connector example pages with mock data
- ✅ Phase 4: Implement shared components and pagination
- ✅ Phase 5: Create comprehensive mock datasets
- ✅ Phase 6: Final polish and documentation
- ✅ Commit: Push complete template to repository for others to use
Status: The FluentSample template is now fully implemented and ready for use as a learning resource.
This template provides developers with a complete, functional Power Apps Code App that demonstrates best practices and serves as a foundation for building their own connector integrations.