diff --git a/docs/docs/00100-intro/00100-getting-started/00500-faq.md b/docs/docs/00100-intro/00100-getting-started/00500-faq.md index 9bc23e30bab..abbbc177437 100644 --- a/docs/docs/00100-intro/00100-getting-started/00500-faq.md +++ b/docs/docs/00100-intro/00100-getting-started/00500-faq.md @@ -170,7 +170,7 @@ Yes. SpacetimeDB has a C# client SDK that works with Unity. The SDK maintains a ### Can I use SpacetimeDB with Unreal Engine? -Yes. SpacetimeDB has a C++ client SDK for Unreal Engine with Blueprint support. See the [Unreal quickstart](../00200-quickstarts/00700-cpp.md) for details. +Yes. SpacetimeDB has a C++ client SDK for Unreal Engine with Blueprint support. See the [Unreal tutorial](../00300-tutorials/00400-unreal-tutorial/index.md) and [Unreal SDK reference](../../00200-core-concepts/00600-clients/00800-unreal-reference.md) for details. ### Can I use SpacetimeDB with React / Vue / Angular / Svelte? diff --git a/docs/docs/00200-core-concepts/00100-databases/00300-spacetime-publish.md b/docs/docs/00200-core-concepts/00100-databases/00300-spacetime-publish.md index 82d079fa75e..5e2f40b025c 100644 --- a/docs/docs/00200-core-concepts/00100-databases/00300-spacetime-publish.md +++ b/docs/docs/00200-core-concepts/00100-databases/00300-spacetime-publish.md @@ -95,7 +95,7 @@ If this publish is a major upgrade from 1.x to 2.0, read [1.x to 2.0 Upgrade Not To completely reset your database and delete all data: ```bash -spacetime publish --delete-data +spacetime publish --delete-data=always ``` ⚠️ **Warning:** This permanently deletes all data in your database! diff --git a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md index 6c959fbc929..1633320b2ce 100644 --- a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md +++ b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md @@ -80,7 +80,7 @@ const score = table( { name: 'score', indexes: [{ - name: 'idx', + accessor: 'idx', algorithm: 'btree', columns: ['player_id', 'level'], }], @@ -913,7 +913,7 @@ spacetime login # Authenticate # Module management spacetime build # Build module spacetime publish # Publish module -spacetime publish --delete-data # Reset database +spacetime publish --delete-data=always # Reset database spacetime delete # Delete database # Database operations @@ -926,7 +926,7 @@ spacetime call reducer arg1 arg2 # Call reducer # Code generation spacetime generate --lang rust # Generate Rust client spacetime generate --lang csharp # Generate C# client -spacetime generate --lang ts # Generate TypeScript client +spacetime generate --lang typescript # Generate TypeScript client ``` ## Common Types diff --git a/docs/docs/00200-core-concepts/00300-tables.md b/docs/docs/00200-core-concepts/00300-tables.md index dd8ec6c6b0e..a0b0bb43d95 100644 --- a/docs/docs/00200-core-concepts/00300-tables.md +++ b/docs/docs/00200-core-concepts/00300-tables.md @@ -409,8 +409,8 @@ const playerColumns = { }; // Create two tables with the same schema -const Player = table({ name: 'Player', public: true }, playerColumns); -const LoggedOutPlayer = table({ name: 'LoggedOutPlayer' }, playerColumns); +const player = table({ name: 'player', public: true }, playerColumns); +const loggedOutPlayer = table({ name: 'logged_out_player' }, playerColumns); ``` diff --git a/docs/docs/00200-core-concepts/00600-clients/00200-codegen.md b/docs/docs/00200-core-concepts/00600-clients/00200-codegen.md index 3575377a20a..4da763eba32 100644 --- a/docs/docs/00200-core-concepts/00600-clients/00200-codegen.md +++ b/docs/docs/00200-core-concepts/00600-clients/00200-codegen.md @@ -104,14 +104,14 @@ For example, a `user` table becomes: ```typescript // Generated type -export default __t.object("User", { +export default __t.row({ id: __t.u64(), name: __t.string(), email: __t.string(), }); // Access via DbConnection -conn.db.User +conn.db.user ``` diff --git a/docs/docs/00200-core-concepts/00600-clients/00700-typescript-reference.md b/docs/docs/00200-core-concepts/00600-clients/00700-typescript-reference.md index f3f84524d97..d1252bed5e5 100644 --- a/docs/docs/00200-core-concepts/00600-clients/00700-typescript-reference.md +++ b/docs/docs/00200-core-concepts/00600-clients/00700-typescript-reference.md @@ -1274,7 +1274,7 @@ const [users, isReady] = useTable( const sendMessage = useReducer(reducers.sendMessage); Loading users...}> - + {user =>
{user.name}
}
diff --git a/docs/docs/00300-resources/00100-how-to/00300-logging.md b/docs/docs/00300-resources/00100-how-to/00300-logging.md index 0e43daee80a..280c57c06a8 100644 --- a/docs/docs/00300-resources/00100-how-to/00300-logging.md +++ b/docs/docs/00300-resources/00100-how-to/00300-logging.md @@ -18,7 +18,10 @@ SpacetimeDB provides logging capabilities for debugging and monitoring your modu Use the standard `console` API to write logs from your reducers: ```typescript -import { spacetimedb } from 'spacetimedb/server'; +import { schema, t } from 'spacetimedb/server'; + +const spacetimedb = schema({ /* tables */ }); +export default spacetimedb; export const process_data = spacetimedb.reducer({ value: t.u32() }, (ctx, { value }) => { console.log(`Processing data with value: ${value}`); diff --git a/docs/versioned_docs/version-1.12.0/00200-core-concepts/00100-databases/00300-spacetime-publish.md b/docs/versioned_docs/version-1.12.0/00200-core-concepts/00100-databases/00300-spacetime-publish.md index fe4bc03f162..31691bcb5af 100644 --- a/docs/versioned_docs/version-1.12.0/00200-core-concepts/00100-databases/00300-spacetime-publish.md +++ b/docs/versioned_docs/version-1.12.0/00200-core-concepts/00100-databases/00300-spacetime-publish.md @@ -93,7 +93,7 @@ spacetime publish --break-clients To completely reset your database and delete all data: ```bash -spacetime publish --delete-data +spacetime publish --delete-data=always ``` ⚠️ **Warning:** This permanently deletes all data in your database! diff --git a/docs/versioned_docs/version-1.12.0/00200-core-concepts/00100-databases/00500-cheat-sheet.md b/docs/versioned_docs/version-1.12.0/00200-core-concepts/00100-databases/00500-cheat-sheet.md index 529e79d6ec4..8b9ee8fbda6 100644 --- a/docs/versioned_docs/version-1.12.0/00200-core-concepts/00100-databases/00500-cheat-sheet.md +++ b/docs/versioned_docs/version-1.12.0/00200-core-concepts/00100-databases/00500-cheat-sheet.md @@ -578,7 +578,7 @@ spacetime login # Authenticate # Module management spacetime build # Build module spacetime publish # Publish module -spacetime publish --delete-data # Reset database +spacetime publish --delete-data=always # Reset database spacetime delete # Delete database # Database operations @@ -591,7 +591,7 @@ spacetime call reducer arg1 arg2 # Call reducer # Code generation spacetime generate --lang rust # Generate Rust client spacetime generate --lang csharp # Generate C# client -spacetime generate --lang ts # Generate TypeScript client +spacetime generate --lang typescript # Generate TypeScript client ``` ## Common Types diff --git a/skills/cli/SKILL.md b/skills/cli/SKILL.md index b984f44459a..534ad7ee4ec 100644 --- a/skills/cli/SKILL.md +++ b/skills/cli/SKILL.md @@ -46,7 +46,8 @@ spacetime dev spacetime dev --client-lang typescript --module-bindings-path ./client/src/module_bindings # Generate client bindings -spacetime generate --lang typescript|csharp|rust|unrealcpp --out-dir ./bindings --module-path ./server +spacetime generate --lang typescript|csharp|rust --out-dir ./bindings --module-path ./server +spacetime generate --lang unrealcpp --uproject-dir ./MyGame --module-path ./server --unreal-module-name MyGame ``` ### Publishing & Deployment @@ -59,7 +60,7 @@ spacetime publish my-database --yes spacetime publish my-database --server local --yes # Clear database and republish -spacetime publish my-database --delete-data always --yes +spacetime publish my-database --delete-data=always --yes ``` ### Database Interaction @@ -170,7 +171,7 @@ spacetime server ping ### "Schema conflict" ```bash # Clear data and republish -spacetime publish my-db --delete-data always --yes +spacetime publish my-db --delete-data=always --yes ``` ### "Build failed" @@ -186,4 +187,3 @@ rustup target add wasm32-unknown-unknown **Server-side (modules):** Rust, C#, TypeScript, C++ **Client SDKs:** TypeScript, C#, Rust, Unreal Engine **CLI `generate` targets:** TypeScript, C#, Rust, Unreal C++ - diff --git a/skills/concepts/SKILL.md b/skills/concepts/SKILL.md index 9c4195fc1bd..ac9e91b371a 100644 --- a/skills/concepts/SKILL.md +++ b/skills/concepts/SKILL.md @@ -13,7 +13,7 @@ metadata: # SpacetimeDB Core Concepts -SpacetimeDB is a relational database that is also a server. It lets you upload application logic directly into the database via WebAssembly modules, eliminating the traditional web/game server layer entirely. +SpacetimeDB is a relational database that is also a server. It lets you upload application logic directly into the database as modules, eliminating the traditional web/game server layer entirely. Rust, C#, and C++ modules compile to WebAssembly, while TypeScript modules run on V8. --- @@ -87,7 +87,7 @@ Best practices: ## Modules -Modules are WebAssembly bundles containing application logic that runs inside the database. +Modules contain application logic that runs inside the database. - **Tables**: Define the data schema - **Reducers**: Define callable functions that modify state