dome-embedded-app-sdk v0.1.3
The Official Dome SDK
Use this SDK to build plugins for Dome. There are two plugins supported:
Cards : Extend the functionality of Dome by adding custom cards.
Document Viewer : Add support for editing & viewing any document in Dome.
1. Cards
A "card" in Dome enables you to extend the functionality of a dome. Each "card" is like a mini website (webapp) that you can build as per your needs. Each dome is made up of cards. By adding your custom card to your dome, you can extend it's functionality.
Use this SDK to create your custom card that can do whatever you like: a simple todo list, snake & ladder game, to a complex project management tool, a 3D AR visualization, to anything else you can imagine! Anything you can build in React or Angular can be created into a card!
As of Dec 2024, we support Angular and React cards. In future, we will add support for more frameworks.
Getting Started with your first Card
Register your card
Register your card at https://dev.dome.so
Code
Import the SDK
import { CardSdk } from "dome-embedded-app-sdk";
Call init to get instance of the SDK. It takes a secret and event handler as input.
CardSdk.init(my_dev_card_secret, {
onInit: (data: any) => {
this.user = data?.user;
this.api_token = data?.api_token;
},
onError: (error_code: string | number, message: string, data: any) => {
console.error("Some Error", message + "(" + error_code + ")");
},
onRefreshRequest: (data: any) => {
console.debug("Refresh requested", data);
}
})
Note: the secret
is given to you when you register your card (step 1)
Deploy
Deploy your code at https://dev.dome.so
2. Document Viewer
Add view / edit capability for any document in Dome. For example, you can come up with your own spreadsheet and make it instantly available to all users of Dome. Alternatively, you can create your own viewer that views & (optionally) edits existing documents such as Excel files. The options a limitless!
As of Dec 2024, we support Angular and React document viewers. In future, we will add support for more frameworks.
Getting Started with your first Document Viewer
Help
Join our developer community on Dome here: . Hang out, get latest updates, ask questions, experience Dome, and much more!