SecureBin Developer Platform
Build apps for SecureBin with HTML, CSS, and JavaScript. The public SDK includes a local development server, a neutral starter app, the SecureBin runtime bridge, manifest validation, and the marketplace submission tools required to prepare an app for review.

.sbapp-review.json submission from your project when your app is ready for SecureBin App Store review.


Includes the CLI, local development server, runtime bridge, starter template, Hello SecureBin example, marketplace review submission builder, and developer documentation. Requires Node.js 20 or newer.
Overview
A SecureBin app is a local project containing a manifest and a source directory. You develop and test the app locally, then use securebin submit to create the review file submitted to the SecureBin App Store.
| Stage | What happens |
|---|---|
| Develop | Edit your HTML, CSS, JavaScript, and assets in the project's src/ directory. |
| Preview | securebin dev starts a local preview server and provides the SecureBin development runtime bridge. |
| Optional developer signing | securebin keygen can create a developer signing identity. This is optional for standard marketplace review submissions. |
| Submit | securebin submit validates the project and creates a .sbapp-review.json file for review. |
| Review | SecureBin reviews the submitted app and listing information before publication. |
| Publish | If approved, SecureBin creates the signed installable .sbapp marketplace package. |
Quick Start
Extract the SDK, open PowerShell or a terminal in the SDK folder, and create a project:
node .\bin\securebin.js create my-app
cd .\my-app
node ..\bin\securebin.js dev
Edit src/index.html, src/app.js, and securebin.app.json. Refresh the local preview as you work. When the app is ready for marketplace review, stop the development server and run:
node ..\bin\securebin.js submit --out dist\my-app.sbapp-review.json
Upload the generated .sbapp-review.json file on the Upload App page together with your App Store listing information.
| Command | Purpose |
|---|---|
create <folder> | Create a new app from the neutral starter template. |
dev [project] [--port 4860] | Run the local development server. |
keygen [project] | Create an optional developer signing identity. |
submit [project] [--out file.sbapp-review.json] | Build a marketplace review submission. |
inspect <file.sbapp> | Inspect supported installable package metadata. |
package [project] | Legacy private-distribution packaging. Do not use this command for SecureBin App Store submissions. |
Project Structure
The starter project contains no package key, publisher key, installable .sbapp, or SecureBin first-party application. If you generate optional developer signing keys, keep the private key out of source control and do not include it with your submission.
Manifest
Every app includes securebin.app.json. The SDK validates this file before development and submission.
{
"id": "com.example.my-app",
"name": "My App",
"version": "1.0.0",
"source": "src",
"entry": "index.html",
"permissions": []
}
| Field | Rules |
|---|---|
id | A stable lowercase app identifier using letters, numbers, dots, or hyphens. Reverse-domain style is recommended, for example com.example.my-app. |
name | Required; 80 characters or fewer. |
version | Semantic version such as 1.0.0. |
source | Source directory, normally src. |
entry | HTML entry file inside the source directory. |
permissions | Array containing only supported capabilities required by the app. |
id stable across releases. Your App Store listing can use a separate human-readable slug.Permissions
Declare only the capabilities your app requires. Unsupported permissions fail manifest validation.
| Permission | Capability |
|---|---|
internet | Allows the app to use network-connected functionality provided by its supported runtime environment. |
usb_upload | Allows supported operations that import or upload data from SecureBin storage. |
usb_download | Allows supported operations that save or export data to SecureBin storage. |
securebin_key | Allows approved access to the SecureBin device-key capability exposed by the runtime. |
crypto.signal | Enables SecureBin's Signal messaging capability. Use only for apps that implement supported secure messaging features. |
Permissions declared in the manifest should match the functionality described in your App Store listing. Request the minimum capabilities required for your app to operate.
Runtime API
The SDK includes runtime/securebin-runtime.js, which exposes window.securebinSDK when the app is running with a compatible SecureBin host. During local development, include the runtime bridge served by the SDK:
<script src="/securebin-runtime.js" defer></script>
<script src="app.js" defer></script>
| Method | Purpose |
|---|---|
securebinSDK.app.getManifest() | Return the current app manifest. |
securebinSDK.storage.read(path) | Read data through the SecureBin storage bridge. |
securebinSDK.storage.write(path, value) | Write data through the SecureBin storage bridge. |
securebinSDK.storage.list(path) | List a supported storage path. |
securebinSDK.permissions.request(permissions) | Request declared runtime capabilities. |
securebinSDK.device.getSecureBinKey() | Request the supported device-key capability when securebin_key is declared and available. |
securebinSDK.crypto.randomId(prefix) | Create a cryptographically random identifier. |
securebinSDK.crypto.sha256Base64Url(bytes) | Hash bytes with SHA-256 and return a base64url value. |
Runtime calls can fail when a capability is unavailable, not declared, or not granted. Handle rejected promises and provide a clear fallback state in your interface.
Messaging apps
Apps that declare crypto.signal can use the SecureBin Signal bridge exposed at securebinSDK.signal. See the SDK's docs/signal-api.md for the supported methods and lifecycle.
Security Model
SecureBin separates app development, marketplace review, and marketplace signing. Developers build and test their own source locally. SecureBin signs installable marketplace packages only after approval.
- Do not include the SecureBin marketplace publisher private key in an app project or submission.
- Keep any optional developer signing private key under your control and out of source control.
- Declare only the permissions required by your app.
- Use a stable manifest app ID across updates.
- Submit the generated
.sbapp-review.jsonfile for marketplace review rather than a privately packaged.sbapp.
Submitting for Review
When your app is ready, securebin submit validates the project, collects the source files included by the manifest, records file hashes, and writes a review submission.
node ..\bin\securebin.js submit --out dist\my-app.sbapp-review.json
Upload the resulting .sbapp-review.json file through the SecureBin developer upload page. Do not rename an HTML file or a legacy private .sbapp package to imitate a review submission.
The package command remains available for legacy private distribution. It is not the marketplace publishing workflow.
Publishing and Updates
- Test locally
Run
devand verify your app's interface, declared permissions, and supported runtime behavior. - Create a review submission
Run
submitand upload the generated.sbapp-review.jsonfile with your App Store listing. - App review
SecureBin reviews the submitted app and listing information before it becomes available in the App Store.
- Marketplace publication
Approved submissions are converted into an official signed
.sbapppackage by SecureBin. - Release an update
Increase the app version, test the update, create a new review submission, and submit it from the app's edit page. The currently approved version remains available until the update is approved.
Your App Store listing contains customer-facing information such as the app name, description, category, screenshots, pricing, release notes, and requested permissions. Keep those details accurate and consistent with the submitted app.
In-App Purchases
Approved marketplace apps can offer one-time purchases or subscriptions configured from the SecureBin app management pages.
Each product uses a stable product id, a customer-facing name, and a type of one_time or subscription. One-time products use a flat price; subscription products can use monthly and yearly pricing.
[
{"id":"pro","name":"Pro unlock","type":"one_time","price":4.99},
{"id":"plus","name":"Plus","type":"subscription","price_monthly":2.99,"price_yearly":19.99}
]
Start purchases through the SecureBin-controlled checkout experience rather than collecting payment information inside your app.
<script src="/assets/js/securebin-iap.js"></script>
<button data-securebin-iap data-app-slug="your-app-slug" data-product-id="pro">
Unlock Pro
</button>
You can also open checkout from JavaScript after a user action:
SecureBinIAP.openCheckout({
appSlug: "your-app-slug",
productId: "pro"
});
After checkout, your app can check whether the signed-in user currently has access to a product:
GET /assets/php/check_in_app_access.php?app=your-app-slug&product=pro
Use the SecureBin checkout and entitlement flow for purchase state. Do not attempt to create purchase or subscription records directly from app code.
Troubleshooting
| Issue | Resolution |
|---|---|
| Node command is unavailable | Install Node.js 20 or newer, then reopen your terminal. |
| Target already exists | create does not overwrite an existing project. Choose another folder name or continue working in the existing project. |
| Manifest validation failed | Check the app ID, semantic version, HTML entry file, and supported permissions in securebin.app.json. |
| Entry file not found | Ensure the manifest's entry exists inside the configured source directory. |
| Upload rejected | Submit the .sbapp-review.json generated by securebin submit. Do not upload a legacy private .sbapp as a marketplace review file. |
| Port already in use | Run dev --port 0 or choose another available port. |
| A feature works differently in local preview | Some capabilities depend on the SecureBin host. Detect unavailable runtime features and provide a clear development fallback. |
