Installation Methods
Option 1: NPM/Yarn (Recommended)
This is the recommended option for most projects using modern bundlers like Webpack, Vite, or similar.Installation with NPM
Installation with Yarn
Import in your project
<sofia-sdk> component will be available globally throughout your application.
Option 2: CDN
Ideal for rapid prototyping, bundler-free development, or integration into legacy systems.For specific version
Option 3: Manual build
For projects with custom build pipelines that already have the package installed via npm.Installation Verification
After installation, you can verify that the component is available:In the browser
Open developer tools and run:undefined.
In your HTML
Try adding the basic component:Compatibility
Supported browsers
- Chrome: 54+
- Firefox: 63+
- Safari: 10.1+
- Edge: 79+
Compatible frameworks
- Vanilla JavaScript: Full compatibility
- React: Native support for Web Components
- Angular: CUSTOM_ELEMENTS_SCHEMA required
- Vue.js: Additional configuration needed
- Svelte: Compatible compiler
Environment Requirements
HTTPS Protocol
SofIA SDK requires HTTPS for audio and microphone functionalities:- Local development:
https://localhostor use tools likelocal-ssl-proxy - Production: Valid SSL certificate mandatory
Content Security Policy (CSP)
If your application uses CSP, add the following directives:Common Troubleshooting
Component doesn’t load
- Verify the import is in the main file
- Confirm there are no errors in the browser console
- Check network connectivity if using CDN
CORS errors
- Ensure your application is served from HTTPS
- Verify that
baseUrlandwssUrlURLs are correct
Component not defined
Next Steps
Once installation is complete:- Required properties: Configure mandatory parameters
- Optional properties: Customize behavior
- Clinical data schemas: Define data structure to generate