@syncropel/workspace-templates
v0.2.0
Published
Seven worked examples of `core.workspace.v1` manifests — tracker, multi-page, newsletter, course, recipe-collection, solo-tracker, and the multi-user code-review-pair. Each template ships with a workspace.json manifest, a README, and a fixtures/expected p
Maintainers
Readme
@syncropel/workspace-templates
Six worked examples of core.workspace.v1 manifests — each ready
to scaffold via spl workspace init <name> --template <id> and tested
against bundled fixtures with spl workspace test.
These are the same templates embedded in the spl binary at build
time. This package mirrors them so the gallery is browsable on the web
and downloadable without a Rust toolchain.
Templates
| id | Description | Components |
|---|---|---|
| tracker | Single-fold tracker (default) | One view |
| multi-page | Linked pages workspace | Three pages: home, about, contact |
| newsletter | Public-read broadcast workspace | One page + subscribe permission |
| course | Course workspace | Syllabus, assignments, discussion, gradebook |
| recipe-collection | Recipe collection | Index, featured, recently added |
| solo-tracker | Personal tracker (per-user policy) | One view |
Browse the rendered gallery at docs.syncropel.com/templates.
Use a template
The canonical entry point is the CLI:
spl workspace init my-recipes --template recipe-collection
cd my-recipes
spl workspace test
spl workspace publish --draftspl workspace init writes the template into a fresh directory,
substituting __NAME__, __SLUG__, __DID__, and __DISPLAY_KIND__
placeholders. The result passes spl workspace test immediately.
Use a template directly
If you don't have spl installed yet, every template is a plain set
of JSON + Markdown files you can copy from this package or from
GitHub.
npm install @syncropel/workspace-templates
# Templates land at node_modules/@syncropel/workspace-templates/templates/Or import the manifest list programmatically:
import {
TEMPLATE_IDS,
TEMPLATE_DESCRIPTIONS,
type TemplateId,
} from "@syncropel/workspace-templates";
for (const id of TEMPLATE_IDS) {
console.log(id, TEMPLATE_DESCRIPTIONS[id]);
}Each template
Every template directory contains:
<template-id>/
├── workspace.json # core.workspace.v1 manifest
├── README.md # what this template demonstrates
└── tests/
├── fixtures/basic.json # input records
└── expected/basic.fold.json # expected fold outputThe workspace.json includes placeholder strings that spl workspace
init substitutes at scaffold time:
| Placeholder | Substituted with |
|---|---|
| __NAME__ | The workspace name argument |
| __SLUG__ | A URL-safe slug derived from name |
| __DID__ | The current actor's DID |
| __DISPLAY_KIND__ | The chosen display kind (default: workspace) |
Templates are validated against
@syncropel/config@^0.7's
core.workspace.v1 schema before scaffold.
See also
- Tutorial: Build your first workspace in 10 minutes — the recipe-collection template walked end-to-end
- Schema:
core.workspace.v1 - Lifecycle: docs.syncropel.com/operate/workspace/lifecycle
- Testing: docs.syncropel.com/operate/workspace/testing
- Sharing: docs.syncropel.com/operate/workspace/sharing
License
Apache-2.0. See LICENSE.
