Commit Graph

288 Commits

Author SHA1 Message Date
Noa 973b62308f Describe how a JWT's sub/iss are translated into an Identity (#204) 2025-03-03 20:06:25 -05:00
joshua-spacetime 68a8daa6e3 C# sdk reference (#191)
Closes #192.
2025-03-03 16:36:56 -08:00
james gilles 52b80ef0b5 C# Module Library docs (#193)
* Most of the way to C# Module SDK docs

* Copy in more docs

* Mostly done

* Remove dead docs

* Apply suggestions from code review

Thanks Mazdak, also going to apply some of these to the Rust modules.

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: joshua-spacetime <josh@clockworklabs.io>

* Address review comments

---------

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: joshua-spacetime <josh@clockworklabs.io>
2025-03-03 19:22:40 -05: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
John Detter 8d6899768e Multiplayer bug fix in tutorial (#169)
* Multiplayer bug fix in tutorial

* Update part-4.md

Small fix

* removed reference to test input

This test input is not used during the tutorial and causes unused variable warnings

* Update part-4.md
2025-03-03 18:48:59 -05:00
Tyler Cloutier ebce4c2d3d Fixes the typescript quickstart for the new subscription API (#161)
* Updated quickstart url

* DBConnection -> DbConnection for TypeScript SDK

* Updated for the subscription update
2025-03-03 18:43:54 -05:00
Phoebe Goldman 12a1fdf0a7 Small doc fixes potpourri (#198)
* Remove hedging about table access from module quickstarts

We'll announce RLS when we announce it. For now, what we have is what we have.

* Remove hedging about supported module languages

This kind of thing belongs in a roadmap, not anywhere else in our docs.

* Fix :fingers_crossed: formatting of link to scheduled reducers

* Fix link

* List module langs in alphabetical order

Which also happens to be decreasing order of support and battle-tested-ness

* Re-order various and pages in sidebar

- Internals get their own section, and move down.
- Appendix gets its own section, instead of joining "Subscriptions."
- SQL and Subscriptions move up.

* Remove outdated guidance about tokens

We don't have "SpacetimeDB tokens" anymore, we just have regular OIDC JWTs.
We don't need to offer any special guidance about JWT hygiene.
2025-03-03 18:27:50 -05:00
rekhoff bc6ecabbb0 Updated with corrected table names to lower case, for compatibility w… (#195)
Updated with corrected table names to lower case, for compatibility with other quickstart-chat languages.
Updated with additional changes in https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/pull/258
2025-03-03 13:45:08 -08:00
rekhoff 84acba23a4 Updates to blackhol.io tutorials (#194)
Updates to blackholio tutorials

Page 3 - Fix duplicate code in Rust "disconnect reducer" instructions.
Page 4 - Update use of `CallerIdentity` to `Sender` in C# instructions.
2025-03-03 12:46:50 -08:00
Phoebe Goldman 11b45c1d22 How-to: Incremental Migrations (#127)
* How-to: Incremental Migrations

This commit adds a how-to guide for defining "incremental migrations,"
a strategy for updating the schema of a database while maintaining compatibility
with outdated clients and without requiring a manual migration.

The code is not on GitHub yet,
as I'd like review on my choice of example before pushing the repository.
As such, the links to the code at the bottom of the new document are broken.

* Updates following review
2025-03-03 15:27:33 -05:00
Phoebe Goldman fdfe68ae14 Update Rust SDK ref, and also a few small fixes (#172)
* *Must* accept `ReducerContext`, not *may*

* Small fixes to Rust docs for database Identity and rename Address

* Update Rust SDK reference for various 1.0 API changes

* Fix broken links

* TOC and TODOs

* Rename `Address` to `ConnectionId` in index, fix some links

* Minor fixes I found while working through converting this to typescript

* Link to SQL ref

* Additional fixups found while rewriting TS ref

* Remove references to BitCraftMini

We no longer use this as an example.

Also, I'm pretty sure we stopped using that name ages ago.

* No UB from mixing `subscribe` and `subscribe_to_all_tables`

Co-authored-by: joshua-spacetime <josh@clockworklabs.io>

* Update TypeScript SDK reference (#181)

* Begin updating TypeScript SDK ref to match the new rust one

* Link to SQL ref from `subscribe` method

* Fill in the rest of the TypeScript SDK ref

* Fix copy-paste error: `subscribeToAllTables` should be camelCase

Co-authored-by: joshua-spacetime <josh@clockworklabs.io>

* Copy change from Rust SDK docs: no UB in `subscribeToAllTables`

Co-authored-by: joshua-spacetime <josh@clockworklabs.io>

* Fix casing of `withModuleName`

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

* Address Tyler's review

---------

Co-authored-by: joshua-spacetime <josh@clockworklabs.io>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>

---------

Co-authored-by: joshua-spacetime <josh@clockworklabs.io>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2025-03-03 12:58:32 -05:00
Noa f38e72e57f Update docs for http api (#188)
* Update docs for http api

* Apply suggestions from code review

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Remove energy page

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-02-28 13:32:33 -06:00
Noa 7c878795d3 Add docs for standalone config.toml (#190)
* Add docs for standalone config.toml

* Update docs/cli-reference/standalone-config.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* pre formatting

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-02-28 13:32:12 -06:00
Phoebe Goldman 05f6de944d Update Rust client SDK quickstart for 1.0 API (#162)
* Begin revising rust client quickstart: update the code

* Revise Rust client SDK quickstart

A whole bunch of stuff has changed since this document was last updated.
Notably, I've chosen to re-order a bunch of sections,
since the previous structure of the document doesn't make much sense
after the 0.12 API rework.

* Fix credentials import issue

There are still warnings here but it builds now

* Fix warnings after pasting all this code into a fresh project

---------

Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2025-02-28 14:25:55 -05:00
Mario Montoya 04fd294627 Add missing LICENSE (#2319) 2025-02-28 14:32:59 +00:00
Mario Montoya 5943e6fc4f Document behaviour of SEQUENCES (#174)
* Document behaviour of SEQUENCES

* Update docs/appendix.md

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

* Apply suggestions from code review

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

---------

Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-02-27 16:59:49 -05:00
Mazdak Farrokhzad 9e8463a59f Document reducer semantics wrt. transactionality (#185)
document reducer semantics wrt. transactionality
2025-02-27 16:32:04 +01:00
james gilles 8d04c3ef7b Move Rust Module SDK reference to docs.rs (#114)
Move rust reference to rustdoc
2025-02-26 14:49:31 -05:00
rekhoff d41bc73587 Update to C# Quickstart-Chat Server Module and Client SDK tutorial documents (#170)
* Initial code pass on updating server to 1.0.0

* Updated to work with current 1.0.0-rc4, master branches of SpacetimeDB and the CSharpSDK

* Minor edit for clarity

* No longer optional, ReducerContext is always the first argument

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Improved description of OnInsert and OnDelete callbacks

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Fixed capitalization.

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Fixed capitalization.

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* SDK language corrected and clarified.

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Added that the example is for the C# client and does not include server examples.

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Added comma for clarity

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Added comma for clarity

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Applied requested changes to improve clarity

* Revised the SDK Client Quickstart to be more-in-line with the Rust Client Quickstart flow

* Added comments to code

* Replaced <module-name> with quickstart-chat

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-02-26 11:32:17 -08:00
joshua-spacetime 7ed444cf98 Remove 0.12 migration guide 2025-02-26 09:23:33 -08:00
joshua-spacetime 53d99af23d Remove references to testnet
Closes #183.
2025-02-25 12:18:15 -08:00
joshua-spacetime df263b1431 Remove reference to set energy-balance in http api
Closes #119.
2025-02-25 12:18:15 -08:00
joshua-spacetime 7b0ad990f6 Remove references to SpacetimeDB 0.6
Closes #118.
2025-02-25 12:18:15 -08:00
joshua-spacetime 9a86ea12dc API for mutable subscriptions (#166)
Closes #78.

Includes rust and csharp examples.
2025-02-25 09:57:09 -08:00
joshua-spacetime 9efb7f0558 Add best practices for Spacetime SQL (#180)
Closes #179.
2025-02-25 08:59:34 -08:00
joshua-spacetime 43a1632bd7 Document LIMIT and COUNT (#178)
Closes #177.
2025-02-24 14:08:26 -08:00
Mario Montoya ec14d20f2c Fix auto_inc attribute name (#175) 2025-02-21 13:06:57 -05:00
Noa 3bccc079cd Rename satn.md -> sats-json.md (#158) 2025-02-20 23:45:22 -06:00
Mario Montoya fa321015da Add link to the cli (#171) 2025-02-20 11:17:48 -05:00
Zeke Foppa 860edb405b CLI docs (#168)
* [bfops/cli-docs]: CLI docs

* [bfops/cli-docs]: fix?

* [bfops/cli-docs]: manual backticks

* [bfops/cli-docs]: manual bold

* [bfops/cli-docs]: manual bold

* [bfops/cli-docs]: add README for maintaining CLI reference docs

* [bfops/cli-docs]: maybe fix code?

* [bfops/cli-docs]: tweak <code>

* [bfops/cli-docs]: tweak code

* [bfops/cli-docs]: update

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-18 17:02:37 -08:00
joshua-spacetime 094f6c95c2 Remove WebSocket api docs and all references to them (#165)
Closes #164.

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-02-12 08:28:10 -08:00
Phoebe Goldman 6c11c8609e Style guide: add formatting advice for GUI elements and menu paths (#129)
* Style guide: add formatting advice for menu items

* Generalize guidance to all GUI elements, not just menu paths
2025-02-08 00:39:35 -05:00
Tyler Cloutier f26e9cc912 Small TS SDK Quickstart Fixes (#157)
Updated quickstart url
2025-02-08 00:38:59 -05:00
joshua-spacetime 8355ac2630 docs(70): The 1.0 SQL spec
Closes #70.
2025-02-03 15:20:08 -08:00
Phoebe Goldman 3c15d8a06c Update Rust client SDK docs for SpacetimeDB#2118 (#130) 2025-01-28 13:18:13 -05:00
Tyler Cloutier 2ab7e5e8ed Updated the TypeScript quickstart guide to use the new 1.0 API (#141)
* Updated the quickstart guide to use the new 1.0 API

* Completed quickstart rewrite

* Update docs/sdks/typescript/quickstart.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Update docs/sdks/typescript/quickstart.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Update docs/sdks/typescript/quickstart.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Update docs/sdks/typescript/quickstart.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Update docs/sdks/typescript/quickstart.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Clarification

* Update docs/sdks/typescript/quickstart.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Update docs/sdks/typescript/quickstart.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Wrong type of quotes

* Update docs/sdks/typescript/quickstart.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Update docs/sdks/typescript/quickstart.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Apply suggestions from code review

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>

* Address review comments

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
2025-01-27 19:41:07 -05:00
rekhoff 011187d730 Changed subscript to SubscribeToAllTables (#155)
Missed updating the HandleConnect from `Subscribe("SELECT * FROM *"` to `SubscribeToAllTables()` in the updated code block on page 3.
2025-01-27 15:45:45 -08:00
rekhoff 80e886a85d Rekhoff/unity blackhol.io tutorial switcher (#140)
* Unified Rust and C# documentation for Blackhol.io

Creates a single markdown file for each page, containing both Rust and C# server implementations, using the following format:
:::rust
# A rust section
:::
:::csharp
# A csharp section
:::
The visibility of each section should then be controlled by a dropdown on the website itself, leveraging tooling not contained in this branch.

* Updated language code blocks to clarify the block refers to the server's language

Prepped the combined documents to specifically tag for the server side code such that:
:::server-rust
A rust server implementation section.
:::
:::server-csharp
A csharp server implementation section.
:::
And in a future additionally update the documentation to differentiate the client portion too, like:
:::client-unity
A Unity client implementation section.
:::

* Update part-4.md

Added additional clarification that the linked repo contained content beyond the scope of the tutorial.

* Updated subscriptions to match new API format

* Small fixes to unity tutorial index page

* Added a note about column names to the C# tutorial

* Merged a section which was now abutting another section

* Clarified where you are supposed to put C# reducers

* Small, mostly whitespace fixes

---------

Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
2025-01-24 14:59:10 -08:00
Tyler Cloutier 0db1dc0a6f Update quickstart.md 2025-01-18 01:15:13 -05:00
Tyler Cloutier 9a33bfc8a9 Addresses feedback that John provided (#137)
* Addresses feedback that John provided

* Fixed broken link
2025-01-17 21:08:09 -05:00
james gilles 20a8ce2a74 Add remark to style guide inspired by SpacetimeDB#2050 (#133) 2025-01-16 10:48:41 -05:00
Tyler Cloutier c2e4314bcc Made fixes to the tutorial for changes that were introduced to the C# in RC3 (#135) 2025-01-15 22:59:34 -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
james gilles bade25de08 Add vocabulary to style guide, update index.md accordingly (#126)
* Add vocabulary to style guide, update index.md accordingly

* s/runs/hosts/

* Update STYLE.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Rewrite 'Reducer'

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-01-08 14:09:11 -05:00
Tyler Cloutier a19cc48a18 Fix missing tick marks in Rust quickstart (#124)
Fixed missing tick marks in rust quickstart
2025-01-07 16:57:58 -05:00
Ingvar Stepanyan f2c0869db3 Describe how to define multiple tables with the same type (#113)
* Describe how to define multiple tables with the same type

Fixes #90.

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-01-06 21:12:47 +00: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
james gilles e09444959e Rewrite index.md (#111)
* Start rewriting index.md

* Docs rewrite

* Typo, SQL, more sales talk

* Address comments

* Finish addressing comments

* Update docs/index.md

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>

* Address comments

* Clarify Identity section

* Fix links, clarify deployment section

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-01-03 14:30:18 -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
Tyler Cloutier 85c137ca90 Added .DS_store to the .gitignore 2024-12-31 17:05:13 -05:00