diff --git a/docs/how-to/incremental-migrations.md b/docs/how-to/incremental-migrations.md index 3f9106b1..4a91d3de 100644 --- a/docs/how-to/incremental-migrations.md +++ b/docs/how-to/incremental-migrations.md @@ -120,7 +120,7 @@ $ spacetime sql incr-migration-demo 'SELECT * FROM character' | "Gefjon" | 2 | (Fighter = ()) ``` -See [the SATS JSON reference](/docs/sats-json) for more on the encoding of arguments to `spacetime call`. +See [the SATS JSON reference](/docs/internals/sats-json) for more on the encoding of arguments to `spacetime call`. Now we want to add a new feature: each player should be able to align themselves with the forces of good or evil, so we can get some healthy competition going between our players. We'll start each character off with `Alliance::Neutral`, and then offer them a reducer `choose_alliance` to set it to either `Alliance::Good` or `Alliance::Evil`. Our first attempt will be to add a new column to the type `Character`: diff --git a/docs/http/database.md b/docs/http/database.md index 0ac41070..b8f74ecb 100644 --- a/docs/http/database.md +++ b/docs/http/database.md @@ -224,10 +224,10 @@ For more information about WebSocket headers, see [RFC 6455](https://datatracker | `Sec-WebSocket-Version` | `13` | | `Sec-WebSocket-Key` | A 16-byte value, generated randomly by the client, encoded as Base64. | -The SpacetimeDB binary WebSocket protocol, `v1.bsatn.spacetimedb`, encodes messages as well as reducer and row data using [BSATN](/docs/bsatn). +The SpacetimeDB binary WebSocket protocol, `v1.bsatn.spacetimedb`, encodes messages as well as reducer and row data using [BSATN](/docs/internals/bsatn). Its messages are defined [here](https://github.com/clockworklabs/SpacetimeDB/blob/master/crates/client-api-messages/src/websocket.rs). -The SpacetimeDB text WebSocket protocol, `v1.json.spacetimedb`, encodes messages according to the [SATS-JSON format](/docs/sats-json). +The SpacetimeDB text WebSocket protocol, `v1.json.spacetimedb`, encodes messages according to the [SATS-JSON format](/docs/internals/sats-json). #### Optional Headers @@ -442,6 +442,6 @@ Returns a JSON array of statement results, each of which takes the form: } ``` -The `schema` will be a [JSON-encoded `ProductType`](/docs/sats-json) describing the type of the returned rows. +The `schema` will be a [JSON-encoded `ProductType`](/docs/internals/sats-json) describing the type of the returned rows. -The `rows` will be an array of [JSON-encoded `ProductValue`s](/docs/sats-json), each of which conforms to the `schema`. +The `rows` will be an array of [JSON-encoded `ProductValue`s](/docs/internals/sats-json), each of which conforms to the `schema`. diff --git a/docs/index.md b/docs/index.md index 6e4a0b65..16e2455c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -75,7 +75,7 @@ A database exports [tables](#table), which store data, and [reducers](#reducer), A database's schema and business logic is specified by a piece of software called a **module**. Modules can be written in C# or Rust. -(Technically, a SpacetimeDB module is a [WebAssembly module](https://developer.mozilla.org/en-US/docs/WebAssembly) that imports a specific low-level [WebAssembly ABI](/docs/webassembly-abi) and exports a small number of special functions. However, the SpacetimeDB [server-side libraries](#module-libraries) hide these low-level details. As a developer, writing a module is mostly like writing any other C# or Rust application, except for the fact that a [special CLI tool](/install) is used to deploy the application.) +(Technically, a SpacetimeDB module is a [WebAssembly module](https://developer.mozilla.org/en-US/docs/WebAssembly) that imports a specific low-level [WebAssembly ABI](/docs/internals/webassembly-abi) and exports a small number of special functions. However, the SpacetimeDB [server-side libraries](#module-libraries) hide these low-level details. As a developer, writing a module is mostly like writing any other C# or Rust application, except for the fact that a [special CLI tool](/install) is used to deploy the application.) ### Table A SpacetimeDB **table** is a SQL database table. Tables are declared in a module's native language. For instance, in C#, a table is declared like so: diff --git a/docs/bsatn.md b/docs/internals/bsatn.md similarity index 98% rename from docs/bsatn.md rename to docs/internals/bsatn.md index 2e464b51..46c5f470 100644 --- a/docs/bsatn.md +++ b/docs/internals/bsatn.md @@ -128,6 +128,6 @@ Where All SATS types are BSATN-encoded by converting them to an `AlgebraicValue`, then BSATN-encoding that meta-value. -See [the SATN JSON Format](/docs/sats-json) +See [the SATN JSON Format](/docs/internals/sats-json) for more details of the conversion to meta values. Note that these meta values are converted to BSATN and _not JSON_. diff --git a/docs/sats-json.md b/docs/internals/sats-json.md similarity index 100% rename from docs/sats-json.md rename to docs/internals/sats-json.md diff --git a/docs/webassembly-abi/index.md b/docs/internals/webassembly-abi.md similarity index 100% rename from docs/webassembly-abi/index.md rename to docs/internals/webassembly-abi.md diff --git a/docs/modules/c-sharp/index.md b/docs/modules/c-sharp/index.md index fc2acc95..5f72c244 100644 --- a/docs/modules/c-sharp/index.md +++ b/docs/modules/c-sharp/index.md @@ -201,7 +201,7 @@ You can also generate code for clients of your module using the `spacetime gener # How it works -Under the hood, SpacetimeDB modules are WebAssembly modules that import a [specific WebAssembly ABI](https://spacetimedb.com/docs/webassembly-abi) and export a small number of special functions. This is automatically configured when you add the `SpacetimeDB.Runtime` package as a dependency of your application. +Under the hood, SpacetimeDB modules are WebAssembly modules that import a [specific WebAssembly ABI](https://spacetimedb.com/docs/internals/webassembly-abi) and export a small number of special functions. This is automatically configured when you add the `SpacetimeDB.Runtime` package as a dependency of your application. The SpacetimeDB host is an application that hosts SpacetimeDB databases. [Its source code is available](https://github.com/clockworklabs/SpacetimeDB) under [the Business Source License with an Additional Use Grant](https://github.com/clockworklabs/SpacetimeDB/blob/master/LICENSE.txt). You can run your own host, or you can upload your module to the public SpacetimeDB network. The network will create a database for you and install your module in it to serve client requests. diff --git a/docs/nav.js b/docs/nav.js index e7d0b944..33d47c88 100644 --- a/docs/nav.js +++ b/docs/nav.js @@ -46,9 +46,9 @@ const nav = { page('`/identity`', 'http/identity', 'http/identity.md'), page('`/database`', 'http/database', 'http/database.md'), section('Internals'), - page('Module ABI Reference', 'webassembly-abi', 'webassembly-abi/index.md'), - page('SATS-JSON Data Format', 'sats-json', 'sats-json.md'), - page('BSATN Data Format', 'bsatn', 'bsatn.md'), + page('Module ABI Reference', 'webassembly-abi', 'internals/webassembly-abi.md'), + page('SATS-JSON Data Format', 'sats-json', 'internals/sats-json.md'), + page('BSATN Data Format', 'bsatn', 'internals/bsatn.md'), section('Appendix'), page('Appendix', 'appendix', 'appendix.md'), ], diff --git a/nav.ts b/nav.ts index fb968928..dff870df 100644 --- a/nav.ts +++ b/nav.ts @@ -99,9 +99,9 @@ const nav: Nav = { page('`/database`', 'http/database', 'http/database.md'), section('Internals'), - page('Module ABI Reference', 'webassembly-abi', 'webassembly-abi/index.md'), - page('SATS-JSON Data Format', 'sats-json', 'sats-json.md'), - page('BSATN Data Format', 'bsatn', 'bsatn.md'), + page('Module ABI Reference', 'webassembly-abi', 'internals/webassembly-abi.md'), + page('SATS-JSON Data Format', 'sats-json', 'internals/sats-json.md'), + page('BSATN Data Format', 'bsatn', 'internals/bsatn.md'), section('Appendix'), page('Appendix', 'appendix', 'appendix.md'),