Backlog
A collection of planned features and improvements for streamlining Dataverse integration in SvelteKit applications
Almost-OOTB Form
Create a set of components and utilities that automatically generate Svelte forms based on Dataverse form definitions. This should:
- Form Definition Fetcher
- Create a utility that fetches form layout and field definitions from Dataverse
- Handle metadata retrieval for field types, validations, and business rules
- Dynamic Component Mapping
- Implement a mapping system that converts Dataverse field types to appropriate Svelte form components
- Support common field types
- Auto-generated Form Components
- Create a base FormGenerator component that:
- Takes a table/entity name as input
- Fetches the form definition
- Dynamically renders the appropriate fields
- Handles form submission back to Dataverse
- Create a base FormGenerator component that:
- Usage Example
<Form tableName="contact" formName="main" onSubmit={handleSubmit} />
- Documentation
- Provide clear examples of how to:
- Initialize the form generator
- Customize field renderers
- Override default components
- Handle form events and validation
- Provide clear examples of how to:
This will allow users to quickly implement Dataverse forms in their Svelte applications with minimal configuration while maintaining the flexibility to customize when needed.
References
Automatic Access Token Refresh
To enhance the application’s user experience, authorization tokens should be renewed automatically without requiring user intervention. The recommended approach is to utilize the msal.acquireTokenSilent()
method whenever the application needs an access token, with a fallback to interactive token acquisition if necessary. This method checks for a valid token in the cache and automatically attempts to refresh it using the cached refresh token if it’s near expiration or doesn’t exist.
This implementation prevents scenarios where users complete form submissions only to encounter a 401 - Unauthorized
error.
We recommend that you call the acquireTokenSilent method to acquire or renew an access token before calling a web API. After you have a token, you can call a protected web API. Github acquireTokenSilent, Microsoft Entra
Note: This solution requires a persistent token cache, as MSAL’s in-memory token cache is not suitable for production environments. Implementation should utilize distributed token caching solutions such as Redis or MongoDB.
Notes
- SvelteKit Application User
- Power Automate Demo
- Todos-endpoint
- Create an endpoint that can be used to post new ideas for this template
- Default styling
- Setup theme config
- Security
- Role-based Access Control (RBAC)
- Permission-based UI rendering
- Secure route guards
- Role-based Access Control (RBAC)
- Tests
- VS Code Extension Recommandations
- Markdown Guide
- Restbuilder
Application Specific Todos
- Set up Cross-tenant MFA
- Add SvelteKit Flash Messages