From 84abe94fb7997f98e69487af326ae8c72c28a860 Mon Sep 17 00:00:00 2001 From: developerjamiu Date: Fri, 10 Jul 2026 15:14:37 +0100 Subject: [PATCH 1/2] docs: Group Concepts into eight sections and rename the section to Concepts --- docs/04-get-started/02-quickstart.md | 2 +- docs/04-get-started/03-how-it-works.md | 8 ++-- .../01-creating-endpoints.md | 2 +- .../02-models-and-data.md | 2 +- .../03-working-with-the-database.md | 6 +-- docs/05-build-your-first-app/04-deployment.md | 2 +- .../01-running-your-server.md} | 8 ++-- .../02-configuration.md} | 18 ++++----- .../03-modules.md} | 0 .../01-server-fundamentals/_category_.json | 4 ++ .../01-working-with-endpoints.md | 4 +- .../02-sessions.md} | 14 +++---- .../03-endpoint-inheritance.md} | 0 .../04-configure-http-calls.md} | 0 .../05-endpoint-middleware.md} | 2 +- .../06-error-handling-and-exceptions.md} | 8 ++-- .../07-streaming.md} | 8 ++-- .../08-server-events.md} | 2 +- .../09-file-uploads.md} | 0 .../_category_.json | 2 +- .../01-models/01-working-with-models.md} | 10 ++--- .../02-inheritance-and-polymorphism.md | 6 +-- .../03-vector-and-geography-fields.md | 8 ++-- .../01-models/04-custom-serialization.md} | 0 .../01-models/05-shared-packages.md} | 2 +- .../01-models/06-backward-compatibility.md} | 2 +- .../01-models}/_category_.json | 0 .../02-database}/01-connection.md | 2 +- .../02-database/02-tables.md} | 2 +- .../03-relations/01-one-to-one.md | 0 .../03-relations/02-one-to-many.md | 2 +- .../03-relations/03-many-to-many.md | 0 .../03-relations/04-self-relations.md | 0 .../03-relations/05-referential-actions.md | 0 .../02-database}/03-relations/06-modules.md | 2 +- .../02-database}/03-relations/_category_.json | 0 .../02-database}/04-indexing.md | 2 +- .../02-database}/05-crud.md | 18 ++++----- .../02-database/06-filtering.md} | 0 .../02-database}/07-relation-queries.md | 2 +- .../02-database/08-sorting.md} | 0 .../02-database}/09-pagination.md | 0 .../02-database/10-transactions.md} | 0 .../02-database/11-row-locking.md} | 0 .../02-database/12-raw-access.md} | 0 .../02-database/13-migrations.md} | 2 +- .../02-database/14-runtime-parameters.md} | 0 .../02-database/15-client-side-database.md} | 0 .../02-database/16-exceptions.md} | 2 +- .../02-database}/_category_.json | 0 .../03-data-and-the-database/_category_.json | 4 ++ .../01-get-started.md | 0 .../01-setup.md | 2 +- .../02-basics.md | 2 +- .../03-working-with-users.md | 2 +- .../04-providers/01-anonymous/01-setup.md | 0 .../01-anonymous/02-configuration.md | 0 .../01-anonymous/03-customizing-the-ui.md | 0 .../04-providers/01-anonymous/_category_.json | 0 .../04-providers/02-email/01-setup.md | 0 .../04-providers/02-email/02-configuration.md | 0 .../02-email/03-customizing-the-ui.md | 0 .../02-email/04-admin-operations.md | 0 .../04-providers/02-email/_category_.json | 0 .../04-providers/03-google/01-setup.md | 2 +- .../03-google/02-customizations.md | 0 .../03-google/03-customizing-the-ui.md | 0 .../03-google/04-troubleshooting.md | 0 .../04-providers/03-google/_category_.json | 0 .../04-providers/04-apple/01-setup.md | 0 .../04-apple/02-customizations.md | 0 .../04-apple/03-customizing-the-ui.md | 0 .../04-apple/04-troubleshooting.md | 0 .../04-providers/04-apple/_category_.json | 0 .../04-providers/05-facebook/01-setup.md | 2 +- .../05-facebook/02-customizations.md | 0 .../05-facebook/03-customizing-the-ui.md | 0 .../05-facebook/04-troubleshooting.md | 0 .../04-providers/05-facebook/_category_.json | 0 .../04-providers/06-firebase/01-setup.md | 0 .../06-firebase/02-customizations.md | 0 .../06-firebase/03-customizing-the-ui.md | 0 .../06-firebase/04-admin-operations.md | 0 .../06-firebase/05-troubleshooting.md | 0 .../04-providers/06-firebase/_category_.json | 0 .../04-providers/07-github/01-setup.md | 2 +- .../07-github/02-customizations.md | 0 .../07-github/03-customizing-the-ui.md | 0 .../07-github/04-troubleshooting.md | 0 .../04-providers/07-github/_category_.json | 0 .../04-providers/08-microsoft/01-setup.md | 0 .../08-microsoft/02-configuration.md | 0 .../08-microsoft/03-customizing-the-ui.md | 0 .../04-providers/08-microsoft/_category_.json | 0 .../04-providers/09-passkey/01-setup.md | 0 .../09-passkey/03-customizing-the-ui.md | 0 .../04-providers/09-passkey/_category_.json | 0 .../10-custom-providers/01-overview.md | 0 .../02-oauth2-utility/01-setup.md | 0 ...ating-an-oauth2-based-identity-provider.md | 0 .../02-oauth2-utility/_category_.json | 0 .../10-custom-providers/_category_.json | 0 .../04-providers/_category_.json | 0 .../05-token-managers/01-managing-tokens.md | 0 .../05-token-managers/02-jwt-token-manager.md | 2 +- .../03-server-side-sessions-token-manager.md | 0 .../05-token-managers/_category_.json | 0 .../06-ui-components.md | 0 .../07-profile-photos.md | 4 +- .../08-custom-overrides.md} | 0 .../11-legacy/01-setup.md | 2 +- .../11-legacy/02-basics.md | 0 .../11-legacy/03-working-with-users.md | 0 .../11-legacy/04-providers/01-email.md | 0 .../11-legacy/04-providers/02-google.md | 0 .../11-legacy/04-providers/03-apple.md | 0 .../11-legacy/04-providers/05-firebase.md | 0 .../04-providers/06-custom-providers.md | 0 .../11-legacy/04-providers/_category_.json | 0 .../11-legacy/05-custom-overrides.md | 0 .../11-legacy/_category_.json | 0 .../_category_.json | 0 .../01-overview.md | 2 +- .../02-routing.md | 2 +- .../03-request-data.md | 2 +- .../04-web-server-middleware.md} | 0 .../05-static-files.md | 0 .../06-server-side-html.md} | 2 +- .../07-single-page-apps.md} | 0 .../08-flutter-web.md} | 0 .../_category_.json | 0 .../01-setup.md | 2 +- .../02-recurring-task.md | 0 .../03-inheritance.md | 0 .../04-configuration.md | 2 +- .../05-legacy.md | 2 +- .../_category_.json | 0 .../01-caching.md} | 0 .../02-logging.md} | 6 +-- .../03-health-checks.md} | 0 .../04-security-and-tls.md} | 2 +- .../05-experimental-features.md} | 2 +- .../06-concepts/07-operations/_category_.json | 4 ++ .../01-get-started.md | 0 .../02-the-basics.md | 0 .../03-advanced-examples.md | 0 .../04-best-practises.md | 0 .../_category_.json | 0 docs/06-concepts/_category_.json | 2 +- docs/06-concepts/cli/_category_.json | 5 +-- docs/06-concepts/cli/_generated/cloud.md | 1 + docs/06-concepts/lookups/_category_.json | 5 +-- .../lookups/configuration-reference.md | 6 +-- docs/06-concepts/lookups/model-reference.md | 38 +++++++++---------- .../02-real-time-communication.md | 2 +- docs/11-upgrading/01-upgrade-to-four.md | 2 +- .../02-archive/01-upgrade-to-one-point-two.md | 2 +- .../02-archive/05-upgrade-to-pgvector.md | 2 +- .../02-archive/06-upgrade-to-three.md | 2 +- .../02-archive/07-streaming-endpoints.md | 2 +- .../03-migrate-from-legacy-auth.md | 2 +- docs/11-upgrading/04-upgrade-to-postgis.md | 4 +- 162 files changed, 146 insertions(+), 135 deletions(-) rename docs/06-concepts/{00-start-command.md => 01-server-fundamentals/01-running-your-server.md} (85%) rename docs/06-concepts/{07-configuration.md => 01-server-fundamentals/02-configuration.md} (92%) rename docs/06-concepts/{10-modules.md => 01-server-fundamentals/03-modules.md} (100%) create mode 100644 docs/06-concepts/01-server-fundamentals/_category_.json rename docs/06-concepts/{01-working-with-endpoints => 02-endpoints-and-apis}/01-working-with-endpoints.md (94%) rename docs/06-concepts/{05-sessions.md => 02-endpoints-and-apis/02-sessions.md} (95%) rename docs/06-concepts/{01-working-with-endpoints/02-endpoint-inheritance.md => 02-endpoints-and-apis/03-endpoint-inheritance.md} (100%) rename docs/06-concepts/{01-working-with-endpoints/03-configure-http-calls.md => 02-endpoints-and-apis/04-configure-http-calls.md} (100%) rename docs/06-concepts/{01-working-with-endpoints/04-middleware.md => 02-endpoints-and-apis/05-endpoint-middleware.md} (98%) rename docs/06-concepts/{04-exceptions.md => 02-endpoints-and-apis/06-error-handling-and-exceptions.md} (91%) rename docs/06-concepts/{15-streams.md => 02-endpoints-and-apis/07-streaming.md} (96%) rename docs/06-concepts/{16-server-events.md => 02-endpoints-and-apis/08-server-events.md} (97%) rename docs/06-concepts/{12-file-uploads.md => 02-endpoints-and-apis/09-file-uploads.md} (100%) rename docs/06-concepts/{01-working-with-endpoints => 02-endpoints-and-apis}/_category_.json (56%) rename docs/06-concepts/{02-models/01-models.md => 03-data-and-the-database/01-models/01-working-with-models.md} (92%) rename docs/06-concepts/{02-models => 03-data-and-the-database/01-models}/02-inheritance-and-polymorphism.md (98%) rename docs/06-concepts/{02-models => 03-data-and-the-database/01-models}/03-vector-and-geography-fields.md (93%) rename docs/06-concepts/{03-serialization.md => 03-data-and-the-database/01-models/04-custom-serialization.md} (100%) rename docs/06-concepts/{20-shared-packages.md => 03-data-and-the-database/01-models/05-shared-packages.md} (98%) rename docs/06-concepts/{17-backward-compatibility.md => 03-data-and-the-database/01-models/06-backward-compatibility.md} (98%) rename docs/06-concepts/{02-models => 03-data-and-the-database/01-models}/_category_.json (100%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/01-connection.md (99%) rename docs/06-concepts/{06-database/02-models.md => 03-data-and-the-database/02-database/02-tables.md} (99%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/03-relations/01-one-to-one.md (100%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/03-relations/02-one-to-many.md (95%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/03-relations/03-many-to-many.md (100%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/03-relations/04-self-relations.md (100%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/03-relations/05-referential-actions.md (100%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/03-relations/06-modules.md (80%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/03-relations/_category_.json (100%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/04-indexing.md (99%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/05-crud.md (85%) rename docs/06-concepts/{06-database/06-filter.md => 03-data-and-the-database/02-database/06-filtering.md} (100%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/07-relation-queries.md (97%) rename docs/06-concepts/{06-database/08-sort.md => 03-data-and-the-database/02-database/08-sorting.md} (100%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/09-pagination.md (100%) rename docs/06-concepts/{06-database/08-transactions.md => 03-data-and-the-database/02-database/10-transactions.md} (100%) rename docs/06-concepts/{06-database/13-row-locking.md => 03-data-and-the-database/02-database/11-row-locking.md} (100%) rename docs/06-concepts/{06-database/10-raw-access.md => 03-data-and-the-database/02-database/12-raw-access.md} (100%) rename docs/06-concepts/{06-database/11-migrations.md => 03-data-and-the-database/02-database/13-migrations.md} (98%) rename docs/06-concepts/{06-database/12-runtime-parameters.md => 03-data-and-the-database/02-database/14-runtime-parameters.md} (100%) rename docs/06-concepts/{06-database/14-client-side-database.md => 03-data-and-the-database/02-database/15-client-side-database.md} (100%) rename docs/06-concepts/{06-database/15-exceptions.md => 03-data-and-the-database/02-database/16-exceptions.md} (97%) rename docs/06-concepts/{06-database => 03-data-and-the-database/02-database}/_category_.json (100%) create mode 100644 docs/06-concepts/03-data-and-the-database/_category_.json rename docs/06-concepts/{11-authentication => 04-authentication}/01-get-started.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/01-setup.md (99%) rename docs/06-concepts/{11-authentication => 04-authentication}/02-basics.md (99%) rename docs/06-concepts/{11-authentication => 04-authentication}/03-working-with-users.md (99%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/01-anonymous/01-setup.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/01-anonymous/02-configuration.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/01-anonymous/03-customizing-the-ui.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/01-anonymous/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/02-email/01-setup.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/02-email/02-configuration.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/02-email/03-customizing-the-ui.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/02-email/04-admin-operations.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/02-email/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/03-google/01-setup.md (99%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/03-google/02-customizations.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/03-google/03-customizing-the-ui.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/03-google/04-troubleshooting.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/03-google/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/04-apple/01-setup.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/04-apple/02-customizations.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/04-apple/03-customizing-the-ui.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/04-apple/04-troubleshooting.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/04-apple/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/05-facebook/01-setup.md (99%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/05-facebook/02-customizations.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/05-facebook/03-customizing-the-ui.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/05-facebook/04-troubleshooting.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/05-facebook/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/06-firebase/01-setup.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/06-firebase/02-customizations.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/06-firebase/03-customizing-the-ui.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/06-firebase/04-admin-operations.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/06-firebase/05-troubleshooting.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/06-firebase/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/07-github/01-setup.md (99%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/07-github/02-customizations.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/07-github/03-customizing-the-ui.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/07-github/04-troubleshooting.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/07-github/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/08-microsoft/01-setup.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/08-microsoft/02-configuration.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/08-microsoft/03-customizing-the-ui.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/08-microsoft/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/09-passkey/01-setup.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/09-passkey/03-customizing-the-ui.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/09-passkey/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/10-custom-providers/01-overview.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/10-custom-providers/02-oauth2-utility/01-setup.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/10-custom-providers/02-oauth2-utility/02-creating-an-oauth2-based-identity-provider.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/10-custom-providers/02-oauth2-utility/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/10-custom-providers/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/04-providers/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/05-token-managers/01-managing-tokens.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/05-token-managers/02-jwt-token-manager.md (98%) rename docs/06-concepts/{11-authentication => 04-authentication}/05-token-managers/03-server-side-sessions-token-manager.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/05-token-managers/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/06-ui-components.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/07-profile-photos.md (97%) rename docs/06-concepts/{11-authentication/10-custom-overrides.md => 04-authentication/08-custom-overrides.md} (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/11-legacy/01-setup.md (99%) rename docs/06-concepts/{11-authentication => 04-authentication}/11-legacy/02-basics.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/11-legacy/03-working-with-users.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/11-legacy/04-providers/01-email.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/11-legacy/04-providers/02-google.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/11-legacy/04-providers/03-apple.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/11-legacy/04-providers/05-firebase.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/11-legacy/04-providers/06-custom-providers.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/11-legacy/04-providers/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/11-legacy/05-custom-overrides.md (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/11-legacy/_category_.json (100%) rename docs/06-concepts/{11-authentication => 04-authentication}/_category_.json (100%) rename docs/06-concepts/{18-webserver => 05-web-server}/01-overview.md (98%) rename docs/06-concepts/{18-webserver => 05-web-server}/02-routing.md (98%) rename docs/06-concepts/{18-webserver => 05-web-server}/03-request-data.md (97%) rename docs/06-concepts/{18-webserver/04-middleware.md => 05-web-server/04-web-server-middleware.md} (100%) rename docs/06-concepts/{18-webserver => 05-web-server}/05-static-files.md (100%) rename docs/06-concepts/{18-webserver/07-server-side-html.md => 05-web-server/06-server-side-html.md} (97%) rename docs/06-concepts/{18-webserver/08-single-page-apps.md => 05-web-server/07-single-page-apps.md} (100%) rename docs/06-concepts/{18-webserver/09-flutter-web.md => 05-web-server/08-flutter-web.md} (100%) rename docs/06-concepts/{18-webserver => 05-web-server}/_category_.json (100%) rename docs/06-concepts/{14-scheduling => 06-scheduling}/01-setup.md (94%) rename docs/06-concepts/{14-scheduling => 06-scheduling}/02-recurring-task.md (100%) rename docs/06-concepts/{14-scheduling => 06-scheduling}/03-inheritance.md (100%) rename docs/06-concepts/{14-scheduling => 06-scheduling}/04-configuration.md (97%) rename docs/06-concepts/{14-scheduling => 06-scheduling}/05-legacy.md (94%) rename docs/06-concepts/{14-scheduling => 06-scheduling}/_category_.json (100%) rename docs/06-concepts/{08-caching.md => 07-operations/01-caching.md} (100%) rename docs/06-concepts/{09-logging.md => 07-operations/02-logging.md} (94%) rename docs/06-concepts/{13-health-checks.md => 07-operations/03-health-checks.md} (100%) rename docs/06-concepts/{21-security-configuration.md => 07-operations/04-security-and-tls.md} (89%) rename docs/06-concepts/{22-experimental.md => 07-operations/05-experimental-features.md} (98%) create mode 100644 docs/06-concepts/07-operations/_category_.json rename docs/06-concepts/{19-testing => 08-testing}/01-get-started.md (100%) rename docs/06-concepts/{19-testing => 08-testing}/02-the-basics.md (100%) rename docs/06-concepts/{19-testing => 08-testing}/03-advanced-examples.md (100%) rename docs/06-concepts/{19-testing => 08-testing}/04-best-practises.md (100%) rename docs/06-concepts/{19-testing => 08-testing}/_category_.json (100%) diff --git a/docs/04-get-started/02-quickstart.md b/docs/04-get-started/02-quickstart.md index 237430bf..542e612d 100644 --- a/docs/04-get-started/02-quickstart.md +++ b/docs/04-get-started/02-quickstart.md @@ -70,7 +70,7 @@ If you are using Cursor, you will need to **enable the Serverpod and Dart MCP se ## Start the server and the app -Start the server and the Flutter app by opening up a terminal window and running the [`serverpod start`](../06-concepts/00-start-command.md) command: +Start the server and the Flutter app by opening up a terminal window and running the [`serverpod start`](./concepts/server-fundamentals/running-your-server) command: ```bash $ serverpod start diff --git a/docs/04-get-started/03-how-it-works.md b/docs/04-get-started/03-how-it-works.md index b62b94a4..0b292b43 100644 --- a/docs/04-get-started/03-how-it-works.md +++ b/docs/04-get-started/03-how-it-works.md @@ -15,7 +15,7 @@ Serverpod is a full backend. It manages your database, authentication, file uplo A Serverpod project starts with the `serverpod create` command, which walks you through a few choices that shape what it generates: -- **Project type:** A full server, or a reusable [module](../concepts/modules) shared across servers. +- **Project type:** A full server, or a reusable [module](./concepts/server-fundamentals/modules) shared across servers. - **Database and caching:** Add a Postgres database and Redis (for pub/sub and caching). - **Authentication:** Built-in email and social sign-ins. - **Web server:** Optionally serve web pages and your Flutter web app alongside your API. @@ -50,7 +50,7 @@ Start your project before you begin building. With `serverpod start` already run ## Write an endpoint -In Serverpod, endpoints are the entry points your app calls to run code on the server. You define one as a class that extends `Endpoint`, with async methods that each take a [`Session`](../concepts/sessions) as their first argument and return a typed `Future`: +In Serverpod, endpoints are the entry points your app calls to run code on the server. You define one as a class that extends `Endpoint`, with async methods that each take a [`Session`](./concepts/endpoints-and-apis/sessions) as their first argument and return a typed `Future`: ```dart class ExampleEndpoint extends Endpoint { @@ -70,7 +70,7 @@ On the app side, the generated client turns each endpoint method into what looks final greeting = await client.example.hello('World'); ``` -The client handles the request, the response, and the JSON in between. Most calls follow this request-and-response shape. For live updates, Serverpod also has [streaming endpoints](../concepts/streams) that keep a connection open so the server and app can push data to each other. +The client handles the request, the response, and the JSON in between. Most calls follow this request-and-response shape. For live updates, Serverpod also has [streaming endpoints](./concepts/endpoints-and-apis/streaming) that keep a connection open so the server and app can push data to each other. ## Define your data models @@ -106,7 +106,7 @@ These run on the same `session` your endpoint method receives. When you change a That database runs without setup on your part: Serverpod manages an embedded Postgres for you, with no Docker to configure. If you would rather manage Postgres yourself, you can change the configuration in the server's `config` directory. -See [Working with the database](../concepts/database/crud) for building queries, relations, and transactions. +See [Working with the database](./concepts/data-and-the-database/database/crud) for building queries, relations, and transactions. ## Build with an AI agent diff --git a/docs/05-build-your-first-app/01-creating-endpoints.md b/docs/05-build-your-first-app/01-creating-endpoints.md index d7629bd2..9a07469d 100644 --- a/docs/05-build-your-first-app/01-creating-endpoints.md +++ b/docs/05-build-your-first-app/01-creating-endpoints.md @@ -112,7 +112,7 @@ class RecipeEndpoint extends Endpoint { The endpoint reads your Gemini key from `session.passwords`, which Serverpod populates from the `passwords.yaml` file you edited earlier. :::info -Endpoint methods take a `Session` as their first parameter and return a typed `Future` or `Stream`. You can pass and return primitive types or any [model defined in a `.spy.yaml` file](../06-concepts/02-models/01-models.md). The class name's `Endpoint` suffix is dropped on the client, so `RecipeEndpoint` is called via `client.recipe`. See [How it works](../04-get-started/03-how-it-works.md) for how that call reaches the server. +Endpoint methods take a `Session` as their first parameter and return a typed `Future` or `Stream`. You can pass and return primitive types or any [model defined in a `.spy.yaml` file](../concepts/models). The class name's `Endpoint` suffix is dropped on the client, so `RecipeEndpoint` is called via `client.recipe`. See [How it works](../04-get-started/03-how-it-works.md) for how that call reaches the server. ::: Save the file. Because `serverpod start` is watching, it regenerates the client bindings for `generateRecipe` automatically. You'll see it run in the terminal. diff --git a/docs/05-build-your-first-app/02-models-and-data.md b/docs/05-build-your-first-app/02-models-and-data.md index c9dcda40..1dccb174 100644 --- a/docs/05-build-your-first-app/02-models-and-data.md +++ b/docs/05-build-your-first-app/02-models-and-data.md @@ -34,7 +34,7 @@ fields: Save the file. `serverpod start` regenerates the `Recipe` class for both the server and the client. :::info -Fields can be primitive types, other models, or a typed `List`, `Map`, or `Set`. See [Working with models](../06-concepts/02-models/01-models.md) for the full set of options. +Fields can be primitive types, other models, or a typed `List`, `Map`, or `Set`. See [Working with models](../concepts/models) for the full set of options. ::: ## Return the model from your endpoint diff --git a/docs/05-build-your-first-app/03-working-with-the-database.md b/docs/05-build-your-first-app/03-working-with-the-database.md index eec83282..9abfbb63 100644 --- a/docs/05-build-your-first-app/03-working-with-the-database.md +++ b/docs/05-build-your-first-app/03-working-with-the-database.md @@ -36,12 +36,12 @@ fields: Save the file. The regenerated `Recipe` class now exposes database methods through `Recipe.db`. :::info -See the [database models](../06-concepts/02-models/01-models.md#keywords-1) reference for all the keywords you can use in a table. +See the [database models](../concepts/models#keywords-1) reference for all the keywords you can use in a table. ::: ## Create and apply the migration -Changing the schema requires a [migration](../06-concepts/06-database/11-migrations.md): a set of SQL steps that bring the database up to date with your models. The `serverpod start` terminal has shortcuts for this, listed along the bottom. With that terminal focused: +Changing the schema requires a [migration](../concepts/data-and-the-database/database/migrations): a set of SQL steps that bring the database up to date with your models. The `serverpod start` terminal has shortcuts for this, listed along the bottom. With that terminal focused: ![serverpod start tui](/img/getting-started/tui-logs.png) @@ -77,7 +77,7 @@ Add a second method to the endpoint that returns every saved recipe, newest firs ``` :::info -`insertRow` and `find` are Serverpod's typed database methods. See [CRUD](../06-concepts/06-database/05-crud.md) for the full set of operations. +`insertRow` and `find` are Serverpod's typed database methods. See [CRUD](../concepts/data-and-the-database/database/crud) for the full set of operations. ::: ## Show the saved recipes in your app diff --git a/docs/05-build-your-first-app/04-deployment.md b/docs/05-build-your-first-app/04-deployment.md index 794ec4c1..fb735dd5 100644 --- a/docs/05-build-your-first-app/04-deployment.md +++ b/docs/05-build-your-first-app/04-deployment.md @@ -54,4 +54,4 @@ You've built and deployed a full-stack app with Flutter and Serverpod: - Persistent storage with the database. - A Flutter app that talks to your server through the generated client. -We're excited to see what you'll build next. If you need help, join the [Discord community](https://serverpod.dev/discord) or ask in our [community on GitHub](https://github.com/serverpod/serverpod/discussions). To go deeper into any topic, browse the [Concepts](../06-concepts/01-working-with-endpoints/01-working-with-endpoints.md) section. +We're excited to see what you'll build next. If you need help, join the [Discord community](https://serverpod.dev/discord) or ask in our [community on GitHub](https://github.com/serverpod/serverpod/discussions). To go deeper into any topic, browse the [Concepts](../concepts/working-with-endpoints) section. diff --git a/docs/06-concepts/00-start-command.md b/docs/06-concepts/01-server-fundamentals/01-running-your-server.md similarity index 85% rename from docs/06-concepts/00-start-command.md rename to docs/06-concepts/01-server-fundamentals/01-running-your-server.md index c10eb58a..d61fc513 100644 --- a/docs/06-concepts/00-start-command.md +++ b/docs/06-concepts/01-server-fundamentals/01-running-your-server.md @@ -12,7 +12,7 @@ Run it from anywhere inside your project folder: serverpod start ``` -Use `serverpod start` for local development only. To run your server in production, deploy it instead. See [Deploy to Serverpod Cloud](../08-deployments/01-deploy-to-serverpod-cloud.md) or [Custom hosting](../08-deployments/custom-hosting/01-choosing-a-strategy.md). +Use `serverpod start` for local development only. To run your server in production, deploy it instead. See [Deploy to Serverpod Cloud](../../deployments/deploy-to-serverpod-cloud) or [Custom hosting](../../deployments/custom-hosting/choosing-a-strategy). ## Save a file to hot-reload @@ -28,7 +28,7 @@ On boot, `serverpod start` applies any pending migrations. While it runs, you ha - **A** applies pending migrations to the database. - **P** creates a repair migration to reconcile a database that has drifted from your migrations. -For how migrations work, see [Migrations](database/migrations). +For how migrations work, see [Migrations](../data-and-the-database/database/migrations). ## Choose a run mode @@ -52,6 +52,6 @@ You can still launch an app on demand from the terminal afterwards. To run witho ## Related -- [`serverpod start` reference](cli/commands/start): every command-line option. +- [`serverpod start` reference](../cli/commands/start): every command-line option. - [Configuration](configuration): the run modes and files the server loads on start. -- [Deploy to Serverpod Cloud](../08-deployments/01-deploy-to-serverpod-cloud.md): run your server in production instead of locally. +- [Deploy to Serverpod Cloud](../../deployments/deploy-to-serverpod-cloud): run your server in production instead of locally. diff --git a/docs/06-concepts/07-configuration.md b/docs/06-concepts/01-server-fundamentals/02-configuration.md similarity index 92% rename from docs/06-concepts/07-configuration.md rename to docs/06-concepts/01-server-fundamentals/02-configuration.md index 7a575405..f225c340 100644 --- a/docs/06-concepts/07-configuration.md +++ b/docs/06-concepts/01-server-fundamentals/02-configuration.md @@ -16,7 +16,7 @@ The three sources apply in order of precedence. The YAML files are the baseline, - **Environment variables**: override matching YAML values, useful for per-deployment settings and secrets. - **Dart configuration object**: a `ServerpodConfig` passed to the `Serverpod` constructor, overriding everything else. -For every available option, its environment variable, config-file key, and default, see the [Configuration reference](lookups/configuration-reference). +For every available option, its environment variable, config-file key, and default, see the [Configuration reference](../lookups/configuration-reference). ## Configuration files @@ -166,8 +166,8 @@ The following table shows the built-in secrets that Serverpod uses for its core For secrets related to first-party Serverpod packages, see their respective documentation: -- **Cloud storage**: see [Uploading files](file-uploads) for Google Cloud Storage, AWS S3, and Cloudflare R2 secrets. -- **Authentication**: see [Storing Secrets](authentication/setup#storing-secrets) on the Authentication setup page. +- **Cloud storage**: see [Uploading files](../endpoints-and-apis/file-uploads) for Google Cloud Storage, AWS S3, and Cloudflare R2 secrets. +- **Authentication**: see [Storing Secrets](../authentication/setup#storing-secrets) on the Authentication setup page. ### Custom secrets @@ -213,7 +213,7 @@ export SERVERPOD_PASSWORD_stripeApiKey=sk_test_123... Secrets are only available on the server. They are never sent to or accessible from your Flutter app. -Inside an endpoint, read a secret from the [`Session`](sessions) through the `passwords` map: +Inside an endpoint, read a secret from the [`Session`](../endpoints-and-apis/sessions) through the `passwords` map: ```dart Future processPayment(Session session, PaymentData data) async { @@ -253,7 +253,7 @@ Use `--from-file` for long or multi-line values such as a service account JSON. Serverpod uses a `generator.yaml` file to configure code generation. Place this file in the `config` directory of your server project. -For every `generator.yaml` option, its type and default, see the [Configuration reference](lookups/configuration-reference#code-generation). The sections below explain the options you set most often. +For every `generator.yaml` option, its type and default, see the [Configuration reference](../lookups/configuration-reference#code-generation). The sections below explain the options you set most often. ### Package types @@ -287,7 +287,7 @@ Test tools for integration testing are generated by default at `test/integration # server_test_tools_path: test/integration/test_tools ``` -See the [testing documentation](testing/get-started) for more details. +See the [testing documentation](../testing/get-started) for more details. ### Module dependencies @@ -313,7 +313,7 @@ shared_packages: - ../another_shared_package ``` -Models and the protocol file are generated in each shared package's own directory when you run `serverpod generate` from your server project. See the [shared packages documentation](shared-packages) for setup, usage, and restrictions. +Models and the protocol file are generated in each shared package's own directory when you run `serverpod generate` from your server project. See the [shared packages documentation](../data-and-the-database/models/shared-packages) for setup, usage, and restrictions. ### Custom serializable classes @@ -325,7 +325,7 @@ extraClasses: - package:my_shared_package/my_shared_package.dart:AnotherCustomClass ``` -See the [serialization documentation](serialization) for implementing custom serializable classes. +See the [serialization documentation](../data-and-the-database/models/custom-serialization) for implementing custom serializable classes. ### Features @@ -345,7 +345,7 @@ experimental_features: all: true # Enables all available experimental features ``` -The `all` key opts into every available experimental feature. No experimental features are available in the current version. See the [experimental features documentation](experimental) for details. +The `all` key opts into every available experimental feature. No experimental features are available in the current version. See the [experimental features documentation](../operations/experimental-features) for details. :::warning Experimental features may change or be removed in future versions. diff --git a/docs/06-concepts/10-modules.md b/docs/06-concepts/01-server-fundamentals/03-modules.md similarity index 100% rename from docs/06-concepts/10-modules.md rename to docs/06-concepts/01-server-fundamentals/03-modules.md diff --git a/docs/06-concepts/01-server-fundamentals/_category_.json b/docs/06-concepts/01-server-fundamentals/_category_.json new file mode 100644 index 00000000..74dfca1a --- /dev/null +++ b/docs/06-concepts/01-server-fundamentals/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Server fundamentals", + "collapsed": true +} diff --git a/docs/06-concepts/01-working-with-endpoints/01-working-with-endpoints.md b/docs/06-concepts/02-endpoints-and-apis/01-working-with-endpoints.md similarity index 94% rename from docs/06-concepts/01-working-with-endpoints/01-working-with-endpoints.md rename to docs/06-concepts/02-endpoints-and-apis/01-working-with-endpoints.md index 6b345fa8..2147b743 100644 --- a/docs/06-concepts/01-working-with-endpoints/01-working-with-endpoints.md +++ b/docs/06-concepts/02-endpoints-and-apis/01-working-with-endpoints.md @@ -70,7 +70,7 @@ apiServer: publicScheme: http ``` -To enable browser credentials for CORS or use platform-native HTTP clients, see [Configure HTTP calls](./working-with-endpoints/configure-http-calls). +To enable browser credentials for CORS or use platform-native HTTP clients, see [Configure HTTP calls](./endpoints-and-apis/configure-http-calls). ## Point the client at each environment @@ -102,7 +102,7 @@ You can also pass `List`, `Map`, `Record`, and `Set` as parameters, but they nee :::warning -While it's possible to pass binary data through a method call and `ByteData`, it is not the most efficient way to transfer large files. See our [file upload](./file-uploads) interface. The size of a call is by default limited to 524288 bytes (512 KiB). It's possible to change by adding the `maxRequestSize` to your config files. E.g., this will double the request size to 1 MiB: +While it's possible to pass binary data through a method call and `ByteData`, it is not the most efficient way to transfer large files. See our [file upload](./endpoints-and-apis/file-uploads) interface. The size of a call is by default limited to 524288 bytes (512 KiB). It's possible to change by adding the `maxRequestSize` to your config files. E.g., this will double the request size to 1 MiB: ```yaml maxRequestSize: 1048576 diff --git a/docs/06-concepts/05-sessions.md b/docs/06-concepts/02-endpoints-and-apis/02-sessions.md similarity index 95% rename from docs/06-concepts/05-sessions.md rename to docs/06-concepts/02-endpoints-and-apis/02-sessions.md index fcacb2b2..9cc937bd 100644 --- a/docs/06-concepts/05-sessions.md +++ b/docs/06-concepts/02-endpoints-and-apis/02-sessions.md @@ -8,7 +8,7 @@ Every endpoint method receives a `Session` object. It is the entry point for the :::note -A Serverpod Session should not be confused with the concept of "web sessions" or "user sessions" which persist over multiple API calls. See the [Authentication documentation](./authentication/setup) for managing persistent authentication. +A Serverpod Session should not be confused with the concept of "web sessions" or "user sessions" which persist over multiple API calls. See the [Authentication documentation](../authentication/setup) for managing persistent authentication. ::: @@ -16,12 +16,12 @@ A Serverpod Session should not be confused with the concept of "web sessions" or ### Essential properties -- **`db`** - Database access. [See database docs](./database/connection) -- **`caches`** - Local and distributed caching. [See caching docs](./caching) +- **`db`** - Database access. [See database docs](../data-and-the-database/database/connection) +- **`caches`** - Local and distributed caching. [See caching docs](../operations/caching) - **`storage`** - File storage operations. [See file uploads](./file-uploads) - **`messages`** - Server events for real-time communication within and across servers. [See server events docs](./server-events) -- **`passwords`** - Credentials from config and environment. [See configuration](./configuration) -- **`authenticated`** - Current user authentication info. [See authentication docs](./authentication/basics) +- **`passwords`** - Credentials from config and environment. [See configuration](../server-fundamentals/configuration) +- **`authenticated`** - Current user authentication info. [See authentication docs](../authentication/basics) ### Key methods @@ -233,7 +233,7 @@ Future> getActiveUsers(Session session) async { ### 2. Use FutureCalls for delayed operations -Instead of managing sessions for async work, use Serverpod's [future call system](scheduling/setup): +Instead of managing sessions for async work, use Serverpod's [future call system](../scheduling/setup): ```dart // ✅ Good - Let Serverpod manage the session @@ -300,4 +300,4 @@ withServerpod('test group', (sessionBuilder, endpoints) { }); ``` -For detailed testing strategies, see the [testing documentation](./testing/get-started). +For detailed testing strategies, see the [testing documentation](../testing/get-started). diff --git a/docs/06-concepts/01-working-with-endpoints/02-endpoint-inheritance.md b/docs/06-concepts/02-endpoints-and-apis/03-endpoint-inheritance.md similarity index 100% rename from docs/06-concepts/01-working-with-endpoints/02-endpoint-inheritance.md rename to docs/06-concepts/02-endpoints-and-apis/03-endpoint-inheritance.md diff --git a/docs/06-concepts/01-working-with-endpoints/03-configure-http-calls.md b/docs/06-concepts/02-endpoints-and-apis/04-configure-http-calls.md similarity index 100% rename from docs/06-concepts/01-working-with-endpoints/03-configure-http-calls.md rename to docs/06-concepts/02-endpoints-and-apis/04-configure-http-calls.md diff --git a/docs/06-concepts/01-working-with-endpoints/04-middleware.md b/docs/06-concepts/02-endpoints-and-apis/05-endpoint-middleware.md similarity index 98% rename from docs/06-concepts/01-working-with-endpoints/04-middleware.md rename to docs/06-concepts/02-endpoints-and-apis/05-endpoint-middleware.md index c6dfcc77..f479312a 100644 --- a/docs/06-concepts/01-working-with-endpoints/04-middleware.md +++ b/docs/06-concepts/02-endpoints-and-apis/05-endpoint-middleware.md @@ -5,7 +5,7 @@ description: Middleware on the API server intercepts endpoint requests and respo # Endpoint middleware -Middleware runs before and after your endpoints, making it suitable for logging, caching, and rate limiting. Serverpod middleware follows the [Relic middleware](https://docs.dartrelic.dev/reference/middleware) interface. To add middleware to web server routes instead, scoped to path prefixes, see [Web server middleware](../webserver/middleware). +Middleware runs before and after your endpoints, making it suitable for logging, caching, and rate limiting. Serverpod middleware follows the [Relic middleware](https://docs.dartrelic.dev/reference/middleware) interface. To add middleware to web server routes instead, scoped to path prefixes, see [Web server middleware](../web-server/web-server-middleware). ## Adding middleware to your server diff --git a/docs/06-concepts/04-exceptions.md b/docs/06-concepts/02-endpoints-and-apis/06-error-handling-and-exceptions.md similarity index 91% rename from docs/06-concepts/04-exceptions.md rename to docs/06-concepts/02-endpoints-and-apis/06-error-handling-and-exceptions.md index e807637c..90f6d320 100644 --- a/docs/06-concepts/04-exceptions.md +++ b/docs/06-concepts/02-endpoints-and-apis/06-error-handling-and-exceptions.md @@ -13,12 +13,12 @@ Use the Serverpod Insights app to view your logs. It will show any failed or slo ::: :::info -Uncaught exceptions thrown in endpoints are logged in the `serverpod_session_log` table, not in the `serverpod_log` table. To understand more about the differences between these two tables, you can read more about [logging](logging) in Serverpod. +Uncaught exceptions thrown in endpoints are logged in the `serverpod_session_log` table, not in the `serverpod_log` table. To understand more about the differences between these two tables, you can read more about [logging](../operations/logging) in Serverpod. ::: ## Serializable exceptions -Serverpod allows adding data to an exception you throw on the server and extracting that data in the client. You use the same YAML files to define the serializable exceptions as you would with any serializable model (see [serialization](serialization) for details). The only difference is that you use the keyword `exception` instead of `class`. +Serverpod allows adding data to an exception you throw on the server and extracting that data in the client. You use the same YAML files to define the serializable exceptions as you would with any serializable model (see [serialization](../data-and-the-database/models/custom-serialization) for details). The only difference is that you use the keyword `exception` instead of `class`. ```yaml exception: MyException @@ -100,11 +100,11 @@ extraClasses: - package:my_project_shared/my_project_shared.dart:UserFacingException ``` -The `SerializableException` interface marks the exception as safe to serialize to the client. See [Custom serializable classes](configuration#custom-serializable-classes) for how the `extraClasses` entry registers the type for code generation. +The `SerializableException` interface marks the exception as safe to serialize to the client. See [Custom serializable classes](../server-fundamentals/configuration#custom-serializable-classes) for how the `extraClasses` entry registers the type for code generation. ### Default values in exceptions -Serverpod allows you to specify default values for fields in exceptions, similar to how it's done in models using the `default` and `defaultModel` keywords. If you're unfamiliar with how these keywords work, you can refer to the [Default Values](models#default-values) section in the [Working with Models](models) documentation. +Serverpod allows you to specify default values for fields in exceptions, similar to how it's done in models using the `default` and `defaultModel` keywords. If you're unfamiliar with how these keywords work, you can refer to the [Default Values](../models#default-values) section in the [Working with Models](../models) documentation. :::info Since exceptions are not persisted in the database, the `defaultPersist` keyword is not supported. If both `default` and `defaultModel` are specified, `defaultModel` will always take precedence, making it unnecessary to use both. diff --git a/docs/06-concepts/15-streams.md b/docs/06-concepts/02-endpoints-and-apis/07-streaming.md similarity index 96% rename from docs/06-concepts/15-streams.md rename to docs/06-concepts/02-endpoints-and-apis/07-streaming.md index 2fba7c8b..6ce3a827 100644 --- a/docs/06-concepts/15-streams.md +++ b/docs/06-concepts/02-endpoints-and-apis/07-streaming.md @@ -81,13 +81,13 @@ Authentication is integrated into streaming method calls. When a client initiate Authentication is validated when the stream is first established, using the authentication data stored in the `Session` object. If a user's authentication is revoked, the stream is closed and an exception is thrown. -For more details on handling revoked authentication, refer to the section on [handling revoked authentication](authentication/custom-overrides#handling-revoked-authentication). +For more details on handling revoked authentication, refer to the section on [handling revoked authentication](../authentication/custom-overrides#handling-revoked-authentication). ### WebSocket ping interval The server sends periodic ping messages on open streaming connections to keep them alive. The interval between pings is configurable and defaults to 30 seconds. -If you deploy behind a load balancer or proxy with a shorter idle timeout (for example, 15-20 seconds), you may need to lower the ping interval so connections are not closed. Set the `SERVERPOD_WEBSOCKET_PING_INTERVAL` environment variable to the desired interval in seconds, or configure `websocketPingInterval` in your [configuration](./configuration) file. +If you deploy behind a load balancer or proxy with a shorter idle timeout (for example, 15-20 seconds), you may need to lower the ping interval so connections are not closed. Set the `SERVERPOD_WEBSOCKET_PING_INTERVAL` environment variable to the desired interval in seconds, or configure `websocketPingInterval` in your [configuration](../server-fundamentals/configuration) file. ### Error handling @@ -126,7 +126,7 @@ inStream.addError(SerializableException('Error from client')); In the example above, the client sends an error to the server, which then throws an exception back to the client. And since the exception is serializable, it is passed over the stream before the stream is closed. -Read more about serializable exceptions here: [Serializable exceptions](exceptions). +Read more about serializable exceptions here: [Serializable exceptions](./error-handling-and-exceptions). ## Example: live updates for a filtered query @@ -163,4 +163,4 @@ Because the channel name includes the `roomId`, each client receives updates onl ## Streaming endpoints (deprecated) -Serverpod's original streaming API (`streamOpened`, `handleStreamMessage`, `sendStreamMessage`, `openStreamingConnection`) is deprecated and will be removed in a future version. Use [streaming methods](#streaming-methods) instead. The old API is kept for reference in [Streaming endpoints (deprecated)](../upgrading/archive/streaming-endpoints). +Serverpod's original streaming API (`streamOpened`, `handleStreamMessage`, `sendStreamMessage`, `openStreamingConnection`) is deprecated and will be removed in a future version. Use [streaming methods](#streaming-methods) instead. The old API is kept for reference in [Streaming endpoints (deprecated)](../../upgrading/archive/streaming-endpoints). diff --git a/docs/06-concepts/16-server-events.md b/docs/06-concepts/02-endpoints-and-apis/08-server-events.md similarity index 97% rename from docs/06-concepts/16-server-events.md rename to docs/06-concepts/02-endpoints-and-apis/08-server-events.md index fd377cbd..9868fc4a 100644 --- a/docs/06-concepts/16-server-events.md +++ b/docs/06-concepts/02-endpoints-and-apis/08-server-events.md @@ -109,4 +109,4 @@ In the above example, the listener is first added and then removed from the `use ## Revoke authentication -The messaging interface also exposes a method for revoking authentication. For more details on handling revoked authentication, refer to the section on [handling revoked authentication](authentication/custom-overrides#handling-revoked-authentication). +The messaging interface also exposes a method for revoking authentication. For more details on handling revoked authentication, refer to the section on [handling revoked authentication](../authentication/custom-overrides#handling-revoked-authentication). diff --git a/docs/06-concepts/12-file-uploads.md b/docs/06-concepts/02-endpoints-and-apis/09-file-uploads.md similarity index 100% rename from docs/06-concepts/12-file-uploads.md rename to docs/06-concepts/02-endpoints-and-apis/09-file-uploads.md diff --git a/docs/06-concepts/01-working-with-endpoints/_category_.json b/docs/06-concepts/02-endpoints-and-apis/_category_.json similarity index 56% rename from docs/06-concepts/01-working-with-endpoints/_category_.json rename to docs/06-concepts/02-endpoints-and-apis/_category_.json index f8313621..658cb252 100644 --- a/docs/06-concepts/01-working-with-endpoints/_category_.json +++ b/docs/06-concepts/02-endpoints-and-apis/_category_.json @@ -1,5 +1,5 @@ { - "label": "Endpoints", + "label": "Endpoints & APIs", "collapsed": true, "link": null } diff --git a/docs/06-concepts/02-models/01-models.md b/docs/06-concepts/03-data-and-the-database/01-models/01-working-with-models.md similarity index 92% rename from docs/06-concepts/02-models/01-models.md rename to docs/06-concepts/03-data-and-the-database/01-models/01-working-with-models.md index ca389c3a..5329fedc 100644 --- a/docs/06-concepts/02-models/01-models.md +++ b/docs/06-concepts/03-data-and-the-database/01-models/01-working-with-models.md @@ -24,7 +24,7 @@ fields: employees: List ``` -Supported types are [bool](https://api.dart.dev/dart-core/bool-class.html), [int](https://api.dart.dev/dart-core/int-class.html), [double](https://api.dart.dev/dart-core/double-class.html), [String](https://api.dart.dev/dart-core/String-class.html), [Duration](https://api.dart.dev/dart-core/Duration-class.html), [DateTime](https://api.dart.dev/dart-core/DateTime-class.html), [ByteData](https://api.dart.dev/dart-typed_data/ByteData-class.html), [UuidValue](https://pub.dev/documentation/uuid/latest/uuid_value/UuidValue-class.html), [Uri](https://api.dart.dev/dart-core/Uri-class.html), [BigInt](https://api.dart.dev/dart-core/BigInt-class.html), [Vector](./models/vector-and-geography-fields#vector), [HalfVector](./models/vector-and-geography-fields#halfvector), [SparseVector](./models/vector-and-geography-fields#sparsevector), [Bit](./models/vector-and-geography-fields#bit), [GeographyPoint](./models/vector-and-geography-fields#geographypoint), [GeographyLineString](./models/vector-and-geography-fields#geographylinestring), [GeographyPolygon](./models/vector-and-geography-fields#geographypolygon), [GeographyGeometryCollection](./models/vector-and-geography-fields#geographygeometrycollection) and other serializable [classes](#class), [exceptions](#exception) and [enums](#enum). You can also use [List](https://api.dart.dev/dart-core/List-class.html)s, [Map](https://api.dart.dev/dart-core/Map-class.html)s and [Set](https://api.dart.dev/dart-core/Set-class.html)s of the supported types, just make sure to specify the types. All supported types can also be used inside [Record](https://api.dart.dev/dart-core/Record-class.html)s. Null safety is supported. Once your classes are generated, you can use them as parameters or return types to endpoint methods. +Supported types are [bool](https://api.dart.dev/dart-core/bool-class.html), [int](https://api.dart.dev/dart-core/int-class.html), [double](https://api.dart.dev/dart-core/double-class.html), [String](https://api.dart.dev/dart-core/String-class.html), [Duration](https://api.dart.dev/dart-core/Duration-class.html), [DateTime](https://api.dart.dev/dart-core/DateTime-class.html), [ByteData](https://api.dart.dev/dart-typed_data/ByteData-class.html), [UuidValue](https://pub.dev/documentation/uuid/latest/uuid_value/UuidValue-class.html), [Uri](https://api.dart.dev/dart-core/Uri-class.html), [BigInt](https://api.dart.dev/dart-core/BigInt-class.html), [Vector](./data-and-the-database/models/vector-and-geography-fields#vector), [HalfVector](./data-and-the-database/models/vector-and-geography-fields#halfvector), [SparseVector](./data-and-the-database/models/vector-and-geography-fields#sparsevector), [Bit](./data-and-the-database/models/vector-and-geography-fields#bit), [GeographyPoint](./data-and-the-database/models/vector-and-geography-fields#geographypoint), [GeographyLineString](./data-and-the-database/models/vector-and-geography-fields#geographylinestring), [GeographyPolygon](./data-and-the-database/models/vector-and-geography-fields#geographypolygon), [GeographyGeometryCollection](./data-and-the-database/models/vector-and-geography-fields#geographygeometrycollection) and other serializable [classes](#class), [exceptions](#exception) and [enums](#enum). You can also use [List](https://api.dart.dev/dart-core/List-class.html)s, [Map](https://api.dart.dev/dart-core/Map-class.html)s and [Set](https://api.dart.dev/dart-core/Set-class.html)s of the supported types, just make sure to specify the types. All supported types can also be used inside [Record](https://api.dart.dev/dart-core/Record-class.html)s. Null safety is supported. Once your classes are generated, you can use them as parameters or return types to endpoint methods. ### Required fields @@ -67,7 +67,7 @@ fields: ``` :::info -Serverpod's models can easily be saved to or read from the database. You can read more about this in the [Database](database/models) section. +Serverpod's models can easily be saved to or read from the database. You can read more about this in the [Database](./data-and-the-database/database/tables) section. ::: ### JSON key aliasing @@ -107,7 +107,7 @@ This is particularly helpful when: - Integrating with third-party services like MongoDB (e.g., mapping `id` to `_id`) :::info -The `jsonKey` property affects JSON serialization and deserialization. It does not affect the database column name. To customize the database column name, use the [`column` property](database/models#column-name-override) instead. +The `jsonKey` property affects JSON serialization and deserialization. It does not affect the database column name. To customize the database column name, use the [`column` property](./data-and-the-database/database/tables#column-name-override) instead. ::: ### Immutable classes @@ -149,7 +149,7 @@ print(user3.email); // alice@example.com ## Exception -The Serverpod models supports creating exceptions that can be thrown in endpoints by using the `exception` keyword. For more in-depth description on how to work with exceptions see [Error handling and exceptions](exceptions). +The Serverpod models supports creating exceptions that can be thrown in endpoints by using the `exception` keyword. For more in-depth description on how to work with exceptions see [Error handling and exceptions](./endpoints-and-apis/error-handling-and-exceptions). ```yaml exception: MyException @@ -327,7 +327,7 @@ The `copyWith` method generates a deep copy of an object, preserving all origina ### toJson / fromJson -The `toJson` and `fromJson` methods are generated on all models to help with serialization. Serverpod manages all serialization for you out of the box and you will rarely have to use these methods by your self. See the [Serialization](serialization) section for more info. +The `toJson` and `fromJson` methods are generated on all models to help with serialization. Serverpod manages all serialization for you out of the box and you will rarely have to use these methods by your self. See the [Serialization](./data-and-the-database/models/custom-serialization) section for more info. ### Custom methods diff --git a/docs/06-concepts/02-models/02-inheritance-and-polymorphism.md b/docs/06-concepts/03-data-and-the-database/01-models/02-inheritance-and-polymorphism.md similarity index 98% rename from docs/06-concepts/02-models/02-inheritance-and-polymorphism.md rename to docs/06-concepts/03-data-and-the-database/01-models/02-inheritance-and-polymorphism.md index e9d8ee76..bdc5e254 100644 --- a/docs/06-concepts/02-models/02-inheritance-and-polymorphism.md +++ b/docs/06-concepts/03-data-and-the-database/01-models/02-inheritance-and-polymorphism.md @@ -67,10 +67,10 @@ indexes: **Additional Restrictions**: -- You can only extend classes from your own project or from [shared packages](../shared-packages), not from modules. +- You can only extend classes from your own project or from [shared packages](./shared-packages), not from modules. - Child classes cannot redefine fields that exist in parent classes. -Indexes can be defined on inherited fields in a child class with a table, and relations work normally with inherited table classes. To use a base model that is shared between server and client and extend it on the server with a table, see [Shared packages](../shared-packages). +Indexes can be defined on inherited fields in a child class with a table, and relations work normally with inherited table classes. To use a base model that is shared between server and client and extend it on the server with a table, see [Shared packages](./shared-packages). ### Sealed classes @@ -190,7 +190,7 @@ When deserializing polymorphic types, Serverpod uses the class name encoded in t - An older client is receiving data from a class that was recently added on the server. - A newer client is sending data with a class that hasn't been deployed to the server yet. -If the missing class is a subclass of a known class, Serverpod will try to deserialize the model as the known class. This makes it safe to replace base classes with subclasses on endpoints without breaking [backward compatibility](../backward-compatibility). +If the missing class is a subclass of a known class, Serverpod will try to deserialize the model as the known class. This makes it safe to replace base classes with subclasses on endpoints without breaking [backward compatibility](./backward-compatibility). :::info This will only work for non-streaming endpoints. Streaming endpoints will always throw an exception if the class name is not known. diff --git a/docs/06-concepts/02-models/03-vector-and-geography-fields.md b/docs/06-concepts/03-data-and-the-database/01-models/03-vector-and-geography-fields.md similarity index 93% rename from docs/06-concepts/02-models/03-vector-and-geography-fields.md rename to docs/06-concepts/03-data-and-the-database/01-models/03-vector-and-geography-fields.md index 5e55ad63..f6b4b2df 100644 --- a/docs/06-concepts/02-models/03-vector-and-geography-fields.md +++ b/docs/06-concepts/03-data-and-the-database/01-models/03-vector-and-geography-fields.md @@ -16,12 +16,12 @@ When specifying vector types, the dimension is required between parentheses (e.g - 768 (many sentence transformers) - 384 (smaller models) -All vector types support specialized distance operations for similarity search and filtering. See the [Vector distance operators](../database/filter#vector-distance-operators) section for details. +All vector types support specialized distance operations for similarity search and filtering. See the [Vector distance operators](../database/filtering#vector-distance-operators) section for details. To ensure optimal performance with vector similarity searches, consider creating specialized vector indexes on your vector fields. See the [Vector indexes](../database/indexing#vector-indexes) section for more details. :::info -The usage of Vector fields requires a Postgres database with the `pgvector` extension installed. The extension comes by default on new Serverpod projects. To upgrade an existing project, see the [Upgrade to pgvector](../../upgrading/archive/upgrade-to-pgvector) guide. +The usage of Vector fields requires a Postgres database with the `pgvector` extension installed. The extension comes by default on new Serverpod projects. To upgrade an existing project, see the [Upgrade to pgvector](../../../upgrading/archive/upgrade-to-pgvector) guide. ::: ### Vector @@ -87,12 +87,12 @@ Geography types are used for storing geospatial data on the surface of the Earth Like other fields, geography fields can be made optional by appending `?` to the type, for example `location: GeographyPoint?`. -All geography types support spatial filter operations such as proximity search, intersection, containment, and distance-based ordering. See the [Geography operators](../database/filter#geography-operators) section for details. +All geography types support spatial filter operations such as proximity search, intersection, containment, and distance-based ordering. See the [Geography operators](../database/filtering#geography-operators) section for details. To ensure optimal performance with spatial queries, consider creating a spatial index on your geography fields. See the [Geography indexes](../database/indexing#geography-indexes) section for more details. :::info -The usage of Geography fields requires the PostGIS PostgreSQL extension to be installed. To set up PostGIS in a new or existing project, see the [Upgrading to PostGIS support](../../upgrading/upgrade-to-postgis) guide. +The usage of Geography fields requires the PostGIS PostgreSQL extension to be installed. To set up PostGIS in a new or existing project, see the [Upgrading to PostGIS support](../../../upgrading/upgrade-to-postgis) guide. ::: :::warning diff --git a/docs/06-concepts/03-serialization.md b/docs/06-concepts/03-data-and-the-database/01-models/04-custom-serialization.md similarity index 100% rename from docs/06-concepts/03-serialization.md rename to docs/06-concepts/03-data-and-the-database/01-models/04-custom-serialization.md diff --git a/docs/06-concepts/20-shared-packages.md b/docs/06-concepts/03-data-and-the-database/01-models/05-shared-packages.md similarity index 98% rename from docs/06-concepts/20-shared-packages.md rename to docs/06-concepts/03-data-and-the-database/01-models/05-shared-packages.md index d8504ed6..5631ec39 100644 --- a/docs/06-concepts/20-shared-packages.md +++ b/docs/06-concepts/03-data-and-the-database/01-models/05-shared-packages.md @@ -180,4 +180,4 @@ Shared models support most Serverpod model features, with these exceptions: If you need tables or server-only fields, define them in a server model that extends the shared model. -The shared package can also contain custom serializable classes. Register them in the server's `generator.yaml` under `extraClasses` if they need to be used in protocol serialization. See [Custom serializable classes](./configuration#custom-serializable-classes) for details. +The shared package can also contain custom serializable classes. Register them in the server's `generator.yaml` under `extraClasses` if they need to be used in protocol serialization. See [Custom serializable classes](../../server-fundamentals/configuration#custom-serializable-classes) for details. diff --git a/docs/06-concepts/17-backward-compatibility.md b/docs/06-concepts/03-data-and-the-database/01-models/06-backward-compatibility.md similarity index 98% rename from docs/06-concepts/17-backward-compatibility.md rename to docs/06-concepts/03-data-and-the-database/01-models/06-backward-compatibility.md index 79b097b0..67754c06 100644 --- a/docs/06-concepts/17-backward-compatibility.md +++ b/docs/06-concepts/03-data-and-the-database/01-models/06-backward-compatibility.md @@ -14,7 +14,7 @@ Following a simple set of rules, your server will stay compatible with older app 4. __Avoid changing parameter names in future call methods.__ Changing the parameter names of the future call methods will break backward compatibility since parameters are passed by name. 5. __Do not delete future call methods or change their signature.__ Instead, add new methods if you must pass another set of parameters. -For polymorphic models, Serverpod can also deserialize an unknown subtype as its known base class, which lets you add subtypes without breaking older clients. See [Handling unknown class names](models/inheritance-and-polymorphism#handling-unknown-class-names). +For polymorphic models, Serverpod can also deserialize an unknown subtype as its known base class, which lets you add subtypes without breaking older clients. See [Handling unknown class names](./inheritance-and-polymorphism#handling-unknown-class-names). ## Managing breaking changes with endpoint inheritance diff --git a/docs/06-concepts/02-models/_category_.json b/docs/06-concepts/03-data-and-the-database/01-models/_category_.json similarity index 100% rename from docs/06-concepts/02-models/_category_.json rename to docs/06-concepts/03-data-and-the-database/01-models/_category_.json diff --git a/docs/06-concepts/06-database/01-connection.md b/docs/06-concepts/03-data-and-the-database/02-database/01-connection.md similarity index 99% rename from docs/06-concepts/06-database/01-connection.md rename to docs/06-concepts/03-data-and-the-database/02-database/01-connection.md index 01333e9d..9332e54b 100644 --- a/docs/06-concepts/06-database/01-connection.md +++ b/docs/06-concepts/03-data-and-the-database/02-database/01-connection.md @@ -38,7 +38,7 @@ database: ... ``` -Note that the same database backend must be used for all run modes. For more information, see the [configuration documentation](../configuration#database-backends). +Note that the same database backend must be used for all run modes. For more information, see the [configuration documentation](../../server-fundamentals/configuration#database-backends). #### Configure search paths diff --git a/docs/06-concepts/06-database/02-models.md b/docs/06-concepts/03-data-and-the-database/02-database/02-tables.md similarity index 99% rename from docs/06-concepts/06-database/02-models.md rename to docs/06-concepts/03-data-and-the-database/02-database/02-tables.md index 825a1003..a359fb7d 100644 --- a/docs/06-concepts/06-database/02-models.md +++ b/docs/06-concepts/03-data-and-the-database/02-database/02-tables.md @@ -15,7 +15,7 @@ fields: When the `table` keyword is added to the model, Serverpod generates new methods for [interacting](crud) with the database. The keyword is also picked up by the `serverpod create-migration` command, which generates the [migrations](migrations) needed to update the database. -For the full list of keywords you can use in a model file, see the [Model reference](../lookups/model-reference). +For the full list of keywords you can use in a model file, see the [Model reference](../../lookups/model-reference). :::info When you add a `table` to a serializable class, Serverpod will automatically add an `id` field of type `int?` to the class. You should not define this field yourself. The `id` is set when you interact with an object stored in the database. diff --git a/docs/06-concepts/06-database/03-relations/01-one-to-one.md b/docs/06-concepts/03-data-and-the-database/02-database/03-relations/01-one-to-one.md similarity index 100% rename from docs/06-concepts/06-database/03-relations/01-one-to-one.md rename to docs/06-concepts/03-data-and-the-database/02-database/03-relations/01-one-to-one.md diff --git a/docs/06-concepts/06-database/03-relations/02-one-to-many.md b/docs/06-concepts/03-data-and-the-database/02-database/03-relations/02-one-to-many.md similarity index 95% rename from docs/06-concepts/06-database/03-relations/02-one-to-many.md rename to docs/06-concepts/03-data-and-the-database/02-database/03-relations/02-one-to-many.md index 292e23b3..3f7568fb 100644 --- a/docs/06-concepts/06-database/03-relations/02-one-to-many.md +++ b/docs/06-concepts/03-data-and-the-database/02-database/03-relations/02-one-to-many.md @@ -35,7 +35,7 @@ In the example, we define a 1:n relation between `Company` and `Employee` by usi The corresponding foreign key field is automatically integrated into the 'many' side (e.g., `Employee`) as a concealed column. -When fetching companies it now becomes possible to include any or all employees in the query. 1:n relations also enables additional [filtering](../filter#one-to-many) and [sorting](../sort#sort-on-relations) operations for [relational queries](../relation-queries). +When fetching companies it now becomes possible to include any or all employees in the query. 1:n relations also enables additional [filtering](../filtering#one-to-many) and [sorting](../sorting#sort-on-relations) operations for [relational queries](../relation-queries). ### Explicit definition diff --git a/docs/06-concepts/06-database/03-relations/03-many-to-many.md b/docs/06-concepts/03-data-and-the-database/02-database/03-relations/03-many-to-many.md similarity index 100% rename from docs/06-concepts/06-database/03-relations/03-many-to-many.md rename to docs/06-concepts/03-data-and-the-database/02-database/03-relations/03-many-to-many.md diff --git a/docs/06-concepts/06-database/03-relations/04-self-relations.md b/docs/06-concepts/03-data-and-the-database/02-database/03-relations/04-self-relations.md similarity index 100% rename from docs/06-concepts/06-database/03-relations/04-self-relations.md rename to docs/06-concepts/03-data-and-the-database/02-database/03-relations/04-self-relations.md diff --git a/docs/06-concepts/06-database/03-relations/05-referential-actions.md b/docs/06-concepts/03-data-and-the-database/02-database/03-relations/05-referential-actions.md similarity index 100% rename from docs/06-concepts/06-database/03-relations/05-referential-actions.md rename to docs/06-concepts/03-data-and-the-database/02-database/03-relations/05-referential-actions.md diff --git a/docs/06-concepts/06-database/03-relations/06-modules.md b/docs/06-concepts/03-data-and-the-database/02-database/03-relations/06-modules.md similarity index 80% rename from docs/06-concepts/06-database/03-relations/06-modules.md rename to docs/06-concepts/03-data-and-the-database/02-database/03-relations/06-modules.md index 4d3696d2..4afd33e2 100644 --- a/docs/06-concepts/06-database/03-relations/06-modules.md +++ b/docs/06-concepts/03-data-and-the-database/02-database/03-relations/06-modules.md @@ -4,7 +4,7 @@ description: Module relations connect your own database tables to tables from Se # Relations with modules -Serverpod [modules](../../modules) usually come with predefined tables and data structures. Sometimes it can be useful to extend them with your data structures by creating a relation to the module tables. Relations to modules come with some restrictions since you do not own the definition of the table, you cannot change the table structure of a module table. +Serverpod [modules](../../../server-fundamentals/modules) usually come with predefined tables and data structures. Sometimes it can be useful to extend them with your data structures by creating a relation to the module tables. Relations to modules come with some restrictions since you do not own the definition of the table, you cannot change the table structure of a module table. Since you do not directly control the models inside the modules it is recommended to create a so-called "bridge" table/model linking the module's model to your own. This can be done in the same way we normally would setup a one-to-one relation. diff --git a/docs/06-concepts/06-database/03-relations/_category_.json b/docs/06-concepts/03-data-and-the-database/02-database/03-relations/_category_.json similarity index 100% rename from docs/06-concepts/06-database/03-relations/_category_.json rename to docs/06-concepts/03-data-and-the-database/02-database/03-relations/_category_.json diff --git a/docs/06-concepts/06-database/04-indexing.md b/docs/06-concepts/03-data-and-the-database/02-database/04-indexing.md similarity index 99% rename from docs/06-concepts/06-database/04-indexing.md rename to docs/06-concepts/03-data-and-the-database/02-database/04-indexing.md index 87014ec9..cc8a43ec 100644 --- a/docs/06-concepts/06-database/04-indexing.md +++ b/docs/06-concepts/03-data-and-the-database/02-database/04-indexing.md @@ -167,7 +167,7 @@ indexes: If you only need containment queries (`@>`), use `jsonbPathOps` — it produces a smaller and faster index than the default `jsonbOps`. ::: -For details on configuring JSONB storage on your model fields, see [Storing serializable fields as JSONB](models#storing-serializable-fields-as-jsonb). +For details on configuring JSONB storage on your model fields, see [Storing serializable fields as JSONB](./tables#storing-serializable-fields-as-jsonb). ## Vector indexes diff --git a/docs/06-concepts/06-database/05-crud.md b/docs/06-concepts/03-data-and-the-database/02-database/05-crud.md similarity index 85% rename from docs/06-concepts/06-database/05-crud.md rename to docs/06-concepts/03-data-and-the-database/02-database/05-crud.md index 9d9dc36c..980fe720 100644 --- a/docs/06-concepts/06-database/05-crud.md +++ b/docs/06-concepts/03-data-and-the-database/02-database/05-crud.md @@ -4,7 +4,7 @@ description: The generated db methods on each model class create, read, update, # CRUD -To interact with the database you need a [`Session`](../sessions) object as this object holds the connection to the database. All CRUD operations are accessible via the session object and the generated models. The methods can be found under the static `db` field in your generated models. +To interact with the database you need a [`Session`](../../endpoints-and-apis/sessions) object as this object holds the connection to the database. All CRUD operations are accessible via the session object and the generated models. The methods can be found under the static `db` field in your generated models. For the following examples we will use this model: @@ -57,7 +57,7 @@ The method returns only the rows that were successfully inserted. If all rows co This is useful for idempotent operations where you want to insert data without failing on duplicates. Only unique and exclusion constraint violations are ignored. Other violations such as `NOT NULL`, `CHECK`, or foreign key constraints still throw an exception. :::warning -When using `ignoreConflicts` with models that have [non-persistent fields](models#non-persistent-fields), each row is inserted individually instead of in a single batch. This is necessary because the database cannot report which rows were skipped in a batch insert, making it impossible to correctly match non-persistent field values back to inserted rows. For large numbers of rows, this can cause performance issues. Consider removing non-persistent fields from the model or inserting in smaller batches. +When using `ignoreConflicts` with models that have [non-persistent fields](./tables#non-persistent-fields), each row is inserted individually instead of in a single batch. This is necessary because the database cannot report which rows were skipped in a batch insert, making it impossible to correctly match non-persistent field values back to inserted rows. For large numbers of rows, this can cause performance issues. Consider removing non-persistent fields from the model or inserting in smaller batches. ::: ## Read @@ -85,7 +85,7 @@ var company = await Company.db.findFirstRow( ); ``` -This operation returns the first model matching the filtering criteria or `null`. See [filter](filter) and [sort](sort) for all filter operations. +This operation returns the first model matching the filtering criteria or `null`. See [filter](./filtering) and [sort](./sorting) for all filter operations. :::info If you include an `orderBy`, it will be evaluated before the list is reduced. In this case, `findFirstRow()` will return the first entry from the sorted list. @@ -105,7 +105,7 @@ var companies = await Company.db.find( This operation returns a `List` of your models matching the filtering criteria. -See [filter](filter) and [sort](sort) for all filter and sorting operations and [pagination](pagination) for how to paginate the result. +See [filter](./filtering) and [sort](./sorting) for all filter and sorting operations and [pagination](pagination) for how to paginate the result. ## Update @@ -196,9 +196,9 @@ var updatedCompanies = await Company.db.updateWhere( ); ``` -The `updateWhere` method updates all rows matching the where expression, modifying only the specified columns. The method returns a list of the updated rows. If no rows match the criteria, an empty list is returned. See [filter](filter) for all available filtering operations. +The `updateWhere` method updates all rows matching the where expression, modifying only the specified columns. The method returns a list of the updated rows. If no rows match the criteria, an empty list is returned. See [filter](./filtering) for all available filtering operations. -The method also supports [pagination](pagination) and [ordering](sort): +The method also supports [pagination](pagination) and [ordering](./sorting): ```dart var updatedCompanies = await Company.db.updateWhere( @@ -228,7 +228,7 @@ The input object needs to have the `id` field set. The `deleteRow` method return ### Delete several rows -To batch delete several rows, use the `delete` method. This method also supports [ordering](sort) the returned deleted results. +To batch delete several rows, use the `delete` method. This method also supports [ordering](./sorting) the returned deleted results. ```dart var companiesDeleted = await Company.db.delete( @@ -242,7 +242,7 @@ This is an atomic operation, meaning no entries will be deleted if any entry fai ### Delete by filter -You can also do a [filtered](filter) delete and delete all entries matching a `where` query, by using the `deleteWhere` method. This method also supports [ordering](sort) of the returned deleted results. +You can also do a [filtered](./filtering) delete and delete all entries matching a `where` query, by using the `deleteWhere` method. This method also supports [ordering](./sorting) of the returned deleted results. ```dart var companiesDeleted = await Company.db.deleteWhere( @@ -256,7 +256,7 @@ The above example will delete any row where the `name` ends in _Ltd_. The `delet ## Count -Count is a special type of query that helps counting the number of rows in the database that matches a specific [filter](filter). +Count is a special type of query that helps counting the number of rows in the database that matches a specific [filter](./filtering). ```dart var count = await Company.db.count( diff --git a/docs/06-concepts/06-database/06-filter.md b/docs/06-concepts/03-data-and-the-database/02-database/06-filtering.md similarity index 100% rename from docs/06-concepts/06-database/06-filter.md rename to docs/06-concepts/03-data-and-the-database/02-database/06-filtering.md diff --git a/docs/06-concepts/06-database/07-relation-queries.md b/docs/06-concepts/03-data-and-the-database/02-database/07-relation-queries.md similarity index 97% rename from docs/06-concepts/06-database/07-relation-queries.md rename to docs/06-concepts/03-data-and-the-database/02-database/07-relation-queries.md index c7a3fcb9..fd1d13c5 100644 --- a/docs/06-concepts/06-database/07-relation-queries.md +++ b/docs/06-concepts/03-data-and-the-database/02-database/07-relation-queries.md @@ -117,7 +117,7 @@ For each call to includeList (nested or not) the Serverpod Framework will perfor ### Filter and sort -When working with large datasets, it's often necessary to [filter](filter) and [sort](sort) the records to retrieve the most relevant data. Serverpod offers methods to refine the included list of related objects: +When working with large datasets, it's often necessary to [filter](./filtering) and [sort](./sorting) the records to retrieve the most relevant data. Serverpod offers methods to refine the included list of related objects: #### Filter diff --git a/docs/06-concepts/06-database/08-sort.md b/docs/06-concepts/03-data-and-the-database/02-database/08-sorting.md similarity index 100% rename from docs/06-concepts/06-database/08-sort.md rename to docs/06-concepts/03-data-and-the-database/02-database/08-sorting.md diff --git a/docs/06-concepts/06-database/09-pagination.md b/docs/06-concepts/03-data-and-the-database/02-database/09-pagination.md similarity index 100% rename from docs/06-concepts/06-database/09-pagination.md rename to docs/06-concepts/03-data-and-the-database/02-database/09-pagination.md diff --git a/docs/06-concepts/06-database/08-transactions.md b/docs/06-concepts/03-data-and-the-database/02-database/10-transactions.md similarity index 100% rename from docs/06-concepts/06-database/08-transactions.md rename to docs/06-concepts/03-data-and-the-database/02-database/10-transactions.md diff --git a/docs/06-concepts/06-database/13-row-locking.md b/docs/06-concepts/03-data-and-the-database/02-database/11-row-locking.md similarity index 100% rename from docs/06-concepts/06-database/13-row-locking.md rename to docs/06-concepts/03-data-and-the-database/02-database/11-row-locking.md diff --git a/docs/06-concepts/06-database/10-raw-access.md b/docs/06-concepts/03-data-and-the-database/02-database/12-raw-access.md similarity index 100% rename from docs/06-concepts/06-database/10-raw-access.md rename to docs/06-concepts/03-data-and-the-database/02-database/12-raw-access.md diff --git a/docs/06-concepts/06-database/11-migrations.md b/docs/06-concepts/03-data-and-the-database/02-database/13-migrations.md similarity index 98% rename from docs/06-concepts/06-database/11-migrations.md rename to docs/06-concepts/03-data-and-the-database/02-database/13-migrations.md index 2e2a9c84..ba5b489b 100644 --- a/docs/06-concepts/06-database/11-migrations.md +++ b/docs/06-concepts/03-data-and-the-database/02-database/13-migrations.md @@ -39,7 +39,7 @@ The command reads the database schema from the last migration, then compares it If no previous migration exists it will create a migration assuming there is no initial state. -See the [Pre-migration project upgrade path](../../upgrading/archive/upgrade-to-one-point-two) section for more information on how to get started with migrations for any project created before migrations were introduced in Serverpod. +See the [Pre-migration project upgrade path](../../../upgrading/archive/upgrade-to-one-point-two) section for more information on how to get started with migrations for any project created before migrations were introduced in Serverpod. ### Force create migration diff --git a/docs/06-concepts/06-database/12-runtime-parameters.md b/docs/06-concepts/03-data-and-the-database/02-database/14-runtime-parameters.md similarity index 100% rename from docs/06-concepts/06-database/12-runtime-parameters.md rename to docs/06-concepts/03-data-and-the-database/02-database/14-runtime-parameters.md diff --git a/docs/06-concepts/06-database/14-client-side-database.md b/docs/06-concepts/03-data-and-the-database/02-database/15-client-side-database.md similarity index 100% rename from docs/06-concepts/06-database/14-client-side-database.md rename to docs/06-concepts/03-data-and-the-database/02-database/15-client-side-database.md diff --git a/docs/06-concepts/06-database/15-exceptions.md b/docs/06-concepts/03-data-and-the-database/02-database/16-exceptions.md similarity index 97% rename from docs/06-concepts/06-database/15-exceptions.md rename to docs/06-concepts/03-data-and-the-database/02-database/16-exceptions.md index 3d0cd674..34a5edce 100644 --- a/docs/06-concepts/06-database/15-exceptions.md +++ b/docs/06-concepts/03-data-and-the-database/02-database/16-exceptions.md @@ -25,7 +25,7 @@ try { } ``` -When a database exception is not caught inside an endpoint, it follows Serverpod's normal endpoint exception handling and is logged as an uncaught server exception. Serverpod does not serialize database exception details and send them to the app; those details stay server-side in the logs. See [Error handling and exceptions](../exceptions) for how uncaught exceptions reach the app. +When a database exception is not caught inside an endpoint, it follows Serverpod's normal endpoint exception handling and is logged as an uncaught server exception. Serverpod does not serialize database exception details and send them to the app; those details stay server-side in the logs. See [Error handling and exceptions](../../endpoints-and-apis/error-handling-and-exceptions) for how uncaught exceptions reach the app. ## Exception types diff --git a/docs/06-concepts/06-database/_category_.json b/docs/06-concepts/03-data-and-the-database/02-database/_category_.json similarity index 100% rename from docs/06-concepts/06-database/_category_.json rename to docs/06-concepts/03-data-and-the-database/02-database/_category_.json diff --git a/docs/06-concepts/03-data-and-the-database/_category_.json b/docs/06-concepts/03-data-and-the-database/_category_.json new file mode 100644 index 00000000..0b181077 --- /dev/null +++ b/docs/06-concepts/03-data-and-the-database/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Data & the database", + "collapsed": true +} diff --git a/docs/06-concepts/11-authentication/01-get-started.md b/docs/06-concepts/04-authentication/01-get-started.md similarity index 100% rename from docs/06-concepts/11-authentication/01-get-started.md rename to docs/06-concepts/04-authentication/01-get-started.md diff --git a/docs/06-concepts/11-authentication/01-setup.md b/docs/06-concepts/04-authentication/01-setup.md similarity index 99% rename from docs/06-concepts/11-authentication/01-setup.md rename to docs/06-concepts/04-authentication/01-setup.md index 394e7f9e..33183af2 100644 --- a/docs/06-concepts/11-authentication/01-setup.md +++ b/docs/06-concepts/04-authentication/01-setup.md @@ -125,7 +125,7 @@ By default, endpoints for all providers are disabled. To enable a provider, it i 4. Create and apply the migration that initializes the database for the provider. In the `serverpod start` terminal, press **M** to create the migration, then **A** to apply it. :::info - If this is the first time creating migrations after adding the module, besides the provider tables, all auth module tables will also be created. More detailed migration instructions can be found in the [migration guide](../database/migrations). + If this is the first time creating migrations after adding the module, besides the provider tables, all auth module tables will also be created. More detailed migration instructions can be found in the [migration guide](../data-and-the-database/database/migrations). ::: ### Storing secrets diff --git a/docs/06-concepts/11-authentication/02-basics.md b/docs/06-concepts/04-authentication/02-basics.md similarity index 99% rename from docs/06-concepts/11-authentication/02-basics.md rename to docs/06-concepts/04-authentication/02-basics.md index b71cb675..110e3112 100644 --- a/docs/06-concepts/11-authentication/02-basics.md +++ b/docs/06-concepts/04-authentication/02-basics.md @@ -153,7 +153,7 @@ The user must hold both `userRead` and `userWrite` to access this endpoint. You Keep scope names stable once deployed, as renaming a scope will revoke it from any user who had it. -You can also define shared scope requirements in a base endpoint class. See [Endpoint inheritance](../working-with-endpoints/endpoint-inheritance) for details. +You can also define shared scope requirements in a base endpoint class. See [Endpoint inheritance](../endpoints-and-apis/endpoint-inheritance) for details. :::caution Keep in mind that a scope is merely an arbitrary string and can be written in any format you prefer. However, it's crucial to use unique strings for each scope, as duplicated scope strings may lead to unintentional data exposure. diff --git a/docs/06-concepts/11-authentication/03-working-with-users.md b/docs/06-concepts/04-authentication/03-working-with-users.md similarity index 99% rename from docs/06-concepts/11-authentication/03-working-with-users.md rename to docs/06-concepts/04-authentication/03-working-with-users.md index 2b62e32e..32a5c7d6 100644 --- a/docs/06-concepts/11-authentication/03-working-with-users.md +++ b/docs/06-concepts/04-authentication/03-working-with-users.md @@ -262,7 +262,7 @@ analyzer: ::: :::tip -When referencing module classes in your model files, you can use a nickname for the module instead of the full module name. See the [modules documentation](../modules) for more information. +When referencing module classes in your model files, you can use a nickname for the module instead of the full module name. See the [modules documentation](../server-fundamentals/modules) for more information. ::: diff --git a/docs/06-concepts/11-authentication/04-providers/01-anonymous/01-setup.md b/docs/06-concepts/04-authentication/04-providers/01-anonymous/01-setup.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/01-anonymous/01-setup.md rename to docs/06-concepts/04-authentication/04-providers/01-anonymous/01-setup.md diff --git a/docs/06-concepts/11-authentication/04-providers/01-anonymous/02-configuration.md b/docs/06-concepts/04-authentication/04-providers/01-anonymous/02-configuration.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/01-anonymous/02-configuration.md rename to docs/06-concepts/04-authentication/04-providers/01-anonymous/02-configuration.md diff --git a/docs/06-concepts/11-authentication/04-providers/01-anonymous/03-customizing-the-ui.md b/docs/06-concepts/04-authentication/04-providers/01-anonymous/03-customizing-the-ui.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/01-anonymous/03-customizing-the-ui.md rename to docs/06-concepts/04-authentication/04-providers/01-anonymous/03-customizing-the-ui.md diff --git a/docs/06-concepts/11-authentication/04-providers/01-anonymous/_category_.json b/docs/06-concepts/04-authentication/04-providers/01-anonymous/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/01-anonymous/_category_.json rename to docs/06-concepts/04-authentication/04-providers/01-anonymous/_category_.json diff --git a/docs/06-concepts/11-authentication/04-providers/02-email/01-setup.md b/docs/06-concepts/04-authentication/04-providers/02-email/01-setup.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/02-email/01-setup.md rename to docs/06-concepts/04-authentication/04-providers/02-email/01-setup.md diff --git a/docs/06-concepts/11-authentication/04-providers/02-email/02-configuration.md b/docs/06-concepts/04-authentication/04-providers/02-email/02-configuration.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/02-email/02-configuration.md rename to docs/06-concepts/04-authentication/04-providers/02-email/02-configuration.md diff --git a/docs/06-concepts/11-authentication/04-providers/02-email/03-customizing-the-ui.md b/docs/06-concepts/04-authentication/04-providers/02-email/03-customizing-the-ui.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/02-email/03-customizing-the-ui.md rename to docs/06-concepts/04-authentication/04-providers/02-email/03-customizing-the-ui.md diff --git a/docs/06-concepts/11-authentication/04-providers/02-email/04-admin-operations.md b/docs/06-concepts/04-authentication/04-providers/02-email/04-admin-operations.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/02-email/04-admin-operations.md rename to docs/06-concepts/04-authentication/04-providers/02-email/04-admin-operations.md diff --git a/docs/06-concepts/11-authentication/04-providers/02-email/_category_.json b/docs/06-concepts/04-authentication/04-providers/02-email/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/02-email/_category_.json rename to docs/06-concepts/04-authentication/04-providers/02-email/_category_.json diff --git a/docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md b/docs/06-concepts/04-authentication/04-providers/03-google/01-setup.md similarity index 99% rename from docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md rename to docs/06-concepts/04-authentication/04-providers/03-google/01-setup.md index 17883d24..efaa187a 100644 --- a/docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md +++ b/docs/06-concepts/04-authentication/04-providers/03-google/01-setup.md @@ -459,7 +459,7 @@ production: } ``` -Alternatively, set the `SERVERPOD_PASSWORD_googleClientSecret` [environment variable](../../../07-configuration.md#via-environment-variables) on your production server with the same JSON value. +Alternatively, set the `SERVERPOD_PASSWORD_googleClientSecret` [environment variable](../../../server-fundamentals/configuration#via-environment-variables) on your production server with the same JSON value. #### Serverpod Cloud diff --git a/docs/06-concepts/11-authentication/04-providers/03-google/02-customizations.md b/docs/06-concepts/04-authentication/04-providers/03-google/02-customizations.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/03-google/02-customizations.md rename to docs/06-concepts/04-authentication/04-providers/03-google/02-customizations.md diff --git a/docs/06-concepts/11-authentication/04-providers/03-google/03-customizing-the-ui.md b/docs/06-concepts/04-authentication/04-providers/03-google/03-customizing-the-ui.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/03-google/03-customizing-the-ui.md rename to docs/06-concepts/04-authentication/04-providers/03-google/03-customizing-the-ui.md diff --git a/docs/06-concepts/11-authentication/04-providers/03-google/04-troubleshooting.md b/docs/06-concepts/04-authentication/04-providers/03-google/04-troubleshooting.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/03-google/04-troubleshooting.md rename to docs/06-concepts/04-authentication/04-providers/03-google/04-troubleshooting.md diff --git a/docs/06-concepts/11-authentication/04-providers/03-google/_category_.json b/docs/06-concepts/04-authentication/04-providers/03-google/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/03-google/_category_.json rename to docs/06-concepts/04-authentication/04-providers/03-google/_category_.json diff --git a/docs/06-concepts/11-authentication/04-providers/04-apple/01-setup.md b/docs/06-concepts/04-authentication/04-providers/04-apple/01-setup.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/04-apple/01-setup.md rename to docs/06-concepts/04-authentication/04-providers/04-apple/01-setup.md diff --git a/docs/06-concepts/11-authentication/04-providers/04-apple/02-customizations.md b/docs/06-concepts/04-authentication/04-providers/04-apple/02-customizations.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/04-apple/02-customizations.md rename to docs/06-concepts/04-authentication/04-providers/04-apple/02-customizations.md diff --git a/docs/06-concepts/11-authentication/04-providers/04-apple/03-customizing-the-ui.md b/docs/06-concepts/04-authentication/04-providers/04-apple/03-customizing-the-ui.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/04-apple/03-customizing-the-ui.md rename to docs/06-concepts/04-authentication/04-providers/04-apple/03-customizing-the-ui.md diff --git a/docs/06-concepts/11-authentication/04-providers/04-apple/04-troubleshooting.md b/docs/06-concepts/04-authentication/04-providers/04-apple/04-troubleshooting.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/04-apple/04-troubleshooting.md rename to docs/06-concepts/04-authentication/04-providers/04-apple/04-troubleshooting.md diff --git a/docs/06-concepts/11-authentication/04-providers/04-apple/_category_.json b/docs/06-concepts/04-authentication/04-providers/04-apple/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/04-apple/_category_.json rename to docs/06-concepts/04-authentication/04-providers/04-apple/_category_.json diff --git a/docs/06-concepts/11-authentication/04-providers/05-facebook/01-setup.md b/docs/06-concepts/04-authentication/04-providers/05-facebook/01-setup.md similarity index 99% rename from docs/06-concepts/11-authentication/04-providers/05-facebook/01-setup.md rename to docs/06-concepts/04-authentication/04-providers/05-facebook/01-setup.md index 1fc56917..337880b9 100644 --- a/docs/06-concepts/11-authentication/04-providers/05-facebook/01-setup.md +++ b/docs/06-concepts/04-authentication/04-providers/05-facebook/01-setup.md @@ -529,7 +529,7 @@ production: facebookAppSecret: 'your-facebook-app-secret' ``` -Alternatively, set the `SERVERPOD_PASSWORD_facebookAppId` and `SERVERPOD_PASSWORD_facebookAppSecret` [environment variables](../../../07-configuration.md#via-environment-variables) on your production server with the same values. +Alternatively, set the `SERVERPOD_PASSWORD_facebookAppId` and `SERVERPOD_PASSWORD_facebookAppSecret` [environment variables](../../../server-fundamentals/configuration#via-environment-variables) on your production server with the same values. #### Serverpod Cloud diff --git a/docs/06-concepts/11-authentication/04-providers/05-facebook/02-customizations.md b/docs/06-concepts/04-authentication/04-providers/05-facebook/02-customizations.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/05-facebook/02-customizations.md rename to docs/06-concepts/04-authentication/04-providers/05-facebook/02-customizations.md diff --git a/docs/06-concepts/11-authentication/04-providers/05-facebook/03-customizing-the-ui.md b/docs/06-concepts/04-authentication/04-providers/05-facebook/03-customizing-the-ui.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/05-facebook/03-customizing-the-ui.md rename to docs/06-concepts/04-authentication/04-providers/05-facebook/03-customizing-the-ui.md diff --git a/docs/06-concepts/11-authentication/04-providers/05-facebook/04-troubleshooting.md b/docs/06-concepts/04-authentication/04-providers/05-facebook/04-troubleshooting.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/05-facebook/04-troubleshooting.md rename to docs/06-concepts/04-authentication/04-providers/05-facebook/04-troubleshooting.md diff --git a/docs/06-concepts/11-authentication/04-providers/05-facebook/_category_.json b/docs/06-concepts/04-authentication/04-providers/05-facebook/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/05-facebook/_category_.json rename to docs/06-concepts/04-authentication/04-providers/05-facebook/_category_.json diff --git a/docs/06-concepts/11-authentication/04-providers/06-firebase/01-setup.md b/docs/06-concepts/04-authentication/04-providers/06-firebase/01-setup.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/06-firebase/01-setup.md rename to docs/06-concepts/04-authentication/04-providers/06-firebase/01-setup.md diff --git a/docs/06-concepts/11-authentication/04-providers/06-firebase/02-customizations.md b/docs/06-concepts/04-authentication/04-providers/06-firebase/02-customizations.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/06-firebase/02-customizations.md rename to docs/06-concepts/04-authentication/04-providers/06-firebase/02-customizations.md diff --git a/docs/06-concepts/11-authentication/04-providers/06-firebase/03-customizing-the-ui.md b/docs/06-concepts/04-authentication/04-providers/06-firebase/03-customizing-the-ui.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/06-firebase/03-customizing-the-ui.md rename to docs/06-concepts/04-authentication/04-providers/06-firebase/03-customizing-the-ui.md diff --git a/docs/06-concepts/11-authentication/04-providers/06-firebase/04-admin-operations.md b/docs/06-concepts/04-authentication/04-providers/06-firebase/04-admin-operations.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/06-firebase/04-admin-operations.md rename to docs/06-concepts/04-authentication/04-providers/06-firebase/04-admin-operations.md diff --git a/docs/06-concepts/11-authentication/04-providers/06-firebase/05-troubleshooting.md b/docs/06-concepts/04-authentication/04-providers/06-firebase/05-troubleshooting.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/06-firebase/05-troubleshooting.md rename to docs/06-concepts/04-authentication/04-providers/06-firebase/05-troubleshooting.md diff --git a/docs/06-concepts/11-authentication/04-providers/06-firebase/_category_.json b/docs/06-concepts/04-authentication/04-providers/06-firebase/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/06-firebase/_category_.json rename to docs/06-concepts/04-authentication/04-providers/06-firebase/_category_.json diff --git a/docs/06-concepts/11-authentication/04-providers/07-github/01-setup.md b/docs/06-concepts/04-authentication/04-providers/07-github/01-setup.md similarity index 99% rename from docs/06-concepts/11-authentication/04-providers/07-github/01-setup.md rename to docs/06-concepts/04-authentication/04-providers/07-github/01-setup.md index 1bec3f48..036ea40f 100644 --- a/docs/06-concepts/11-authentication/04-providers/07-github/01-setup.md +++ b/docs/06-concepts/04-authentication/04-providers/07-github/01-setup.md @@ -308,7 +308,7 @@ production: githubClientSecret: 'your-github-client-secret' ``` -Alternatively, set the `SERVERPOD_PASSWORD_githubClientId` and `SERVERPOD_PASSWORD_githubClientSecret` [environment variables](../../../07-configuration.md#via-environment-variables) on your production server with the same values. +Alternatively, set the `SERVERPOD_PASSWORD_githubClientId` and `SERVERPOD_PASSWORD_githubClientSecret` [environment variables](../../../server-fundamentals/configuration#via-environment-variables) on your production server with the same values. #### Serverpod Cloud diff --git a/docs/06-concepts/11-authentication/04-providers/07-github/02-customizations.md b/docs/06-concepts/04-authentication/04-providers/07-github/02-customizations.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/07-github/02-customizations.md rename to docs/06-concepts/04-authentication/04-providers/07-github/02-customizations.md diff --git a/docs/06-concepts/11-authentication/04-providers/07-github/03-customizing-the-ui.md b/docs/06-concepts/04-authentication/04-providers/07-github/03-customizing-the-ui.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/07-github/03-customizing-the-ui.md rename to docs/06-concepts/04-authentication/04-providers/07-github/03-customizing-the-ui.md diff --git a/docs/06-concepts/11-authentication/04-providers/07-github/04-troubleshooting.md b/docs/06-concepts/04-authentication/04-providers/07-github/04-troubleshooting.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/07-github/04-troubleshooting.md rename to docs/06-concepts/04-authentication/04-providers/07-github/04-troubleshooting.md diff --git a/docs/06-concepts/11-authentication/04-providers/07-github/_category_.json b/docs/06-concepts/04-authentication/04-providers/07-github/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/07-github/_category_.json rename to docs/06-concepts/04-authentication/04-providers/07-github/_category_.json diff --git a/docs/06-concepts/11-authentication/04-providers/08-microsoft/01-setup.md b/docs/06-concepts/04-authentication/04-providers/08-microsoft/01-setup.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/08-microsoft/01-setup.md rename to docs/06-concepts/04-authentication/04-providers/08-microsoft/01-setup.md diff --git a/docs/06-concepts/11-authentication/04-providers/08-microsoft/02-configuration.md b/docs/06-concepts/04-authentication/04-providers/08-microsoft/02-configuration.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/08-microsoft/02-configuration.md rename to docs/06-concepts/04-authentication/04-providers/08-microsoft/02-configuration.md diff --git a/docs/06-concepts/11-authentication/04-providers/08-microsoft/03-customizing-the-ui.md b/docs/06-concepts/04-authentication/04-providers/08-microsoft/03-customizing-the-ui.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/08-microsoft/03-customizing-the-ui.md rename to docs/06-concepts/04-authentication/04-providers/08-microsoft/03-customizing-the-ui.md diff --git a/docs/06-concepts/11-authentication/04-providers/08-microsoft/_category_.json b/docs/06-concepts/04-authentication/04-providers/08-microsoft/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/08-microsoft/_category_.json rename to docs/06-concepts/04-authentication/04-providers/08-microsoft/_category_.json diff --git a/docs/06-concepts/11-authentication/04-providers/09-passkey/01-setup.md b/docs/06-concepts/04-authentication/04-providers/09-passkey/01-setup.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/09-passkey/01-setup.md rename to docs/06-concepts/04-authentication/04-providers/09-passkey/01-setup.md diff --git a/docs/06-concepts/11-authentication/04-providers/09-passkey/03-customizing-the-ui.md b/docs/06-concepts/04-authentication/04-providers/09-passkey/03-customizing-the-ui.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/09-passkey/03-customizing-the-ui.md rename to docs/06-concepts/04-authentication/04-providers/09-passkey/03-customizing-the-ui.md diff --git a/docs/06-concepts/11-authentication/04-providers/09-passkey/_category_.json b/docs/06-concepts/04-authentication/04-providers/09-passkey/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/09-passkey/_category_.json rename to docs/06-concepts/04-authentication/04-providers/09-passkey/_category_.json diff --git a/docs/06-concepts/11-authentication/04-providers/10-custom-providers/01-overview.md b/docs/06-concepts/04-authentication/04-providers/10-custom-providers/01-overview.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/10-custom-providers/01-overview.md rename to docs/06-concepts/04-authentication/04-providers/10-custom-providers/01-overview.md diff --git a/docs/06-concepts/11-authentication/04-providers/10-custom-providers/02-oauth2-utility/01-setup.md b/docs/06-concepts/04-authentication/04-providers/10-custom-providers/02-oauth2-utility/01-setup.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/10-custom-providers/02-oauth2-utility/01-setup.md rename to docs/06-concepts/04-authentication/04-providers/10-custom-providers/02-oauth2-utility/01-setup.md diff --git a/docs/06-concepts/11-authentication/04-providers/10-custom-providers/02-oauth2-utility/02-creating-an-oauth2-based-identity-provider.md b/docs/06-concepts/04-authentication/04-providers/10-custom-providers/02-oauth2-utility/02-creating-an-oauth2-based-identity-provider.md similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/10-custom-providers/02-oauth2-utility/02-creating-an-oauth2-based-identity-provider.md rename to docs/06-concepts/04-authentication/04-providers/10-custom-providers/02-oauth2-utility/02-creating-an-oauth2-based-identity-provider.md diff --git a/docs/06-concepts/11-authentication/04-providers/10-custom-providers/02-oauth2-utility/_category_.json b/docs/06-concepts/04-authentication/04-providers/10-custom-providers/02-oauth2-utility/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/10-custom-providers/02-oauth2-utility/_category_.json rename to docs/06-concepts/04-authentication/04-providers/10-custom-providers/02-oauth2-utility/_category_.json diff --git a/docs/06-concepts/11-authentication/04-providers/10-custom-providers/_category_.json b/docs/06-concepts/04-authentication/04-providers/10-custom-providers/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/10-custom-providers/_category_.json rename to docs/06-concepts/04-authentication/04-providers/10-custom-providers/_category_.json diff --git a/docs/06-concepts/11-authentication/04-providers/_category_.json b/docs/06-concepts/04-authentication/04-providers/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/04-providers/_category_.json rename to docs/06-concepts/04-authentication/04-providers/_category_.json diff --git a/docs/06-concepts/11-authentication/05-token-managers/01-managing-tokens.md b/docs/06-concepts/04-authentication/05-token-managers/01-managing-tokens.md similarity index 100% rename from docs/06-concepts/11-authentication/05-token-managers/01-managing-tokens.md rename to docs/06-concepts/04-authentication/05-token-managers/01-managing-tokens.md diff --git a/docs/06-concepts/11-authentication/05-token-managers/02-jwt-token-manager.md b/docs/06-concepts/04-authentication/05-token-managers/02-jwt-token-manager.md similarity index 98% rename from docs/06-concepts/11-authentication/05-token-managers/02-jwt-token-manager.md rename to docs/06-concepts/04-authentication/05-token-managers/02-jwt-token-manager.md index 6ae9f12e..a21af3db 100644 --- a/docs/06-concepts/11-authentication/05-token-managers/02-jwt-token-manager.md +++ b/docs/06-concepts/04-authentication/05-token-managers/02-jwt-token-manager.md @@ -220,5 +220,5 @@ await TokenMetadata.db.insertRow( When using the `JwtTokenManager` in the server, no extra configuration is needed on the client. It will automatically include the access token in requests to the server and eagerly refresh the token when it is 30 seconds away from expiring. In case the refresh token expires, the client will automatically sign the user out and redirect to the login page. :::warning -The deprecated `client.openStreamingConnection()` interface is not compatible with JWT authentication. If you are using JWT tokens, migrate to [streaming endpoints](/concepts/streams) instead. +The deprecated `client.openStreamingConnection()` interface is not compatible with JWT authentication. If you are using JWT tokens, migrate to [streaming endpoints](../../endpoints-and-apis/streaming) instead. ::: diff --git a/docs/06-concepts/11-authentication/05-token-managers/03-server-side-sessions-token-manager.md b/docs/06-concepts/04-authentication/05-token-managers/03-server-side-sessions-token-manager.md similarity index 100% rename from docs/06-concepts/11-authentication/05-token-managers/03-server-side-sessions-token-manager.md rename to docs/06-concepts/04-authentication/05-token-managers/03-server-side-sessions-token-manager.md diff --git a/docs/06-concepts/11-authentication/05-token-managers/_category_.json b/docs/06-concepts/04-authentication/05-token-managers/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/05-token-managers/_category_.json rename to docs/06-concepts/04-authentication/05-token-managers/_category_.json diff --git a/docs/06-concepts/11-authentication/06-ui-components.md b/docs/06-concepts/04-authentication/06-ui-components.md similarity index 100% rename from docs/06-concepts/11-authentication/06-ui-components.md rename to docs/06-concepts/04-authentication/06-ui-components.md diff --git a/docs/06-concepts/11-authentication/07-profile-photos.md b/docs/06-concepts/04-authentication/07-profile-photos.md similarity index 97% rename from docs/06-concepts/11-authentication/07-profile-photos.md rename to docs/06-concepts/04-authentication/07-profile-photos.md index 74829c31..147b7101 100644 --- a/docs/06-concepts/11-authentication/07-profile-photos.md +++ b/docs/06-concepts/04-authentication/07-profile-photos.md @@ -229,7 +229,7 @@ http://localhost:8080/serverpod_cloud_storage?method=file&path=serverpod/user_im Set `publicHost`, `publicPort`, and `publicScheme` in `config/development.yaml` to match how clients reach your API server. -For production, configure object storage (S3, GCP, or R2) for `storageId: 'public'`. See [Uploading files](../file-uploads). Profile images require publicly accessible URLs because clients load them directly over HTTP. +For production, configure object storage (S3, GCP, or R2) for `storageId: 'public'`. See [Uploading files](../endpoints-and-apis/file-uploads). Profile images require publicly accessible URLs because clients load them directly over HTTP. ## Use server-side APIs for custom logic @@ -297,5 +297,5 @@ The `file_picker` package may return null bytes. Ensure you read bytes correctly - [Working with users](./working-with-users): profiles, names, and the edit endpoint overview - [Authentication setup](./setup): initial auth module configuration -- [Uploading files](../file-uploads): cloud storage for production +- [Uploading files](../endpoints-and-apis/file-uploads): cloud storage for production - [Legacy: displaying or editing user images](./legacy/working-with-users): legacy `serverpod_auth` widgets diff --git a/docs/06-concepts/11-authentication/10-custom-overrides.md b/docs/06-concepts/04-authentication/08-custom-overrides.md similarity index 100% rename from docs/06-concepts/11-authentication/10-custom-overrides.md rename to docs/06-concepts/04-authentication/08-custom-overrides.md diff --git a/docs/06-concepts/11-authentication/11-legacy/01-setup.md b/docs/06-concepts/04-authentication/11-legacy/01-setup.md similarity index 99% rename from docs/06-concepts/11-authentication/11-legacy/01-setup.md rename to docs/06-concepts/04-authentication/11-legacy/01-setup.md index 08b015a4..c9ca40e2 100644 --- a/docs/06-concepts/11-authentication/11-legacy/01-setup.md +++ b/docs/06-concepts/04-authentication/11-legacy/01-setup.md @@ -74,7 +74,7 @@ Then apply the migration by starting the server with the `apply-migrations` flag $ dart run bin/main.dart --role maintenance --apply-migrations ``` -The full migration instructions can be found in the [migration guide](../../database/migrations). +The full migration instructions can be found in the [migration guide](../../data-and-the-database/database/migrations). ### Configure Authentication diff --git a/docs/06-concepts/11-authentication/11-legacy/02-basics.md b/docs/06-concepts/04-authentication/11-legacy/02-basics.md similarity index 100% rename from docs/06-concepts/11-authentication/11-legacy/02-basics.md rename to docs/06-concepts/04-authentication/11-legacy/02-basics.md diff --git a/docs/06-concepts/11-authentication/11-legacy/03-working-with-users.md b/docs/06-concepts/04-authentication/11-legacy/03-working-with-users.md similarity index 100% rename from docs/06-concepts/11-authentication/11-legacy/03-working-with-users.md rename to docs/06-concepts/04-authentication/11-legacy/03-working-with-users.md diff --git a/docs/06-concepts/11-authentication/11-legacy/04-providers/01-email.md b/docs/06-concepts/04-authentication/11-legacy/04-providers/01-email.md similarity index 100% rename from docs/06-concepts/11-authentication/11-legacy/04-providers/01-email.md rename to docs/06-concepts/04-authentication/11-legacy/04-providers/01-email.md diff --git a/docs/06-concepts/11-authentication/11-legacy/04-providers/02-google.md b/docs/06-concepts/04-authentication/11-legacy/04-providers/02-google.md similarity index 100% rename from docs/06-concepts/11-authentication/11-legacy/04-providers/02-google.md rename to docs/06-concepts/04-authentication/11-legacy/04-providers/02-google.md diff --git a/docs/06-concepts/11-authentication/11-legacy/04-providers/03-apple.md b/docs/06-concepts/04-authentication/11-legacy/04-providers/03-apple.md similarity index 100% rename from docs/06-concepts/11-authentication/11-legacy/04-providers/03-apple.md rename to docs/06-concepts/04-authentication/11-legacy/04-providers/03-apple.md diff --git a/docs/06-concepts/11-authentication/11-legacy/04-providers/05-firebase.md b/docs/06-concepts/04-authentication/11-legacy/04-providers/05-firebase.md similarity index 100% rename from docs/06-concepts/11-authentication/11-legacy/04-providers/05-firebase.md rename to docs/06-concepts/04-authentication/11-legacy/04-providers/05-firebase.md diff --git a/docs/06-concepts/11-authentication/11-legacy/04-providers/06-custom-providers.md b/docs/06-concepts/04-authentication/11-legacy/04-providers/06-custom-providers.md similarity index 100% rename from docs/06-concepts/11-authentication/11-legacy/04-providers/06-custom-providers.md rename to docs/06-concepts/04-authentication/11-legacy/04-providers/06-custom-providers.md diff --git a/docs/06-concepts/11-authentication/11-legacy/04-providers/_category_.json b/docs/06-concepts/04-authentication/11-legacy/04-providers/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/11-legacy/04-providers/_category_.json rename to docs/06-concepts/04-authentication/11-legacy/04-providers/_category_.json diff --git a/docs/06-concepts/11-authentication/11-legacy/05-custom-overrides.md b/docs/06-concepts/04-authentication/11-legacy/05-custom-overrides.md similarity index 100% rename from docs/06-concepts/11-authentication/11-legacy/05-custom-overrides.md rename to docs/06-concepts/04-authentication/11-legacy/05-custom-overrides.md diff --git a/docs/06-concepts/11-authentication/11-legacy/_category_.json b/docs/06-concepts/04-authentication/11-legacy/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/11-legacy/_category_.json rename to docs/06-concepts/04-authentication/11-legacy/_category_.json diff --git a/docs/06-concepts/11-authentication/_category_.json b/docs/06-concepts/04-authentication/_category_.json similarity index 100% rename from docs/06-concepts/11-authentication/_category_.json rename to docs/06-concepts/04-authentication/_category_.json diff --git a/docs/06-concepts/18-webserver/01-overview.md b/docs/06-concepts/05-web-server/01-overview.md similarity index 98% rename from docs/06-concepts/18-webserver/01-overview.md rename to docs/06-concepts/05-web-server/01-overview.md index cacc75a8..9c0685b8 100644 --- a/docs/06-concepts/18-webserver/01-overview.md +++ b/docs/06-concepts/05-web-server/01-overview.md @@ -153,7 +153,7 @@ class UserRoute extends Route { - **[Routing](routing)** - Match requests to handlers by method and URL pattern - **[Request Data](request-data)** - Access path parameters, query parameters, headers, and body -- **[Middleware](middleware)** - Intercept and transform requests and responses +- **[Middleware](./web-server-middleware)** - Intercept and transform requests and responses - **[Static Files](static-files)** - Serve static assets - **[Server-side HTML](server-side-html)** - Render HTML dynamically on the server - **[Single Page Apps](single-page-apps)** - Serve SPAs with client-side routing diff --git a/docs/06-concepts/18-webserver/02-routing.md b/docs/06-concepts/05-web-server/02-routing.md similarity index 98% rename from docs/06-concepts/18-webserver/02-routing.md rename to docs/06-concepts/05-web-server/02-routing.md index e0a2ba85..d3158897 100644 --- a/docs/06-concepts/18-webserver/02-routing.md +++ b/docs/06-concepts/05-web-server/02-routing.md @@ -303,6 +303,6 @@ pod.webServer.addRoute( ## Next steps - **[Request Data](request-data)** - Access path parameters, query parameters, headers, and body -- **[Middleware](middleware)** - Intercept and transform requests and responses +- **[Middleware](./web-server-middleware)** - Intercept and transform requests and responses - **[Static Files](static-files)** - Serve static assets - **[Server-side HTML](server-side-html)** - Render HTML dynamically on the server diff --git a/docs/06-concepts/18-webserver/03-request-data.md b/docs/06-concepts/05-web-server/03-request-data.md similarity index 97% rename from docs/06-concepts/18-webserver/03-request-data.md rename to docs/06-concepts/05-web-server/03-request-data.md index 90b0755c..2d87d531 100644 --- a/docs/06-concepts/18-webserver/03-request-data.md +++ b/docs/06-concepts/05-web-server/03-request-data.md @@ -120,6 +120,6 @@ For more details on typed parameters and headers, see the ## Next steps -- **[Middleware](middleware)** - Intercept and transform requests and responses +- **[Middleware](./web-server-middleware)** - Intercept and transform requests and responses - **[Static Files](static-files)** - Serve static assets - **[Server-side HTML](server-side-html)** - Render HTML dynamically on the server diff --git a/docs/06-concepts/18-webserver/04-middleware.md b/docs/06-concepts/05-web-server/04-web-server-middleware.md similarity index 100% rename from docs/06-concepts/18-webserver/04-middleware.md rename to docs/06-concepts/05-web-server/04-web-server-middleware.md diff --git a/docs/06-concepts/18-webserver/05-static-files.md b/docs/06-concepts/05-web-server/05-static-files.md similarity index 100% rename from docs/06-concepts/18-webserver/05-static-files.md rename to docs/06-concepts/05-web-server/05-static-files.md diff --git a/docs/06-concepts/18-webserver/07-server-side-html.md b/docs/06-concepts/05-web-server/06-server-side-html.md similarity index 97% rename from docs/06-concepts/18-webserver/07-server-side-html.md rename to docs/06-concepts/05-web-server/06-server-side-html.md index 9621247a..7350a4d5 100644 --- a/docs/06-concepts/18-webserver/07-server-side-html.md +++ b/docs/06-concepts/05-web-server/06-server-side-html.md @@ -124,5 +124,5 @@ while using Jaspr's component model. [Jaspr](https://docs.page/schultek/jaspr) integration - Use [custom routes](routing) for REST APIs and custom request handling - Serve [static files](static-files) for CSS, JavaScript, and images -- Add [middleware](middleware) for cross-cutting concerns like logging and +- Add [middleware](./web-server-middleware) for cross-cutting concerns like logging and error handling diff --git a/docs/06-concepts/18-webserver/08-single-page-apps.md b/docs/06-concepts/05-web-server/07-single-page-apps.md similarity index 100% rename from docs/06-concepts/18-webserver/08-single-page-apps.md rename to docs/06-concepts/05-web-server/07-single-page-apps.md diff --git a/docs/06-concepts/18-webserver/09-flutter-web.md b/docs/06-concepts/05-web-server/08-flutter-web.md similarity index 100% rename from docs/06-concepts/18-webserver/09-flutter-web.md rename to docs/06-concepts/05-web-server/08-flutter-web.md diff --git a/docs/06-concepts/18-webserver/_category_.json b/docs/06-concepts/05-web-server/_category_.json similarity index 100% rename from docs/06-concepts/18-webserver/_category_.json rename to docs/06-concepts/05-web-server/_category_.json diff --git a/docs/06-concepts/14-scheduling/01-setup.md b/docs/06-concepts/06-scheduling/01-setup.md similarity index 94% rename from docs/06-concepts/14-scheduling/01-setup.md rename to docs/06-concepts/06-scheduling/01-setup.md index a5b92f71..5c3a5b97 100644 --- a/docs/06-concepts/14-scheduling/01-setup.md +++ b/docs/06-concepts/06-scheduling/01-setup.md @@ -29,7 +29,7 @@ class ExampleFutureCall extends FutureCall { ``` :::info -For a method to be recognized by Serverpod as a future call, it must return a `Future` and have at least one positional parameter which must be a [`Session`](../sessions) object. You can pass any serializable types as other parameters, and even use `List`, `Map`, `Set` or Dart records as long as they are typed. `Streaming` parameters are not supported. +For a method to be recognized by Serverpod as a future call, it must return a `Future` and have at least one positional parameter which must be a [`Session`](../endpoints-and-apis/sessions) object. You can pass any serializable types as other parameters, and even use `List`, `Map`, `Set` or Dart records as long as they are typed. `Streaming` parameters are not supported. ::: :::warning diff --git a/docs/06-concepts/14-scheduling/02-recurring-task.md b/docs/06-concepts/06-scheduling/02-recurring-task.md similarity index 100% rename from docs/06-concepts/14-scheduling/02-recurring-task.md rename to docs/06-concepts/06-scheduling/02-recurring-task.md diff --git a/docs/06-concepts/14-scheduling/03-inheritance.md b/docs/06-concepts/06-scheduling/03-inheritance.md similarity index 100% rename from docs/06-concepts/14-scheduling/03-inheritance.md rename to docs/06-concepts/06-scheduling/03-inheritance.md diff --git a/docs/06-concepts/14-scheduling/04-configuration.md b/docs/06-concepts/06-scheduling/04-configuration.md similarity index 97% rename from docs/06-concepts/14-scheduling/04-configuration.md rename to docs/06-concepts/06-scheduling/04-configuration.md index 203f18ca..6814294d 100644 --- a/docs/06-concepts/14-scheduling/04-configuration.md +++ b/docs/06-concepts/06-scheduling/04-configuration.md @@ -4,7 +4,7 @@ description: Future call configuration in Serverpod sets concurrency limits, the # Configuration -Future calls can be configured using options defined in the configuration files or environment variables. For a detailed list of configuration options, refer to the [Configuration](../configuration) page. +Future calls can be configured using options defined in the configuration files or environment variables. For a detailed list of configuration options, refer to the [Configuration](../server-fundamentals/configuration) page. ```yaml futureCallExecutionEnabled: true diff --git a/docs/06-concepts/14-scheduling/05-legacy.md b/docs/06-concepts/06-scheduling/05-legacy.md similarity index 94% rename from docs/06-concepts/14-scheduling/05-legacy.md rename to docs/06-concepts/06-scheduling/05-legacy.md index 091a768c..4d58eec3 100644 --- a/docs/06-concepts/14-scheduling/05-legacy.md +++ b/docs/06-concepts/06-scheduling/05-legacy.md @@ -8,7 +8,7 @@ description: The legacy string-based API for registering and scheduling future c This approach is error prone since it involves manually registering and scheduling future calls using string identifiers. The recommended way to interact with the future calls feature is through the [type-safe API](setup). ::: -To create a future call, extend the `FutureCall` class and override the `invoke` method. The method takes two params: the first is a [`Session`](../sessions) object and the second is an optional serializable model ([See models](../models)). +To create a future call, extend the `FutureCall` class and override the `invoke` method. The method takes two params: the first is a [`Session`](../endpoints-and-apis/sessions) object and the second is an optional serializable model ([See models](../models)). ```dart import 'package:serverpod/serverpod.dart'; diff --git a/docs/06-concepts/14-scheduling/_category_.json b/docs/06-concepts/06-scheduling/_category_.json similarity index 100% rename from docs/06-concepts/14-scheduling/_category_.json rename to docs/06-concepts/06-scheduling/_category_.json diff --git a/docs/06-concepts/08-caching.md b/docs/06-concepts/07-operations/01-caching.md similarity index 100% rename from docs/06-concepts/08-caching.md rename to docs/06-concepts/07-operations/01-caching.md diff --git a/docs/06-concepts/09-logging.md b/docs/06-concepts/07-operations/02-logging.md similarity index 94% rename from docs/06-concepts/09-logging.md rename to docs/06-concepts/07-operations/02-logging.md index 9989a136..1a06117a 100644 --- a/docs/06-concepts/09-logging.md +++ b/docs/06-concepts/07-operations/02-logging.md @@ -36,7 +36,7 @@ For the default values when environment variables are not set, see the [default - `SERVERPOD_SESSION_LOG_RETENTION_PERIOD`: How long to keep session log entries (duration string, e.g. `30d`, `6h`). Set to empty or omit to use the default (90 days). - `SERVERPOD_SESSION_LOG_RETENTION_COUNT`: Maximum number of session log entries to keep. Set to empty or omit to use the default (100,000). - `SERVERPOD_SESSION_CONSOLE_LOG_ENABLED`: Controls whether session logs are output to the console. -- `SERVERPOD_SESSION_CONSOLE_LOG_FORMAT`: The format for console logging (`text` or `json`). See [configuration](./configuration). +- `SERVERPOD_SESSION_CONSOLE_LOG_FORMAT`: The format for console logging (`text` or `json`). See [configuration](../server-fundamentals/configuration). ### Configuration file example @@ -51,7 +51,7 @@ sessionLogs: consoleEnabled: true # Logs are output to the console ``` -Duration strings for the cleanup interval and retention period use the same format as in [models](./models#supported-default-values): e.g. `30d`, `6h`, `1d 2h 30min`. +Duration strings for the cleanup interval and retention period use the same format as in [models](../models#supported-default-values): e.g. `30d`, `6h`, `1d 2h 30min`. ## Default behavior for session logs @@ -72,7 +72,7 @@ If `persistentEnabled` is set to `true` but **no database is configured**, a `St ::: :::info -You can use the companion app **[Serverpod Insights](../tools/insights)** to read, search, and configure the logs. +You can use the companion app **[Serverpod Insights](../../tools/insights)** to read, search, and configure the logs. ::: ### Log retention and automated purging diff --git a/docs/06-concepts/13-health-checks.md b/docs/06-concepts/07-operations/03-health-checks.md similarity index 100% rename from docs/06-concepts/13-health-checks.md rename to docs/06-concepts/07-operations/03-health-checks.md diff --git a/docs/06-concepts/21-security-configuration.md b/docs/06-concepts/07-operations/04-security-and-tls.md similarity index 89% rename from docs/06-concepts/21-security-configuration.md rename to docs/06-concepts/07-operations/04-security-and-tls.md index ce9c8918..edf787d1 100644 --- a/docs/06-concepts/21-security-configuration.md +++ b/docs/06-concepts/07-operations/04-security-and-tls.md @@ -57,7 +57,7 @@ final client = Client( #### Using `SecurityContext` with `httpClientOverride` -If you use the [`httpClientOverride` parameter](./working-with-endpoints/configure-http-calls), provide the security context through the HTTP client you pass in. You cannot set `securityContext` and `httpClientOverride` on the same `Client` instance. +If you use the [`httpClientOverride` parameter](../endpoints-and-apis/configure-http-calls), provide the security context through the HTTP client you pass in. You cannot set `securityContext` and `httpClientOverride` on the same `Client` instance. For example, on `dart:io` platforms you can create an `HttpClient` with your trusted certificates and wrap it in an `IOClient`: diff --git a/docs/06-concepts/22-experimental.md b/docs/06-concepts/07-operations/05-experimental-features.md similarity index 98% rename from docs/06-concepts/22-experimental.md rename to docs/06-concepts/07-operations/05-experimental-features.md index 7672aec0..64fb35d0 100644 --- a/docs/06-concepts/22-experimental.md +++ b/docs/06-concepts/07-operations/05-experimental-features.md @@ -11,7 +11,7 @@ Be cautious when using experimental features in production environments, as thei Experimental features are opt-in additions to Serverpod. They are disabled by default; enable them through the `experimentalFeatures` argument on the `Serverpod` constructor or via `config/generator.yaml`. :::note -To make the LSP server understand the usage of experimental flags and avoid complaints about unknown syntax on model files, configure experimental features in the `config/generator.yaml` file. See the [configuration documentation](./configuration#experimental-features) for more details. +To make the LSP server understand the usage of experimental flags and avoid complaints about unknown syntax on model files, configure experimental features in the `config/generator.yaml` file. See the [configuration documentation](../server-fundamentals/configuration#experimental-features) for more details. ::: ## Experimental internal APIs diff --git a/docs/06-concepts/07-operations/_category_.json b/docs/06-concepts/07-operations/_category_.json new file mode 100644 index 00000000..f4cef77c --- /dev/null +++ b/docs/06-concepts/07-operations/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Operations", + "collapsed": true +} diff --git a/docs/06-concepts/19-testing/01-get-started.md b/docs/06-concepts/08-testing/01-get-started.md similarity index 100% rename from docs/06-concepts/19-testing/01-get-started.md rename to docs/06-concepts/08-testing/01-get-started.md diff --git a/docs/06-concepts/19-testing/02-the-basics.md b/docs/06-concepts/08-testing/02-the-basics.md similarity index 100% rename from docs/06-concepts/19-testing/02-the-basics.md rename to docs/06-concepts/08-testing/02-the-basics.md diff --git a/docs/06-concepts/19-testing/03-advanced-examples.md b/docs/06-concepts/08-testing/03-advanced-examples.md similarity index 100% rename from docs/06-concepts/19-testing/03-advanced-examples.md rename to docs/06-concepts/08-testing/03-advanced-examples.md diff --git a/docs/06-concepts/19-testing/04-best-practises.md b/docs/06-concepts/08-testing/04-best-practises.md similarity index 100% rename from docs/06-concepts/19-testing/04-best-practises.md rename to docs/06-concepts/08-testing/04-best-practises.md diff --git a/docs/06-concepts/19-testing/_category_.json b/docs/06-concepts/08-testing/_category_.json similarity index 100% rename from docs/06-concepts/19-testing/_category_.json rename to docs/06-concepts/08-testing/_category_.json diff --git a/docs/06-concepts/_category_.json b/docs/06-concepts/_category_.json index a2ddc938..68be4679 100644 --- a/docs/06-concepts/_category_.json +++ b/docs/06-concepts/_category_.json @@ -1,5 +1,5 @@ { - "label": "Reference", + "label": "Concepts", "position": 7, "collapsed": true, "className": "sidebar-icon-reference" diff --git a/docs/06-concepts/cli/_category_.json b/docs/06-concepts/cli/_category_.json index 489f7fbd..b7a0983a 100644 --- a/docs/06-concepts/cli/_category_.json +++ b/docs/06-concepts/cli/_category_.json @@ -1,6 +1,5 @@ { "label": "CLI", - "position": 23, - "collapsed": true, - "className": "sidebar-icon-tools" + "position": 9, + "collapsed": true } diff --git a/docs/06-concepts/cli/_generated/cloud.md b/docs/06-concepts/cli/_generated/cloud.md index e69de29b..8b137891 100644 --- a/docs/06-concepts/cli/_generated/cloud.md +++ b/docs/06-concepts/cli/_generated/cloud.md @@ -0,0 +1 @@ + diff --git a/docs/06-concepts/lookups/_category_.json b/docs/06-concepts/lookups/_category_.json index 85c95a49..e5641ab3 100644 --- a/docs/06-concepts/lookups/_category_.json +++ b/docs/06-concepts/lookups/_category_.json @@ -1,6 +1,5 @@ { "label": "Lookups", - "position": 24, - "collapsed": true, - "className": "sidebar-icon-tools" + "position": 10, + "collapsed": true } diff --git a/docs/06-concepts/lookups/configuration-reference.md b/docs/06-concepts/lookups/configuration-reference.md index 6c4464f0..336b4357 100644 --- a/docs/06-concepts/lookups/configuration-reference.md +++ b/docs/06-concepts/lookups/configuration-reference.md @@ -4,7 +4,7 @@ description: Every Serverpod configuration option, covering run settings, server # Configuration reference -Every configuration option Serverpod's core library reads. Options come from three sources: environment variables, the `config/.yaml` files, and the `ServerpodConfig` Dart object. Environment variables override the YAML files, and the Dart object overrides both. For how to choose between them, see [Configuration](../configuration). +Every configuration option Serverpod's core library reads. Options come from three sources: environment variables, the `config/.yaml` files, and the `ServerpodConfig` Dart object. Environment variables override the YAML files, and the Dart object overrides both. For how to choose between them, see [Configuration](../server-fundamentals/configuration). ## Run options @@ -87,5 +87,5 @@ Options for `config/generator.yaml`, which configures `serverpod generate`. ## Related -- [Configuration](../configuration): how the three configuration sources work, run modes, secrets, and package types. -- [Running your server](../start-command): the run mode and files the server loads on start. +- [Configuration](../server-fundamentals/configuration): how the three configuration sources work, run modes, secrets, and package types. +- [Running your server](../server-fundamentals/running-your-server): the run mode and files the server loads on start. diff --git a/docs/06-concepts/lookups/model-reference.md b/docs/06-concepts/lookups/model-reference.md index 59c0b4f0..00c535e1 100644 --- a/docs/06-concepts/lookups/model-reference.md +++ b/docs/06-concepts/lookups/model-reference.md @@ -13,34 +13,34 @@ Every keyword available in a Serverpod model file, and whether it applies to a ` | [**properties**](../models#enhanced-enums-with-properties) | Defines custom properties for enhanced enums. | | | ✅ | | [**immutable**](../models#immutable-classes) | Boolean flag to generate an immutable class with final fields, equals operator, and hashCode. | ✅ | ✅ | | | [**serverOnly**](../models#limiting-visibility-of-a-generated-class) | Boolean flag if code generator only should create the code for the server. | ✅ | ✅ | ✅ | -| [**table**](../database/models) | A name for the database table, enables generation of database code. | ✅ | | | -| [**managedMigration**](../database/migrations#opt-out-of-migrations) | A boolean flag to opt out of the database migration system. | ✅ | | | +| [**table**](../data-and-the-database/database/tables) | A name for the database table, enables generation of database code. | ✅ | | | +| [**managedMigration**](../data-and-the-database/database/migrations#opt-out-of-migrations) | A boolean flag to opt out of the database migration system. | ✅ | | | | [**fields**](../models#class) | All fields in the generated class should be listed here. | ✅ | ✅ | | | [**type (fields)**](../models#class) | Denotes the data type for a field. | ✅ | ✅ | | | [**required**](../models#required-fields) | Makes the field as required. This keyword can only be used for **nullable** fields. | ✅ | ✅ | | | [**scope**](../models#limiting-visibility-of-a-generated-class) | Denotes the scope for a field. | ✅ | | | | [**jsonKey**](../models#json-key-aliasing) | Sets a custom key name for JSON serialization and deserialization. | ✅ | | | -| [**persist**](../database/models) | A boolean flag if the data should be stored in the database or not can be negated with `!persist` | ✅ | | | -| [**relation**](../database/relations/one-to-one) | Sets a relation between model files, requires a table name to be set. | ✅ | | | -| [**name**](../database/relations/one-to-one#bidirectional-relations) | Give a name to a relation to pair them. | ✅ | | | -| [**parent**](../database/relations/one-to-one#with-an-id-field) | Sets the parent table on a relation. | ✅ | | | -| [**field**](../database/relations/one-to-one#custom-foreign-key-field) | A manual specified foreign key field. | ✅ | | | -| [**onUpdate**](../database/relations/referential-actions) | Set the referential actions when updating data in the database. | ✅ | | | -| [**onDelete**](../database/relations/referential-actions) | Set the referential actions when deleting data in the database. | ✅ | | | -| [**optional**](../database/relations/one-to-one#optional-relation) | A boolean flag to make a relation optional. | ✅ | | | -| [**indexes**](../database/indexing) | Create indexes on your fields / columns. | ✅ | | | -| [**fields (index)**](../database/indexing) | List the fields to create the indexes on. | ✅ | | | -| [**type (index)**](../database/indexing) | The type of index to create. | ✅ | | | -| [**parameters (index)**](../database/indexing#vector-indexes) | Parameters for specialized index types like HNSW and IVFFLAT vector indexes. | ✅ | | | -| [**distanceFunction (index)**](../database/indexing#vector-indexes) | Distance function for vector indexes. Allowed values depend on the field's vector type and index type, see [vector indexes](../database/indexing#vector-indexes). | ✅ | | | -| [**unique**](../database/indexing) | Creates a unique index. | ✅ | | | +| [**persist**](../data-and-the-database/database/tables) | A boolean flag if the data should be stored in the database or not can be negated with `!persist` | ✅ | | | +| [**relation**](../data-and-the-database/database/relations/one-to-one) | Sets a relation between model files, requires a table name to be set. | ✅ | | | +| [**name**](../data-and-the-database/database/relations/one-to-one#bidirectional-relations) | Give a name to a relation to pair them. | ✅ | | | +| [**parent**](../data-and-the-database/database/relations/one-to-one#with-an-id-field) | Sets the parent table on a relation. | ✅ | | | +| [**field**](../data-and-the-database/database/relations/one-to-one#custom-foreign-key-field) | A manual specified foreign key field. | ✅ | | | +| [**onUpdate**](../data-and-the-database/database/relations/referential-actions) | Set the referential actions when updating data in the database. | ✅ | | | +| [**onDelete**](../data-and-the-database/database/relations/referential-actions) | Set the referential actions when deleting data in the database. | ✅ | | | +| [**optional**](../data-and-the-database/database/relations/one-to-one#optional-relation) | A boolean flag to make a relation optional. | ✅ | | | +| [**indexes**](../data-and-the-database/database/indexing) | Create indexes on your fields / columns. | ✅ | | | +| [**fields (index)**](../data-and-the-database/database/indexing) | List the fields to create the indexes on. | ✅ | | | +| [**type (index)**](../data-and-the-database/database/indexing) | The type of index to create. | ✅ | | | +| [**parameters (index)**](../data-and-the-database/database/indexing#vector-indexes) | Parameters for specialized index types like HNSW and IVFFLAT vector indexes. | ✅ | | | +| [**distanceFunction (index)**](../data-and-the-database/database/indexing#vector-indexes) | Distance function for vector indexes. Allowed values depend on the field's vector type and index type, see [vector indexes](../data-and-the-database/database/indexing#vector-indexes). | ✅ | | | +| [**unique**](../data-and-the-database/database/indexing) | Creates a unique index. | ✅ | | | | [**default**](../models#default-values) | Sets the default value for both the model and the database. This keyword cannot be used with **relation**. | ✅ | | | | [**defaultModel**](../models#default-values) | Sets the default value for the model side. This keyword cannot be used with **relation**. | ✅ | | | | [**defaultPersist**](../models#default-values) | Sets the default value for the database side. This keyword cannot be used with **relation** and **!persist**. | ✅ | | | -| [**extends**](../models/inheritance-and-polymorphism#extending-a-class) | Specifies a parent class to inherit from. | ✅ | ✅ | | -| [**sealed**](../models/inheritance-and-polymorphism#sealed-classes) | Boolean flag to create a sealed class hierarchy, enabling exhaustive type checking. | ✅ | | | +| [**extends**](../data-and-the-database/models/inheritance-and-polymorphism#extending-a-class) | Specifies a parent class to inherit from. | ✅ | ✅ | | +| [**sealed**](../data-and-the-database/models/inheritance-and-polymorphism#sealed-classes) | Boolean flag to create a sealed class hierarchy, enabling exhaustive type checking. | ✅ | | | ## Related - [Working with models](../models): how each keyword works, with examples. -- [Database tables](../database/models): the database-specific keywords (`table`, `relation`, `persist`, and indexing). +- [Database tables](../data-and-the-database/database/tables): the database-specific keywords (`table`, `relation`, `persist`, and indexing). diff --git a/docs/07-tutorials/02-real-time-communication.md b/docs/07-tutorials/02-real-time-communication.md index f5ebba62..d866b4bb 100644 --- a/docs/07-tutorials/02-real-time-communication.md +++ b/docs/07-tutorials/02-real-time-communication.md @@ -24,7 +24,7 @@ Pixorama is a collaborative drawing app where users can place pixels on a grid t In traditional REST APIs, communication with the server involves sending a request and receiving a response. However, real-time communication requires the server to push updates to clients as they happen. This is commonly achieved using web sockets, which maintain an open connection between the server and client, allowing for continuous data exchange. While web sockets can be tricky, requiring data serialization and connection management, Serverpod simplifies this process. -With the release of Serverpod 2.1, a new feature called [streaming methods](../../concepts/streams) was introduced. This feature allows us to return a stream from a server method and call it from our app. Serverpod handles the underlying web socket connection for us. Now, let's get started with building Pixorama. +With the release of Serverpod 2.1, a new feature called [streaming methods](../concepts/endpoints-and-apis/streaming) was introduced. This feature allows us to return a stream from a server method and call it from our app. Serverpod handles the underlying web socket connection for us. Now, let's get started with building Pixorama. ## Setting up the project diff --git a/docs/11-upgrading/01-upgrade-to-four.md b/docs/11-upgrading/01-upgrade-to-four.md index f3466c13..ef0b93f2 100644 --- a/docs/11-upgrading/01-upgrade-to-four.md +++ b/docs/11-upgrading/01-upgrade-to-four.md @@ -232,5 +232,5 @@ If something here didn't go as expected, reach out on the [community page](../su ## Related -- [Migrations](../concepts/database/migrations): how Serverpod's migration system works under the hood. +- [Migrations](../concepts/data-and-the-database/database/migrations): how Serverpod's migration system works under the hood. - [Build your first app](../get-started/creating-endpoints): the hands-on tour of the 4.0 workflow if you want to see `serverpod start` from scratch. diff --git a/docs/11-upgrading/02-archive/01-upgrade-to-one-point-two.md b/docs/11-upgrading/02-archive/01-upgrade-to-one-point-two.md index 970937fa..c772c386 100644 --- a/docs/11-upgrading/02-archive/01-upgrade-to-one-point-two.md +++ b/docs/11-upgrading/02-archive/01-upgrade-to-one-point-two.md @@ -146,7 +146,7 @@ fields: serverField: String, scope=serverOnly ``` -The keyword `parent` has been moved and should be placed inside the new `relation` keyword, see the section on [relations](../../concepts/database/relations/one-to-one) for the full new feature set. +The keyword `parent` has been moved and should be placed inside the new `relation` keyword, see the section on [relations](../../concepts/data-and-the-database/database/relations/one-to-one) for the full new feature set. Old syntax: diff --git a/docs/11-upgrading/02-archive/05-upgrade-to-pgvector.md b/docs/11-upgrading/02-archive/05-upgrade-to-pgvector.md index 4156eb99..b01037ed 100644 --- a/docs/11-upgrading/02-archive/05-upgrade-to-pgvector.md +++ b/docs/11-upgrading/02-archive/05-upgrade-to-pgvector.md @@ -68,7 +68,7 @@ $ serverpod create-migration $ dart run bin/main.dart --apply-migrations ``` -For more details on creating and applying migrations, see the [Migrations](../../concepts/database/migrations) page. +For more details on creating and applying migrations, see the [Migrations](../../concepts/data-and-the-database/database/migrations) page. The pgvector extension will be automatically enabled during the first migration that includes a vector column. diff --git a/docs/11-upgrading/02-archive/06-upgrade-to-three.md b/docs/11-upgrading/02-archive/06-upgrade-to-three.md index a5fff310..cc31fdd7 100644 --- a/docs/11-upgrading/02-archive/06-upgrade-to-three.md +++ b/docs/11-upgrading/02-archive/06-upgrade-to-three.md @@ -397,7 +397,7 @@ fields: The following APIs have been deprecated but will continue to work for the foreseeable future to maintain compatibility with older clients. They will be removed in a future major version: -- Legacy streaming endpoints → Use [streaming methods](/concepts/streams) for new code +- Legacy streaming endpoints → Use [streaming methods](../../concepts/endpoints-and-apis/streaming) for new code ## Other changes diff --git a/docs/11-upgrading/02-archive/07-streaming-endpoints.md b/docs/11-upgrading/02-archive/07-streaming-endpoints.md index ab14c7b5..a48d7ac9 100644 --- a/docs/11-upgrading/02-archive/07-streaming-endpoints.md +++ b/docs/11-upgrading/02-archive/07-streaming-endpoints.md @@ -5,7 +5,7 @@ description: The deprecated streaming endpoints API (streamOpened, handleStreamM # Streaming endpoints (deprecated) :::warning -Streaming endpoints are deprecated and will be removed in a future version of Serverpod. Use [streaming methods](../../concepts/streams#streaming-methods) instead for a simpler and more reliable streaming experience. This page is kept for projects still on the old API. +Streaming endpoints are deprecated and will be removed in a future version of Serverpod. Use [streaming methods](../../concepts/endpoints-and-apis/streaming#streaming-methods) instead for a simpler and more reliable streaming experience. This page is kept for projects still on the old API. ::: Streaming endpoints were Serverpod's first attempt at streaming data. This approach is more manual, requiring you to manage the WebSocket connection to the server. diff --git a/docs/11-upgrading/03-migrate-from-legacy-auth.md b/docs/11-upgrading/03-migrate-from-legacy-auth.md index e16186c0..3ba28f33 100644 --- a/docs/11-upgrading/03-migrate-from-legacy-auth.md +++ b/docs/11-upgrading/03-migrate-from-legacy-auth.md @@ -296,4 +296,4 @@ Reach out on the [community page](../support). - [Upgrade to 4.0](./upgrade-to-four): do this first. - [Authentication setup](../concepts/authentication/setup): modular configuration reference. -- [Database migrations](../concepts/database/migrations): creating and applying schema changes safely. +- [Database migrations](../concepts/data-and-the-database/database/migrations): creating and applying schema changes safely. diff --git a/docs/11-upgrading/04-upgrade-to-postgis.md b/docs/11-upgrading/04-upgrade-to-postgis.md index 308e19fb..ccb5678d 100644 --- a/docs/11-upgrading/04-upgrade-to-postgis.md +++ b/docs/11-upgrading/04-upgrade-to-postgis.md @@ -45,7 +45,7 @@ services: - _test_data:/var/lib/postgresql/data ``` -If your project also uses [vector fields](../concepts/models/vector-and-geography-fields), you need both pgvector and PostGIS. Create a custom `Dockerfile` instead: +If your project also uses [vector fields](../concepts/data-and-the-database/models/vector-and-geography-fields), you need both pgvector and PostGIS. Create a custom `Dockerfile` instead: ```dockerfile FROM pgvector/pgvector:pg16 @@ -99,7 +99,7 @@ $ serverpod create-migration $ dart run bin/main.dart --apply-migrations ``` -For more details on creating and applying migrations, see the [Migrations](../concepts/database/migrations) section. +For more details on creating and applying migrations, see the [Migrations](../concepts/data-and-the-database/database/migrations) section. The PostGIS extension will be automatically enabled during the first migration that includes a geography column. From eb8924739ef5b4862c758431022b424f5c8c6750 Mon Sep 17 00:00:00 2001 From: developerjamiu Date: Fri, 10 Jul 2026 15:59:24 +0100 Subject: [PATCH 2/2] docs: Realign the two Concepts index-page slugs to their group folders --- docs/04-get-started/03-how-it-works.md | 4 +-- .../01-creating-endpoints.md | 2 +- .../02-models-and-data.md | 2 +- .../03-working-with-the-database.md | 2 +- docs/05-build-your-first-app/04-deployment.md | 2 +- .../01-working-with-endpoints.md | 2 +- .../06-error-handling-and-exceptions.md | 2 +- .../01-models/01-working-with-models.md | 14 ++++---- .../01-models/06-backward-compatibility.md | 2 +- docs/06-concepts/06-scheduling/05-legacy.md | 2 +- docs/06-concepts/07-operations/02-logging.md | 2 +- docs/06-concepts/lookups/model-reference.md | 32 +++++++++---------- 12 files changed, 34 insertions(+), 34 deletions(-) diff --git a/docs/04-get-started/03-how-it-works.md b/docs/04-get-started/03-how-it-works.md index 0b292b43..a9d060b4 100644 --- a/docs/04-get-started/03-how-it-works.md +++ b/docs/04-get-started/03-how-it-works.md @@ -60,7 +60,7 @@ class ExampleEndpoint extends Endpoint { } ``` -The `Session` is the context for that one call, with access to the database, cache, signed-in user, and logging. Parameters and return types can be the built-in types (`bool`, `int`, `double`, `String`, `DateTime`, `Duration`, `Uri`, `UuidValue`, `BigInt`, `ByteData`), a `List`, `Map`, `Set`, or `Record` of those, or any data model you define. See [Working with endpoints](../concepts/working-with-endpoints) for more information. +The `Session` is the context for that one call, with access to the database, cache, signed-in user, and logging. Parameters and return types can be the built-in types (`bool`, `int`, `double`, `String`, `DateTime`, `Duration`, `Uri`, `UuidValue`, `BigInt`, `ByteData`), a `List`, `Map`, `Set`, or `Record` of those, or any data model you define. See [Working with endpoints](./concepts/endpoints-and-apis) for more information. ## Call it from your app @@ -83,7 +83,7 @@ fields: foundedDate: DateTime? ``` -When you generate code, this becomes a `Company` Dart class shared by the server and your app, so the same type flows from your endpoints into your Flutter widgets. Fields support the same types as endpoint methods, plus enums and nested models, and can be nullable. See [Working with models](../concepts/models) for the details. +When you generate code, this becomes a `Company` Dart class shared by the server and your app, so the same type flows from your endpoints into your Flutter widgets. Fields support the same types as endpoint methods, plus enums and nested models, and can be nullable. See [Working with models](./concepts/data-and-the-database/models) for the details. Add a `table` key to also store the model in a database table: diff --git a/docs/05-build-your-first-app/01-creating-endpoints.md b/docs/05-build-your-first-app/01-creating-endpoints.md index 9a07469d..e1222ed7 100644 --- a/docs/05-build-your-first-app/01-creating-endpoints.md +++ b/docs/05-build-your-first-app/01-creating-endpoints.md @@ -112,7 +112,7 @@ class RecipeEndpoint extends Endpoint { The endpoint reads your Gemini key from `session.passwords`, which Serverpod populates from the `passwords.yaml` file you edited earlier. :::info -Endpoint methods take a `Session` as their first parameter and return a typed `Future` or `Stream`. You can pass and return primitive types or any [model defined in a `.spy.yaml` file](../concepts/models). The class name's `Endpoint` suffix is dropped on the client, so `RecipeEndpoint` is called via `client.recipe`. See [How it works](../04-get-started/03-how-it-works.md) for how that call reaches the server. +Endpoint methods take a `Session` as their first parameter and return a typed `Future` or `Stream`. You can pass and return primitive types or any [model defined in a `.spy.yaml` file](../concepts/data-and-the-database/models). The class name's `Endpoint` suffix is dropped on the client, so `RecipeEndpoint` is called via `client.recipe`. See [How it works](../04-get-started/03-how-it-works.md) for how that call reaches the server. ::: Save the file. Because `serverpod start` is watching, it regenerates the client bindings for `generateRecipe` automatically. You'll see it run in the terminal. diff --git a/docs/05-build-your-first-app/02-models-and-data.md b/docs/05-build-your-first-app/02-models-and-data.md index 1dccb174..290ce5cd 100644 --- a/docs/05-build-your-first-app/02-models-and-data.md +++ b/docs/05-build-your-first-app/02-models-and-data.md @@ -34,7 +34,7 @@ fields: Save the file. `serverpod start` regenerates the `Recipe` class for both the server and the client. :::info -Fields can be primitive types, other models, or a typed `List`, `Map`, or `Set`. See [Working with models](../concepts/models) for the full set of options. +Fields can be primitive types, other models, or a typed `List`, `Map`, or `Set`. See [Working with models](../concepts/data-and-the-database/models) for the full set of options. ::: ## Return the model from your endpoint diff --git a/docs/05-build-your-first-app/03-working-with-the-database.md b/docs/05-build-your-first-app/03-working-with-the-database.md index 9abfbb63..40e07dfd 100644 --- a/docs/05-build-your-first-app/03-working-with-the-database.md +++ b/docs/05-build-your-first-app/03-working-with-the-database.md @@ -36,7 +36,7 @@ fields: Save the file. The regenerated `Recipe` class now exposes database methods through `Recipe.db`. :::info -See the [database models](../concepts/models#keywords-1) reference for all the keywords you can use in a table. +See the [database models](../concepts/data-and-the-database/models#keywords-1) reference for all the keywords you can use in a table. ::: ## Create and apply the migration diff --git a/docs/05-build-your-first-app/04-deployment.md b/docs/05-build-your-first-app/04-deployment.md index fb735dd5..70961a1c 100644 --- a/docs/05-build-your-first-app/04-deployment.md +++ b/docs/05-build-your-first-app/04-deployment.md @@ -54,4 +54,4 @@ You've built and deployed a full-stack app with Flutter and Serverpod: - Persistent storage with the database. - A Flutter app that talks to your server through the generated client. -We're excited to see what you'll build next. If you need help, join the [Discord community](https://serverpod.dev/discord) or ask in our [community on GitHub](https://github.com/serverpod/serverpod/discussions). To go deeper into any topic, browse the [Concepts](../concepts/working-with-endpoints) section. +We're excited to see what you'll build next. If you need help, join the [Discord community](https://serverpod.dev/discord) or ask in our [community on GitHub](https://github.com/serverpod/serverpod/discussions). To go deeper into any topic, browse the [Concepts](../concepts/endpoints-and-apis) section. diff --git a/docs/06-concepts/02-endpoints-and-apis/01-working-with-endpoints.md b/docs/06-concepts/02-endpoints-and-apis/01-working-with-endpoints.md index 2147b743..ae970d7b 100644 --- a/docs/06-concepts/02-endpoints-and-apis/01-working-with-endpoints.md +++ b/docs/06-concepts/02-endpoints-and-apis/01-working-with-endpoints.md @@ -1,5 +1,5 @@ --- -slug: /concepts/working-with-endpoints +slug: /concepts/endpoints-and-apis sidebar_label: Working with endpoints description: Endpoints expose server methods to a generated, typed client your Flutter app calls, with one client setup pointed at each environment. --- diff --git a/docs/06-concepts/02-endpoints-and-apis/06-error-handling-and-exceptions.md b/docs/06-concepts/02-endpoints-and-apis/06-error-handling-and-exceptions.md index 90f6d320..c455d3c2 100644 --- a/docs/06-concepts/02-endpoints-and-apis/06-error-handling-and-exceptions.md +++ b/docs/06-concepts/02-endpoints-and-apis/06-error-handling-and-exceptions.md @@ -104,7 +104,7 @@ The `SerializableException` interface marks the exception as safe to serialize t ### Default values in exceptions -Serverpod allows you to specify default values for fields in exceptions, similar to how it's done in models using the `default` and `defaultModel` keywords. If you're unfamiliar with how these keywords work, you can refer to the [Default Values](../models#default-values) section in the [Working with Models](../models) documentation. +Serverpod allows you to specify default values for fields in exceptions, similar to how it's done in models using the `default` and `defaultModel` keywords. If you're unfamiliar with how these keywords work, you can refer to the [Default Values](../data-and-the-database/models#default-values) section in the [Working with Models](../data-and-the-database/models) documentation. :::info Since exceptions are not persisted in the database, the `defaultPersist` keyword is not supported. If both `default` and `defaultModel` are specified, `defaultModel` will always take precedence, making it unnecessary to use both. diff --git a/docs/06-concepts/03-data-and-the-database/01-models/01-working-with-models.md b/docs/06-concepts/03-data-and-the-database/01-models/01-working-with-models.md index 5329fedc..3d62c9db 100644 --- a/docs/06-concepts/03-data-and-the-database/01-models/01-working-with-models.md +++ b/docs/06-concepts/03-data-and-the-database/01-models/01-working-with-models.md @@ -1,5 +1,5 @@ --- -slug: /concepts/models +slug: /concepts/data-and-the-database/models sidebar_label: Working with models description: Serverpod model files define serializable classes, exceptions, and enums, with fields, defaults, visibility, and generated Dart code. --- @@ -24,7 +24,7 @@ fields: employees: List ``` -Supported types are [bool](https://api.dart.dev/dart-core/bool-class.html), [int](https://api.dart.dev/dart-core/int-class.html), [double](https://api.dart.dev/dart-core/double-class.html), [String](https://api.dart.dev/dart-core/String-class.html), [Duration](https://api.dart.dev/dart-core/Duration-class.html), [DateTime](https://api.dart.dev/dart-core/DateTime-class.html), [ByteData](https://api.dart.dev/dart-typed_data/ByteData-class.html), [UuidValue](https://pub.dev/documentation/uuid/latest/uuid_value/UuidValue-class.html), [Uri](https://api.dart.dev/dart-core/Uri-class.html), [BigInt](https://api.dart.dev/dart-core/BigInt-class.html), [Vector](./data-and-the-database/models/vector-and-geography-fields#vector), [HalfVector](./data-and-the-database/models/vector-and-geography-fields#halfvector), [SparseVector](./data-and-the-database/models/vector-and-geography-fields#sparsevector), [Bit](./data-and-the-database/models/vector-and-geography-fields#bit), [GeographyPoint](./data-and-the-database/models/vector-and-geography-fields#geographypoint), [GeographyLineString](./data-and-the-database/models/vector-and-geography-fields#geographylinestring), [GeographyPolygon](./data-and-the-database/models/vector-and-geography-fields#geographypolygon), [GeographyGeometryCollection](./data-and-the-database/models/vector-and-geography-fields#geographygeometrycollection) and other serializable [classes](#class), [exceptions](#exception) and [enums](#enum). You can also use [List](https://api.dart.dev/dart-core/List-class.html)s, [Map](https://api.dart.dev/dart-core/Map-class.html)s and [Set](https://api.dart.dev/dart-core/Set-class.html)s of the supported types, just make sure to specify the types. All supported types can also be used inside [Record](https://api.dart.dev/dart-core/Record-class.html)s. Null safety is supported. Once your classes are generated, you can use them as parameters or return types to endpoint methods. +Supported types are [bool](https://api.dart.dev/dart-core/bool-class.html), [int](https://api.dart.dev/dart-core/int-class.html), [double](https://api.dart.dev/dart-core/double-class.html), [String](https://api.dart.dev/dart-core/String-class.html), [Duration](https://api.dart.dev/dart-core/Duration-class.html), [DateTime](https://api.dart.dev/dart-core/DateTime-class.html), [ByteData](https://api.dart.dev/dart-typed_data/ByteData-class.html), [UuidValue](https://pub.dev/documentation/uuid/latest/uuid_value/UuidValue-class.html), [Uri](https://api.dart.dev/dart-core/Uri-class.html), [BigInt](https://api.dart.dev/dart-core/BigInt-class.html), [Vector](./models/vector-and-geography-fields#vector), [HalfVector](./models/vector-and-geography-fields#halfvector), [SparseVector](./models/vector-and-geography-fields#sparsevector), [Bit](./models/vector-and-geography-fields#bit), [GeographyPoint](./models/vector-and-geography-fields#geographypoint), [GeographyLineString](./models/vector-and-geography-fields#geographylinestring), [GeographyPolygon](./models/vector-and-geography-fields#geographypolygon), [GeographyGeometryCollection](./models/vector-and-geography-fields#geographygeometrycollection) and other serializable [classes](#class), [exceptions](#exception) and [enums](#enum). You can also use [List](https://api.dart.dev/dart-core/List-class.html)s, [Map](https://api.dart.dev/dart-core/Map-class.html)s and [Set](https://api.dart.dev/dart-core/Set-class.html)s of the supported types, just make sure to specify the types. All supported types can also be used inside [Record](https://api.dart.dev/dart-core/Record-class.html)s. Null safety is supported. Once your classes are generated, you can use them as parameters or return types to endpoint methods. ### Required fields @@ -67,7 +67,7 @@ fields: ``` :::info -Serverpod's models can easily be saved to or read from the database. You can read more about this in the [Database](./data-and-the-database/database/tables) section. +Serverpod's models can easily be saved to or read from the database. You can read more about this in the [Database](./database/tables) section. ::: ### JSON key aliasing @@ -107,7 +107,7 @@ This is particularly helpful when: - Integrating with third-party services like MongoDB (e.g., mapping `id` to `_id`) :::info -The `jsonKey` property affects JSON serialization and deserialization. It does not affect the database column name. To customize the database column name, use the [`column` property](./data-and-the-database/database/tables#column-name-override) instead. +The `jsonKey` property affects JSON serialization and deserialization. It does not affect the database column name. To customize the database column name, use the [`column` property](./database/tables#column-name-override) instead. ::: ### Immutable classes @@ -149,7 +149,7 @@ print(user3.email); // alice@example.com ## Exception -The Serverpod models supports creating exceptions that can be thrown in endpoints by using the `exception` keyword. For more in-depth description on how to work with exceptions see [Error handling and exceptions](./endpoints-and-apis/error-handling-and-exceptions). +The Serverpod models supports creating exceptions that can be thrown in endpoints by using the `exception` keyword. For more in-depth description on how to work with exceptions see [Error handling and exceptions](../endpoints-and-apis/error-handling-and-exceptions). ```yaml exception: MyException @@ -327,7 +327,7 @@ The `copyWith` method generates a deep copy of an object, preserving all origina ### toJson / fromJson -The `toJson` and `fromJson` methods are generated on all models to help with serialization. Serverpod manages all serialization for you out of the box and you will rarely have to use these methods by your self. See the [Serialization](./data-and-the-database/models/custom-serialization) section for more info. +The `toJson` and `fromJson` methods are generated on all models to help with serialization. Serverpod manages all serialization for you out of the box and you will rarely have to use these methods by your self. See the [Serialization](./models/custom-serialization) section for more info. ### Custom methods @@ -521,4 +521,4 @@ fields: ## Keywords -For every keyword available in a model file, and whether it applies to a `class`, `exception`, or `enum`, see the [Model reference](lookups/model-reference). +For every keyword available in a model file, and whether it applies to a `class`, `exception`, or `enum`, see the [Model reference](../lookups/model-reference). diff --git a/docs/06-concepts/03-data-and-the-database/01-models/06-backward-compatibility.md b/docs/06-concepts/03-data-and-the-database/01-models/06-backward-compatibility.md index 67754c06..30fea06b 100644 --- a/docs/06-concepts/03-data-and-the-database/01-models/06-backward-compatibility.md +++ b/docs/06-concepts/03-data-and-the-database/01-models/06-backward-compatibility.md @@ -18,7 +18,7 @@ For polymorphic models, Serverpod can also deserialize an unknown subtype as its ## Managing breaking changes with endpoint inheritance -An [endpoint sub-class](/concepts/working-with-endpoints) can be useful when you have to make a breaking change to an entire endpoint but need to keep supporting existing clients. Doing so allows you to share most of its implementation with the old endpoint. +An [endpoint sub-class](../../endpoints-and-apis) can be useful when you have to make a breaking change to an entire endpoint but need to keep supporting existing clients. Doing so allows you to share most of its implementation with the old endpoint. Imagine you had a "team" management endpoint where before a user could join if they had an e-mail address ending in the expected domain, but now it should be opened up for anyone to join if they can provide an "invite code". Additionally, the return type (serialized classes) should be updated across the entire endpoint, which would not be allowed on the existing one. diff --git a/docs/06-concepts/06-scheduling/05-legacy.md b/docs/06-concepts/06-scheduling/05-legacy.md index 4d58eec3..87c2549e 100644 --- a/docs/06-concepts/06-scheduling/05-legacy.md +++ b/docs/06-concepts/06-scheduling/05-legacy.md @@ -8,7 +8,7 @@ description: The legacy string-based API for registering and scheduling future c This approach is error prone since it involves manually registering and scheduling future calls using string identifiers. The recommended way to interact with the future calls feature is through the [type-safe API](setup). ::: -To create a future call, extend the `FutureCall` class and override the `invoke` method. The method takes two params: the first is a [`Session`](../endpoints-and-apis/sessions) object and the second is an optional serializable model ([See models](../models)). +To create a future call, extend the `FutureCall` class and override the `invoke` method. The method takes two params: the first is a [`Session`](../endpoints-and-apis/sessions) object and the second is an optional serializable model ([See models](../data-and-the-database/models)). ```dart import 'package:serverpod/serverpod.dart'; diff --git a/docs/06-concepts/07-operations/02-logging.md b/docs/06-concepts/07-operations/02-logging.md index 1a06117a..047b09b9 100644 --- a/docs/06-concepts/07-operations/02-logging.md +++ b/docs/06-concepts/07-operations/02-logging.md @@ -51,7 +51,7 @@ sessionLogs: consoleEnabled: true # Logs are output to the console ``` -Duration strings for the cleanup interval and retention period use the same format as in [models](../models#supported-default-values): e.g. `30d`, `6h`, `1d 2h 30min`. +Duration strings for the cleanup interval and retention period use the same format as in [models](../data-and-the-database/models#supported-default-values): e.g. `30d`, `6h`, `1d 2h 30min`. ## Default behavior for session logs diff --git a/docs/06-concepts/lookups/model-reference.md b/docs/06-concepts/lookups/model-reference.md index 00c535e1..8952268c 100644 --- a/docs/06-concepts/lookups/model-reference.md +++ b/docs/06-concepts/lookups/model-reference.md @@ -4,22 +4,22 @@ description: Every keyword available in Serverpod model files, and which of clas # Model reference -Every keyword available in a Serverpod model file, and whether it applies to a `class`, `exception`, or `enum`. For how each one works, see [Working with models](../models). +Every keyword available in a Serverpod model file, and whether it applies to a `class`, `exception`, or `enum`. For how each one works, see [Working with models](../data-and-the-database/models). -| **Keyword** | Note | [class](../models#class) | [exception](../models#exception) | [enum](../models#enum) | +| **Keyword** | Note | [class](../data-and-the-database/models#class) | [exception](../data-and-the-database/models#exception) | [enum](../data-and-the-database/models#enum) | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------: | :------------------------------: | :--------------------: | -| [**values**](../models#enum) | A special key for enums with a list of all enum values. | | | ✅ | -| [**serialized**](../models#enum) | Sets the mode enums are serialized in | | | ✅ | -| [**properties**](../models#enhanced-enums-with-properties) | Defines custom properties for enhanced enums. | | | ✅ | -| [**immutable**](../models#immutable-classes) | Boolean flag to generate an immutable class with final fields, equals operator, and hashCode. | ✅ | ✅ | | -| [**serverOnly**](../models#limiting-visibility-of-a-generated-class) | Boolean flag if code generator only should create the code for the server. | ✅ | ✅ | ✅ | +| [**values**](../data-and-the-database/models#enum) | A special key for enums with a list of all enum values. | | | ✅ | +| [**serialized**](../data-and-the-database/models#enum) | Sets the mode enums are serialized in | | | ✅ | +| [**properties**](../data-and-the-database/models#enhanced-enums-with-properties) | Defines custom properties for enhanced enums. | | | ✅ | +| [**immutable**](../data-and-the-database/models#immutable-classes) | Boolean flag to generate an immutable class with final fields, equals operator, and hashCode. | ✅ | ✅ | | +| [**serverOnly**](../data-and-the-database/models#limiting-visibility-of-a-generated-class) | Boolean flag if code generator only should create the code for the server. | ✅ | ✅ | ✅ | | [**table**](../data-and-the-database/database/tables) | A name for the database table, enables generation of database code. | ✅ | | | | [**managedMigration**](../data-and-the-database/database/migrations#opt-out-of-migrations) | A boolean flag to opt out of the database migration system. | ✅ | | | -| [**fields**](../models#class) | All fields in the generated class should be listed here. | ✅ | ✅ | | -| [**type (fields)**](../models#class) | Denotes the data type for a field. | ✅ | ✅ | | -| [**required**](../models#required-fields) | Makes the field as required. This keyword can only be used for **nullable** fields. | ✅ | ✅ | | -| [**scope**](../models#limiting-visibility-of-a-generated-class) | Denotes the scope for a field. | ✅ | | | -| [**jsonKey**](../models#json-key-aliasing) | Sets a custom key name for JSON serialization and deserialization. | ✅ | | | +| [**fields**](../data-and-the-database/models#class) | All fields in the generated class should be listed here. | ✅ | ✅ | | +| [**type (fields)**](../data-and-the-database/models#class) | Denotes the data type for a field. | ✅ | ✅ | | +| [**required**](../data-and-the-database/models#required-fields) | Makes the field as required. This keyword can only be used for **nullable** fields. | ✅ | ✅ | | +| [**scope**](../data-and-the-database/models#limiting-visibility-of-a-generated-class) | Denotes the scope for a field. | ✅ | | | +| [**jsonKey**](../data-and-the-database/models#json-key-aliasing) | Sets a custom key name for JSON serialization and deserialization. | ✅ | | | | [**persist**](../data-and-the-database/database/tables) | A boolean flag if the data should be stored in the database or not can be negated with `!persist` | ✅ | | | | [**relation**](../data-and-the-database/database/relations/one-to-one) | Sets a relation between model files, requires a table name to be set. | ✅ | | | | [**name**](../data-and-the-database/database/relations/one-to-one#bidirectional-relations) | Give a name to a relation to pair them. | ✅ | | | @@ -34,13 +34,13 @@ Every keyword available in a Serverpod model file, and whether it applies to a ` | [**parameters (index)**](../data-and-the-database/database/indexing#vector-indexes) | Parameters for specialized index types like HNSW and IVFFLAT vector indexes. | ✅ | | | | [**distanceFunction (index)**](../data-and-the-database/database/indexing#vector-indexes) | Distance function for vector indexes. Allowed values depend on the field's vector type and index type, see [vector indexes](../data-and-the-database/database/indexing#vector-indexes). | ✅ | | | | [**unique**](../data-and-the-database/database/indexing) | Creates a unique index. | ✅ | | | -| [**default**](../models#default-values) | Sets the default value for both the model and the database. This keyword cannot be used with **relation**. | ✅ | | | -| [**defaultModel**](../models#default-values) | Sets the default value for the model side. This keyword cannot be used with **relation**. | ✅ | | | -| [**defaultPersist**](../models#default-values) | Sets the default value for the database side. This keyword cannot be used with **relation** and **!persist**. | ✅ | | | +| [**default**](../data-and-the-database/models#default-values) | Sets the default value for both the model and the database. This keyword cannot be used with **relation**. | ✅ | | | +| [**defaultModel**](../data-and-the-database/models#default-values) | Sets the default value for the model side. This keyword cannot be used with **relation**. | ✅ | | | +| [**defaultPersist**](../data-and-the-database/models#default-values) | Sets the default value for the database side. This keyword cannot be used with **relation** and **!persist**. | ✅ | | | | [**extends**](../data-and-the-database/models/inheritance-and-polymorphism#extending-a-class) | Specifies a parent class to inherit from. | ✅ | ✅ | | | [**sealed**](../data-and-the-database/models/inheritance-and-polymorphism#sealed-classes) | Boolean flag to create a sealed class hierarchy, enabling exhaustive type checking. | ✅ | | | ## Related -- [Working with models](../models): how each keyword works, with examples. +- [Working with models](../data-and-the-database/models): how each keyword works, with examples. - [Database tables](../data-and-the-database/database/tables): the database-specific keywords (`table`, `relation`, `persist`, and indexing).