KJDRAW / DEPLOYMENT
Deployment
Keep browser-local operation simple or attach explicit project, compute and scene providers for other product topologies.
Supported profiles#
| Profile | Where project data lives | Typical use |
|---|---|---|
browser-local | KJP file or browser storage | Zero-install tools and offline review |
desktop-local | Application-managed project file | Desktop engineering products |
self-hosted | Organization-selected providers | Private networks and regulated environments |
cloud-assisted | Host-selected remote services | Managed compute or conversion |
hybrid | Explicit local and remote providers | Local editing with selected acceleration |
KJDraw uses the same editor, document and file APIs in every profile. A registered provider runs only when the application invokes it.
Register a project provider#
import {
KJDeploymentRegistry,
KJ_PROVIDER_TYPES,
createDeploymentProfile,
validateDeploymentProfile,
} from '@kanjieteam/kjdraw/deployment'
const providers = new KJDeploymentRegistry()
providers.register(KJ_PROVIDER_TYPES.PROJECT_STORE, {
id: 'acme.projects',
locality: 'self-hosted',
loadProject: id => projectApi.load(id),
saveProject: (id, bytes) => projectApi.save(id, bytes),
})
const deployment = validateDeploymentProfile(createDeploymentProfile({
mode: 'self-hosted',
projectAuthority: 'acme.projects',
providers: { 'project-store': 'acme.projects' },
}), providers)
Provider families#
project-storeloads and saves project artifacts.computeexecutes a named host operation.sceneopens a scene and answers viewport queries.
Profiles select providers, while credentials stay in application configuration. Your application decides when to invoke a provider and how to authenticate the request.
Connect your application#
Keep credentials, encryption, authorization, tenancy, retry and storage choices in your application layer. A platform-specific project provider can add atomic replacement and durable writes where the product needs them.
See the runnable deployment provider example.