Skip to content

Commit af8f94d

Browse files
docs: Group Concepts into eight sections and rename the section to Concepts (#682)
1 parent 98a2504 commit af8f94d

162 files changed

Lines changed: 167 additions & 156 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/04-get-started/02-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ If you are using Cursor, you will need to **enable the Serverpod and Dart MCP se
7070

7171
## Start the server and the app
7272

73-
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:
73+
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:
7474

7575
```bash
7676
$ serverpod start

docs/04-get-started/03-how-it-works.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Serverpod is a full backend. It manages your database, authentication, file uplo
1515

1616
A Serverpod project starts with the `serverpod create` command, which walks you through a few choices that shape what it generates:
1717

18-
- **Project type:** A full server, or a reusable [module](../concepts/modules) shared across servers.
18+
- **Project type:** A full server, or a reusable [module](./concepts/server-fundamentals/modules) shared across servers.
1919
- **Database and caching:** Add a Postgres database and Redis (for pub/sub and caching).
2020
- **Authentication:** Built-in email and social sign-ins.
2121
- **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
5050

5151
## Write an endpoint
5252

53-
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`:
53+
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`:
5454

5555
```dart
5656
class ExampleEndpoint extends Endpoint {
@@ -60,7 +60,7 @@ class ExampleEndpoint extends Endpoint {
6060
}
6161
```
6262

63-
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.
63+
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.
6464

6565
## Call it from your app
6666

@@ -70,7 +70,7 @@ On the app side, the generated client turns each endpoint method into what looks
7070
final greeting = await client.example.hello('World');
7171
```
7272

73-
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.
73+
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.
7474

7575
## Define your data models
7676

@@ -83,7 +83,7 @@ fields:
8383
foundedDate: DateTime?
8484
```
8585
86-
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.
86+
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.
8787

8888
Add a `table` key to also store the model in a database table:
8989

@@ -106,7 +106,7 @@ These run on the same `session` your endpoint method receives. When you change a
106106

107107
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.
108108

109-
See [Working with the database](../concepts/database/crud) for building queries, relations, and transactions.
109+
See [Working with the database](./concepts/data-and-the-database/database/crud) for building queries, relations, and transactions.
110110

111111
## Build with an AI agent
112112

docs/05-build-your-first-app/01-creating-endpoints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class RecipeEndpoint extends Endpoint {
112112
The endpoint reads your Gemini key from `session.passwords`, which Serverpod populates from the `passwords.yaml` file you edited earlier.
113113

114114
:::info
115-
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.
115+
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.
116116
:::
117117

118118
Save the file. Because `serverpod start` is watching, it regenerates the client bindings for `generateRecipe` automatically. You'll see it run in the terminal.

docs/05-build-your-first-app/02-models-and-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fields:
3434
Save the file. `serverpod start` regenerates the `Recipe` class for both the server and the client.
3535

3636
:::info
37-
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.
37+
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.
3838
:::
3939

4040
## Return the model from your endpoint

docs/05-build-your-first-app/03-working-with-the-database.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ fields:
3636
Save the file. The regenerated `Recipe` class now exposes database methods through `Recipe.db`.
3737

3838
:::info
39-
See the [database models](../06-concepts/02-models/01-models.md#keywords-1) reference for all the keywords you can use in a table.
39+
See the [database models](../concepts/data-and-the-database/models#keywords-1) reference for all the keywords you can use in a table.
4040
:::
4141

4242
## Create and apply the migration
4343

44-
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:
44+
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:
4545

4646
![serverpod start tui](/img/getting-started/tui-logs.png)
4747

@@ -77,7 +77,7 @@ Add a second method to the endpoint that returns every saved recipe, newest firs
7777
```
7878

7979
:::info
80-
`insertRow` and `find` are Serverpod's typed database methods. See [CRUD](../06-concepts/06-database/05-crud.md) for the full set of operations.
80+
`insertRow` and `find` are Serverpod's typed database methods. See [CRUD](../concepts/data-and-the-database/database/crud) for the full set of operations.
8181
:::
8282

8383
## Show the saved recipes in your app

docs/05-build-your-first-app/04-deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ You've built and deployed a full-stack app with Flutter and Serverpod:
5454
- Persistent storage with the database.
5555
- A Flutter app that talks to your server through the generated client.
5656

57-
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.
57+
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.

docs/06-concepts/00-start-command.md renamed to docs/06-concepts/01-server-fundamentals/01-running-your-server.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Run it from anywhere inside your project folder:
1212
serverpod start
1313
```
1414

15-
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).
15+
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).
1616

1717
## Save a file to hot-reload
1818

@@ -28,7 +28,7 @@ On boot, `serverpod start` applies any pending migrations. While it runs, you ha
2828
- **A** applies pending migrations to the database.
2929
- **P** creates a repair migration to reconcile a database that has drifted from your migrations.
3030

31-
For how migrations work, see [Migrations](database/migrations).
31+
For how migrations work, see [Migrations](../data-and-the-database/database/migrations).
3232

3333
## Choose a run mode
3434

@@ -52,6 +52,6 @@ You can still launch an app on demand from the terminal afterwards. To run witho
5252

5353
## Related
5454

55-
- [`serverpod start` reference](cli/commands/start): every command-line option.
55+
- [`serverpod start` reference](../cli/commands/start): every command-line option.
5656
- [Configuration](configuration): the run modes and files the server loads on start.
57-
- [Deploy to Serverpod Cloud](../08-deployments/01-deploy-to-serverpod-cloud.md): run your server in production instead of locally.
57+
- [Deploy to Serverpod Cloud](../../deployments/deploy-to-serverpod-cloud): run your server in production instead of locally.

docs/06-concepts/07-configuration.md renamed to docs/06-concepts/01-server-fundamentals/02-configuration.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The three sources apply in order of precedence. The YAML files are the baseline,
1616
- **Environment variables**: override matching YAML values, useful for per-deployment settings and secrets.
1717
- **Dart configuration object**: a `ServerpodConfig` passed to the `Serverpod` constructor, overriding everything else.
1818

19-
For every available option, its environment variable, config-file key, and default, see the [Configuration reference](lookups/configuration-reference).
19+
For every available option, its environment variable, config-file key, and default, see the [Configuration reference](../lookups/configuration-reference).
2020

2121
## Configuration files
2222

@@ -166,8 +166,8 @@ The following table shows the built-in secrets that Serverpod uses for its core
166166

167167
For secrets related to first-party Serverpod packages, see their respective documentation:
168168

169-
- **Cloud storage**: see [Uploading files](file-uploads) for Google Cloud Storage, AWS S3, and Cloudflare R2 secrets.
170-
- **Authentication**: see [Storing Secrets](authentication/setup#storing-secrets) on the Authentication setup page.
169+
- **Cloud storage**: see [Uploading files](../endpoints-and-apis/file-uploads) for Google Cloud Storage, AWS S3, and Cloudflare R2 secrets.
170+
- **Authentication**: see [Storing Secrets](../authentication/setup#storing-secrets) on the Authentication setup page.
171171

172172
### Custom secrets
173173

@@ -213,7 +213,7 @@ export SERVERPOD_PASSWORD_stripeApiKey=sk_test_123...
213213

214214
Secrets are only available on the server. They are never sent to or accessible from your Flutter app.
215215

216-
Inside an endpoint, read a secret from the [`Session`](sessions) through the `passwords` map:
216+
Inside an endpoint, read a secret from the [`Session`](../endpoints-and-apis/sessions) through the `passwords` map:
217217

218218
```dart
219219
Future<void> 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.
253253

254254
Serverpod uses a `generator.yaml` file to configure code generation. Place this file in the `config` directory of your server project.
255255

256-
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.
256+
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.
257257

258258
### Package types
259259

@@ -287,7 +287,7 @@ Test tools for integration testing are generated by default at `test/integration
287287
# server_test_tools_path: test/integration/test_tools
288288
```
289289

290-
See the [testing documentation](testing/get-started) for more details.
290+
See the [testing documentation](../testing/get-started) for more details.
291291

292292
### Module dependencies
293293

@@ -313,7 +313,7 @@ shared_packages:
313313
- ../another_shared_package
314314
```
315315

316-
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.
316+
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.
317317

318318
### Custom serializable classes
319319

@@ -325,7 +325,7 @@ extraClasses:
325325
- package:my_shared_package/my_shared_package.dart:AnotherCustomClass
326326
```
327327

328-
See the [serialization documentation](serialization) for implementing custom serializable classes.
328+
See the [serialization documentation](../data-and-the-database/models/custom-serialization) for implementing custom serializable classes.
329329

330330
### Features
331331

@@ -345,7 +345,7 @@ experimental_features:
345345
all: true # Enables all available experimental features
346346
```
347347

348-
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.
348+
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.
349349

350350
:::warning
351351
Experimental features may change or be removed in future versions.

docs/06-concepts/10-modules.md renamed to docs/06-concepts/01-server-fundamentals/03-modules.md

File renamed without changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Server fundamentals",
3+
"collapsed": true
4+
}

0 commit comments

Comments
 (0)