17 Commits

Author SHA1 Message Date
Jeffrey Dallatezza
7923d6f64b
Update default doc version to 2.0.0 (#4411)
# Description of Changes

Docs will now go to version 2.0.0 by default, and there is a banner with
a link to the newer docs if someone is viewing the v1 docs.

# Expected complexity level and risk

1. Biggest risk here is breaking links.

# Testing

I tested this locally, and checked that links are working.

There is also a broken link checker in the CI.
2026-02-23 23:09:42 +00:00
Jeffrey Dallatezza
bddfc19725
Add doc versioning (#4381)
# Description of Changes

This change cuts a version of the docs from 1.12.0
(e45cf891c20d87b11976e1d54c04c0e4639dbe81), and saves it under
`docs/versioned_docs/version-1.12.0`.

If you go to the docs page, it will redirect to the 1.12.0 docs, which
has a banner at the top for trying the prerelease docs:
<img width="1027" height="283" alt="Screenshot 2026-02-20 at 12 07
39 PM"
src="https://github.com/user-attachments/assets/8ff3d622-b693-469a-980a-01c34d0506b8"
/>

If you select the prelease docs, there is a warning banner at the top:
<img width="886" height="299" alt="Screenshot 2026-02-20 at 12 08 52 PM"
src="https://github.com/user-attachments/assets/5508a635-765e-40cc-ad2a-cbbed7f779dd"
/>


# Expected complexity level and risk

This only changes docs.

# Testing

I've testing by running this locally.
2026-02-20 22:41:39 +00:00
Piotr Sarnacki
19cc87ebfa
Allow skipping DB if the config file is available (#4358)
# Description of Changes

This PR introduces a possibility to skip passing a DB name to various
commands if there is a config file with one database defined

# API and ABI breaking changes

This changes the behaviour of several CLI commands:

  1. call
  2. subscribe
  3. sql
  4. describe
  5. logs
  6. delete

# Expected complexity level and risk

4 - it's tricky to get all of the combinations of CLI arguments right

# Testing

I've tested the simplest cases manually.

---------

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: = <cloutiertyler@gmail.com>
2026-02-20 17:48:54 +00:00
Tyler Cloutier
d78517fd9a
Misc docs and small CLI improvements (#3953)
# Description of Changes

This PR does several small things:

1. It removes the explicit `h1` tags on every page, and either uses the
side bar title directly, or puts it in the frontmatter
2. It merges what are currently called quickstarts into a single Chat
App Tutorial
3. It creates new quickstarts which just use `spacetime dev --template`
to get you up and running quickly
4. It adds a "The Zen of SpacetimeDB" page much like the Zen of Python
which goes over the 5 key principles of SpacetimeDB
5. It reorders all Tabs groups so that the ordering is `TypeScript`,
`C#`, `Rust`, `Unreal`, `C++`, `Blueprints` (order of decreasing
popularity).
6. It improves the sidebar navigation by having categories act as
overview pages, and also fixes the breadcrumbs
7. It fixes various small typos and issues
8. Closes #3610 and adds cursor rules files generally
9. It fixes general styling on the docs page by bring it inline with the
UI design:

Old:
<img width="1678" height="958" alt="image"
src="https://github.com/user-attachments/assets/f36efee6-b81a-4463-a179-da68b3a7152e"
/>

New:
<img width="1678" height="957" alt="image"
src="https://github.com/user-attachments/assets/f430f77d-0663-47f2-9727-45cbfe10e4c7"
/>


https://github.com/user-attachments/assets/adc5a78a-ada8-45b5-8078-a45cb81477a3

# API and ABI breaking changes

This PR does NOT change any old links. It does add new pages though.

# Expected complexity level and risk

3 - it's a large change. I manually tested the TypeScript Chat App
Tutorial but I have not gone through the Rust and C# quickstarts.
However, we have testing on the quickstarts and this is text only so can
be carefully reviewed.

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] Ran through each step of the Chat App TypeScript tutorial to
ensure it is working
- [x] Ran and tested the styles and the functionality of the side bar

---------

Signed-off-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: spacetimedb-bot <spacetimedb-bot@users.noreply.github.com>
Co-authored-by: clockworklabs-bot <clockworklabs-bot@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-01-13 00:14:48 +00:00
Jason Larabie
48b8a31fe0
Refactor /docs to close in on the final form (#3917)
# Description of Changes

Closes: #3895 
- Added third tier expanding folder
- Merged most into intro + core concepts 
- Collapsed modules + database into one
- Moved several documents to how-to to streamline the core concepts
- Added warning to RLS to use views
- refactored all links 
- Moved How To and References into Developer Resources
- Fixed TypeScript View code

Sample: (Getting Started will start expanded due to being the initial
page)
<img width="293" height="746" alt="image"
src="https://github.com/user-attachments/assets/6abc3a0d-1ae2-4886-bda7-11f5565afecf"
/>


# API and ABI breaking changes

N/A

# Expected complexity level and risk

1

# Testing

- [X] Updated the quickstarts.py and generate-cli tooling

---------

Signed-off-by: Jason Larabie <jason@clockworklabs.io>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2025-12-23 15:06:57 +00:00
Jason Larabie
e9d2b117cc
Refactor /docs into Concepts (#3877)
# Description of Changes

Refactoring all sections to match a concept based approach to the docs.

Closes: #3840 

Currently:
- Modules - Closes: #3841 
- Databases - Closes: #3842 
- Tables - Closes: #3843 
- Reducers - Closes: #3844 
- Procedures - Closes: #3845
- Views - Closes: #3846 

# API and ABI breaking changes

N/A

# Expected complexity level and risk

1

# Testing

- [x] Walking through all code references before pushing

---------

Signed-off-by: Jason Larabie <jason@clockworklabs.io>
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2025-12-17 23:13:56 +00:00
Zeke Foppa
f49945cc6a
Fix CLI reference generation (#3403)
# Description of Changes

Add back the instructions for regenerating CLI docs, which were removed
in https://github.com/clockworklabs/SpacetimeDB/pull/3343. I also made a
script for it.

This also fixes the CI checking this file, which was silently broken in
the same PR.

I have **not** verified that this works in Git Bash in Windows.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing
- [x] CI passes
- [x] CI fails if I change the CLI reference
- [x] CLI reference looks visually reasonable on a local `pnpm dev`

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-12-16 20:17:51 +00:00
Julien Lavocat
afb8c08b98
Docusaurus migration (#3343)
## Description of Changes

- Migrate the documentation site to **Docusaurus**.
- Add a **GitHub Action workflow** that runs `pnpm build` on pull
requests targeting `master`.
This command checks for broken links and images and ensures the site
builds correctly.
- Add a **GitHub Action workflow** to publish the docs automatically
when a merge occurs on the `docs/release` branch.

**Important**: The workflows haven't been tested yet due to the fact
that they need to be merged first before being able to run. It's a
fairly basic workflow I don't expect this to block anyone but anyways I
will make another PR with the complete changes when I can actually run
it.

---

## API and ABI Breaking Changes

No breaking changes for **SpacetimeDB** users.  
Documentation contributors should experience minimal disruption —
content is still written in Markdown.

---

## Expected Complexity Level and Risk

**Complexity:** 3/5

**Reasons:**
1. Several adjustments were made to fit Docusaurus conventions:
- Replaced our custom `:::server-rust` blocks with [Docusaurus `<Tabs/>`
components](https://docusaurus.io/docs/markdown-features/tabs).
- Converted “Note” callouts using
[admonitions](https://docusaurus.io/docs/markdown-features/admonitions)
instead of Markdown blockquotes.
- Updated all images (including Unity tutorial ones, which were
previously commented out).
- Moved images from the DO bucket into the repository at
`docs/static/images`.

2. Customized Docusaurus CSS and one component to apply our theme and
color palette.

---

## Testing

Tested locally.

---

## Review Notes

This PR involves many file changes — a full code review is likely not
productive.
Instead, please focus on verifying that the **documentation content**
was migrated correctly:

- Review sections you’re familiar with to confirm accuracy.
- Ensure formatting, links, and images render as expected.

You can follow the updated **README** for instructions on running
Docusaurus locally.

---------

Signed-off-by: Julien Lavocat <JulienLavocat@users.noreply.github.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: = <cloutiertyler@gmail.com>
2025-10-24 14:36:38 +00:00
Tyler Cloutier
c83f55f65e
Refactors TypeScript into a single spacetimedb package (#3248)
# Description of Changes

This PR moves most of the contents of `@clockworklabs/spacetimedb-sdk`
into the `spacetimedb` module. The `spacetimedb` module now exports
`sdk` and `server` as separate subpaths where `sdk` contains the code
which was previously in `@clockworklabs/spacetimedb-sdk`.

In particular it makes the following moves:

- `/sdks/typescript/packages/sdk` -> `/sdks/typescript`
- most of the contents of `/sdks/typescript/packages/sdk` ->
`crates/bindings-typescript`
- `/sdks/typescript/packages/test-app` ->
`crates/bindings-typescript/test-app`

The following packags was NOT moved:

`/sdks/typescript/examples/quickstart-chat`

## Motivation

In accordance with
https://github.com/clockworklabs/SpacetimeDB/issues/3250, we would like
to consolidate `@clockworklabs/spacetimedb-sdk` into a single
`spacetimedb` package so that users can import the different things they
need from a single package.

### Pros:
- allow users to install a single package with subpaths `spacetimedb`,
`spacetimedb/react`, `spacetimedb/sdk`, `spacetimedb/server`, etc.
- Is much simpler for bundling, etc.
- Is backwards compatible with `@clockworklabs/spacetimedb-sdk` which
now becomes a thin wrapper
- eventually allow us to break up the `spacetimedb` package into other
packages if we want to split them up (e.g. `@spacetimedb/lib`,
`@spacetimedb/sdk`, etc.) and we can solve the build complexity that
introduces when we get to it
- eventually allow us to move `bindings-csharp` out of the crates
directory where it probably doesn't belong anyway
- organizes all TypeScript packages into the packages directory where
you'd normally expect them, with the possible exception of
`/sdks/typescript` if we wanted to leave that separate

### Cons:
- The `sdk` directory is now a bit of a ruse as to where the code
actually lives since it's just a thin wrapper. If it eventually becomes
its own independent package, we'll also have to break up spacetimedb
into `@spacetimedb/lib` and `@spacetimedb/server` so that
`@clockworklabs/spacetimedb-sdk` can depend on `@spacetimedb/lib` while
being a dependency of `spacetimedb`.

Ideally this change would have been made later, however, it became
necessary for the following **heinously disastrous chain of forcing
moves**:

1. Adding `react` support necessitated shipping react as an optional
peer dependency under `@clockworklabs/spacetimedb-sdk/react`
2. This required adding a new build target/export/bundle
3. Previously `@clockworklabs/spacetimedb-sdk` was configured to have
`noExternal` for `spacetimedb` meaning it would collect the library into
the sdk bundle. I attempted to continue this for react support but...
4. Creating a new `react` bundle which also pulled in `spacetimedb`
caused their to be nominal type conflicts between classes in the
duplicate `spacetimedb` bundles.
5. Changing `spacetimedb` to be included as `external` caused compile
errors because `@clockworklabs/spacetimedb-sdk` is configured in
`tsconfig.json` to fail on unused variables and it was now including the
source of `spacetimedb` which is not configured to error on unused
variables and has "unused" private variables which are actually used by
us secretly, but not exposed to the clients.
> SIDE NOTE: The unused variables settings cannot be turned off on a
line by line basis, so it has to be turned off entirely, but in order to
maintain the linting checks we had I used `eslint` to enforce the rule
so that we could disable it line by line. (This caused me to discover
quite a lot of things that were broken that were caught by `eslint`
being applied to the entire project. `eslint` was previously only
applied to the `quickstart-chat` and the `crates/bindings-typescript`
library)
6. Changing the build to be external, now requires `spacetimedb` to also
be published to npm as its own module which
`@clockworklabs/spacetimedb-sdk` now imports, which requires that we add
`tsup` config to `spacetimedb` to publish a built version of the
library.
7. The only way to avoid that is to move the `sdk` and `react` code from
`@clockworklabs/spacetimedb-sdk` into the existing `spacetimedb` package
to avoid the duplicate import problem on step 4 and change
`@clockworklabs/spacetimedb-sdk` back to again use `noExternal` for its
`spacetimedb` dependency.

And here we are. I chose not to move `/crates/bindings-typescript` even
though that's probably not a great place long term. It would be better
to have it in `/packages/spacetimedb` or `/npm-packages/spacetimedb` or
`/ts-packages/spacetimedb` or something, and move all our TypeScript
packages in there. But that is a different matter.

The net result however is that we have a new `spacetimedb` package which
exports the different parts of the API under:

- `spacetimedb`
- `spacetimedb/server`
- `spacetimedb/sdk`
- `spacetimedb/react`

while still not breaking the existing deploy process, nor any
users/developers who are currently using
`@clockworklabs/spacetimedb-sdk`.

I think long term should we ever decide to split `spacetimedb` up into
multiple packages or if we have additional unrelated packages, we should
publish them to the `@spacetimedb` org which I reserved for us here:

https://www.npmjs.com/org/spacetimedb

> NOTE: `spacetimedb` is a package and `@spacetimedb` is an org.
`spacetimedb/sdk` is not a separate package, it's a subpath export of
the `spacetimedb` package, whereas `@spacetimedb/sdk` would be (and
would need to be) it's own separate package. You can certainly have both
`spacetimedb/sdk` and `@spacetimedb/sdk`. We could for example host the
code for the sdk at `@spacetimedb/sdk` and just reexport it from
`spacetimedb` under the `spacetimedb/sdk` subpath.

# API and ABI breaking changes

This should not change or modify the API or ABI in any way. If it does
so accidentally it is a bug, although I carefully went through the
exports.

# Expected complexity level and risk

3 because it changes how the SDK is built a bit and rearranges a lot of
paths.

# Testing

- [x] All of the CI passes
- [x] I also ran quickstart-chat to confirm that it is not broken
- [x] I also ran test-app
2025-09-19 19:33:45 +00:00
Zeke Foppa
adbfe3b0bd
Tidy up CLI reference generation flow (#3226)
# Description of Changes

Some minor cleanups in the flow for regenerating the CLI reference.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

- [x] Existing CI passes

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-04 20:08:24 +00:00
Tyler Cloutier
413c8cbf3c
Unifies TypeScript packages and command names (#3195)
# Description of Changes

This PR:
 - standardizes the prettier config across all TypeScript projects
 - adds a root level package.json
 - standardizes all `pnpm` commands to be the same
 - updates documentation accordingly
- adds some additional typescript testing for serialization and
deserialization
 
**IMPORTANT!** Once this PR merges we will need to change the
`compile-and-test` required check to `build-and-test`

# API and ABI breaking changes

No breaking changes.

# Expected complexity level and risk

2 - It in principle doesn't change any code, but could affect deploy
processes.

# Testing

- [x] Just the automated testing that we had previously
- [x] I added additional automated tests

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-04 02:23:29 +00:00
Zeke Foppa
6c9aebdbf3
Docs CI - Check that nav.js matches the .md files list (#2984)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-07-25 16:54:25 +00:00
Zeke Foppa
ec37594e79 Fix link checking (#340)
* [bfops/check-links]: fix link checker

* [bfops/check-links]: fix

* [bfops/check-links]: fix broken links

* [bfops/check-links]: fix logic

* [bfops/check-links]: fix site links

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-05-01 15:26:02 -07:00
Zeke Foppa
b8c8a0f738 Add instructions for deploying to maincloud (#167)
* [bfops/deploying]: add instructions for deploying mainnet

* [bfops/deploying]: nav.ts

* [bfops/deploying]: nav.ts

* [bfops/deploying]: fix link?

* Update docs/deploying/maincloud.md

Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>

* Update docs/deploying/maincloud.md

Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>

* [bfops/deploying]: review

* Update docs/deploying/maincloud.md

Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>

* Add `/profile` as a known link

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: joshua-spacetime <josh@clockworklabs.io>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-03-03 19:06:20 -05:00
Tyler Cloutier
96710dab99 Blackholio Tutorial Update (#128)
* First commit to test images

* Progress on the unity tutorial

* moar docs

* Part 3 incoming

* Part 3 and almost part 4!

* Finalized part 4 and deleted unused files

* Small fixes and clarifications

* Review typos and fixes

* Fixed link validation for images

* Removed the reference to an image which is going to be moving

* Fixed the tsconfig issue (it was not actually using the tsconfig)

* Shortened titles

* Just testing something

* Undo change

* Consistent headers

* Commenting out images for now

* Missed an image
2025-01-15 21:12:20 -05:00
Tyler Cloutier
639b9269fe Switches to a canonical GitHub slugger format so that our slugs always match links generated on GitHub (#123)
Standardized slugging across docs and web
2025-01-03 16:06:09 -05:00
Tyler Cloutier
48bab90a41 Added a script to check the validity of docs links and a .github action (#122)
* Added a script to check the validity of docs links and a .github action

* Removed erroneous thing

* Switched the action trigger

* Added workflow to ensure that the nav.ts has been built to nav.js

* typo

* Build nav.ts

* typo thing

* Fixed script issue

* Fix

* Fixed a few links

* Added relative link resolution and fixed the broken links

* now checking fragments

* Now checking fragments properly and publishing some stats

* Forgot exit code

* Fix broken links

Well, in at least some cases, just remove broken links.

- The BSATN ref contained links to type defns, but didn't have type defns.
  Replace the links with plain text.
- HTTP database links for recovery-code related routes were getting mangled
  in some way I couldn't figure out, so the links weren't working
  despite their targets clearly existing.
  Conveniently, those routes have been removed,
  so remove the links and the corresponding sections.
- The JSON doc (erroneously called "SATN") contained typos,
  spelling "producttype" as "productype".
- C# SDK ref had links to a section on the `Address` type, but no such section.
  Replace the links with plain text.
- Rust SDK ref had a link getting mangled in a way I couldn't figure out.
  Simplify the section title so that the anchor name is predictable.
- TypeSciprt SDK ref used camelCase names in anchor links,
  but we downcase all section titles to create anchor names.

Also slap a section in README.md which says how to run the checker locally.

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-01-03 00:44:00 -05:00