A collection of small, ready-to-deploy application templates for the ObjectStack cloud application marketplace.
This repository contains lightweight application templates built on @objectstack/spec v3.0.8. Each template is a self-contained, deployable application designed to be published to the ObjectStack cloud marketplace.
Unlike HotCRM β a large, complex enterprise CRM system β the templates in this repository are intentionally minimal and focused, serving as building blocks and starting points for common business use cases.
| Template | Description | Objects |
|---|---|---|
| todo | Task management app with lists, items, and priorities | 2 |
| blog | Blog and content management with posts and categories | 3 |
| inventory | Inventory tracking with products, stock levels, and suppliers | 3 |
# Prerequisites: Node.js >= 20.9.0, pnpm >= 9.0.0
git clone https://github.com/objectstack-ai/templates.git
cd templates
pnpm install
# Run a specific template in development mode
pnpm --filter @templates/todo dev
# Build all templates
pnpm build
# Run tests
pnpm test
# Typecheck
pnpm typechecktemplates/
βββ .github/
β βββ workflows/
β βββ publish-marketplace.yml # CI/CD for marketplace publishing
βββ templates/ # Application templates (each is a standalone app)
β βββ todo/ # Task management template
β β βββ src/ # Source files (objects, hooks, plugin)
β β βββ package.json
β β βββ tsconfig.json
β β βββ objectstack.config.ts
β β βββ README.md
β β βββ CHANGELOG.md
β βββ blog/ # Blog / CMS template
β βββ inventory/ # Inventory management template
βββ package.json # Monorepo root
βββ pnpm-workspace.yaml # Workspace config
βββ tsconfig.json # Root TypeScript config
βββ base.tsconfig.json # Shared TypeScript base
βββ vitest.config.ts # Test config
βββ ROADMAP.md # Development roadmap
Each template follows the same structure as an ObjectStack plugin:
templates/my-app/
βββ package.json # Package manifest
βββ tsconfig.json # TypeScript config (extends base.tsconfig.json)
βββ objectstack.config.ts # Standalone run config
βββ src/
βββ plugin.ts # Plugin definition (objects, hooks, actions, apps)
βββ *.object.ts # Business object definitions
βββ hooks/ # Event hooks (optional)
βββ *.hook.ts
- Create the directory:
mkdir templates/my-app - Add
package.jsonwith name@templates/my-app - Add
tsconfig.jsonextending../../base.tsconfig.json - Define objects in
src/*.object.tsusingObjectSchema.create() - Wire everything in
src/plugin.ts - Add
objectstack.config.tsfor standalone execution - Update
tsconfig.jsonandvitest.config.tsat the root to include the new template
Templates are published to the ObjectStack cloud marketplace via the publish-marketplace.yml GitHub Actions workflow. Publishing can be triggered automatically by pushing a version tag or manually via the GitHub UI.
Before publishing, configure the following in your repository settings (Settings β Secrets and variables β Actions):
| Type | Name | Description |
|---|---|---|
| Secret | MARKETPLACE_API_KEY |
API key for the ObjectStack cloud marketplace |
| Variable | MARKETPLACE_API_URL |
(Optional) API base URL. Defaults to https://cloud.objectstack.io/api/marketplace |
Push a version tag to trigger an automatic publish of all templates:
# 1. Ensure all checks pass locally
pnpm typecheck
pnpm test
# 2. Update version in each template's package.json and CHANGELOG.md
# e.g. templates/todo/package.json β "version": "1.1.0"
# Add a new section in CHANGELOG.md documenting Added/Changed/Fixed/Removed items
# 3. Commit the version bump
git add .
git commit -m "chore: bump templates to v1.1.0"
# 4. Create and push a version tag
git tag v1.1.0
git push origin main --tagsThe workflow will automatically: typecheck β test β build each template β package as .tar.gz β publish to the marketplace.
Go to Actions β Publish Templates to Marketplace β Run workflow and configure:
| Input | Description | Example |
|---|---|---|
dry_run |
When true, validates build & packaging without calling the marketplace API |
true |
templates |
Comma-separated template names. Leave empty to publish all | todo,blog |
Use dry-run to validate that templates build and package correctly without actually publishing:
# Via GitHub UI: set dry_run = true
# Or via GitHub CLI:
gh workflow run publish-marketplace.yml -f dry_run=true
Dry-run output shows each template's artifact filename, version, and SHA-256 checksum.
Publish only specific templates by providing their names:
# Via GitHub CLI:
gh workflow run publish-marketplace.yml -f templates="todo,inventory"
The workflow runs three jobs in sequence:
resolve-matrix βββ validate βββ publish (per template, concurrent)
- resolve-matrix β Discovers which templates to publish (all or from input)
- validate β Runs
pnpm typecheckandpnpm testacross the monorepo - publish β For each template in parallel:
pnpm --filter @templates/<name> buildβ Compile TypeScript and ObjectStack artifacts- Package
dist/,package.json,README.md,CHANGELOG.mdinto<name>-<version>.tar.gzNote:
README.mdandCHANGELOG.mdare required in each template directory. The packaging step will fail if they are missing. - Generate SHA-256 checksum
- Call cloud API:
POST /publishβ Initiate publish, receivepublishIdanduploadUrlPUT <uploadUrl>β Upload the.tar.gzartifactPOST /publish/<publishId>/confirmβ Finalize the release
- Rollback: If upload or confirm fails, the workflow automatically calls
DELETE /publish/<publishId>to clean up
Each template's package.json includes an objectstack section required by the marketplace:
{
"objectstack": {
"category": "app",
"minVersion": "3.0.0",
"permissions": ["data:read", "data:write"]
}
}| Field | Description |
|---|---|
category |
Template type ("app") |
minVersion |
Minimum ObjectStack runtime version required |
permissions |
Data access permissions the template needs |
| Issue | Solution |
|---|---|
| Workflow not triggered on tag push | Ensure the tag matches pattern v* (e.g. v1.0.0, v2.1.0-beta) |
MARKETPLACE_API_KEY error |
Verify the secret is set in Settings β Secrets β Actions |
| Build failure for a single template | Check the matrix job log for that template; other templates will continue (fail-fast: false) |
| Publish initiated but confirm failed | The workflow auto-rolls back. Check API logs and retry |
| Dry-run passes but real publish fails | Ensure MARKETPLACE_API_KEY and MARKETPLACE_API_URL are configured |
- Runtime: @objectstack/spec v3.0.8
- Language: TypeScript >= 5.3.0
- Package Manager: pnpm >= 9.0.0
- Node.js: >= 20.9.0
- Testing: Vitest
See CONTRIBUTING.md for contribution guidelines.
MIT