From b8162bb18705016e6af631bef83ede92ed269f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Poullain?= Date: Sun, 5 Nov 2023 11:14:05 +0100 Subject: [PATCH 1/2] [Docs] Fix MDX issues to upgrade to MDX v3 --- docs/docs/architecture/configuration.md | 108 +------------ docs/docs/databases/typeorm/introduction.md | 101 +----------- .../authentication-and-access-control/jwt.md | 18 --- .../password-management.md | 2 +- .../version-1.x/databases/typeorm.md | 11 +- .../configuration.md | 7 +- .../file-system/local-and-cloud-storage.md | 57 ------- .../file-system/upload-and-download-files.md | 67 -------- .../version-1.x/utilities/templating.md | 2 +- .../version-2.x/architecture/configuration.md | 105 +------------ .../version-3.x/architecture/configuration.md | 105 +------------ .../databases/typeorm/introduction.md | 148 +----------------- 12 files changed, 20 insertions(+), 711 deletions(-) diff --git a/docs/docs/architecture/configuration.md b/docs/docs/architecture/configuration.md index 26e4e73dac..e2e6ce7565 100644 --- a/docs/docs/architecture/configuration.md +++ b/docs/docs/architecture/configuration.md @@ -2,10 +2,6 @@ title: Configuration --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - In FoalTS, _configuration_ refers to any parameter that may vary between deploy environments (production, development, test, etc). It includes sensitive information, such as your database credentials, or simple settings, such as the server port. The framework encourages a **strict separation between configuration and code** and allows you to define your configuration in environment variables, in `.env` files and in files in the `config/` directory. @@ -27,27 +23,14 @@ The framework encourages a **strict separation between configuration and code** Configuration values are provided using configuration files in the `config/` directory. Several formats are supported: YAML, JSON and JS files. -*config/default.{yml|json|js}* - - - - +*config/default.yml* ```yaml settings: session: store: "@foal/typeorm" ``` - - - +*config/default.json* ```json { "settings": { @@ -58,9 +41,7 @@ settings: } ``` - - - +*config/default.js* ```javascript module.exports = { settings: { @@ -71,9 +52,6 @@ module.exports = { } ``` - - - > **YAML support** > > The use of YAML for configuration requires the installation of the package `yamljs`. @@ -102,28 +80,6 @@ Configuration values can also be set or overridden for a specific environment us All parameters under the keyword `settings` are reserved for the operation of the framework. You can assign values to those given in the documentation, but you cannot create new ones. - - - -```yaml -settings: - session: - store: "@foal/typeorm" - -customConfiguration: - message: hello world -``` - - - - ```json { "settings": { @@ -137,25 +93,6 @@ customConfiguration: } ``` - - - -```javascript -module.exports = { - settings: { - session: { - store: "@foal/typeorm" - } - }, - customConfiguration: { - message: "hello world" - } -} -``` - - - - ## Accessing Configuration Values The `Config` class provides two static methods `get` and `getOrThrow` for reading configuration values. @@ -226,26 +163,6 @@ The recommended approach to provide sensitive information to the application is JWT_SECRET="Ak0WcVcGuOoFuZ4oqF1tgqbW6dIAeSacIN6h7qEyJM8=" ``` - - - -```yaml -settings: - jwt: - secret: env(JWT_SECRET) - secretEncoding: base64 -``` - - - - ```json { "settings": { @@ -257,25 +174,6 @@ settings: } ``` - - - -```javascript -const { Env } = require('@foal/core'); - -module.exports = { - settings: { - jwt: { - secret: Env.get('JWT_SECRET'), - secretEncoding: 'base64' - } - } -} -``` - - - - If the same variable is provided both as environment variable and in the `.env` file, then the value of the environment variable is used. ### Deployment Environments diff --git a/docs/docs/databases/typeorm/introduction.md b/docs/docs/databases/typeorm/introduction.md index b16d964bd4..d2b60c4bb9 100644 --- a/docs/docs/databases/typeorm/introduction.md +++ b/docs/docs/databases/typeorm/introduction.md @@ -3,10 +3,6 @@ title: TypeORM sidebar_label: Introduction --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - *A simple model:* ```typescript import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'; @@ -78,33 +74,7 @@ Two packages are required to use TypeORM with FoalTS: npm install pg ``` -*config/default.{json|yml|js}* - - - - -```yaml -# ... - -database: - type: postgres - host: localhost - port: 5432 - username: root - password: password - database: my-db -``` - - - - +*config/default.json* ```json { // ... @@ -120,59 +90,13 @@ database: } ``` - - - -```javascript -module.exports = { - // ... - - database: { - type: "postgres", - host: "localhost", - port: 5432, - username: "root", - password: "password", - database: "my-db" - } -} -``` - - - - ### MySQL ```sh npm install mysql ``` -*config/default.{json|yml|js}* - - - - -```yaml -# ... - -database: - type: mysql - host: localhost - port: 3306 - username: root - password: password - database: my-db -``` - - - +*config/default.json* ```json { @@ -189,27 +113,6 @@ database: } ``` - - - -```javascript -module.exports = { - // ... - - database: { - type: "mysql", - host: "localhost", - port: 3306, - username: "root", - password: "password", - database: "my-db" - } -} -``` - - - - ## Configuration and Testing When running the command `npm run test` with the above configuration, FoalTS will try to retrieve the database configuration in this order: diff --git a/docs/versioned_docs/version-1.x/authentication-and-access-control/jwt.md b/docs/versioned_docs/version-1.x/authentication-and-access-control/jwt.md index 37cf3bd3f4..14b3e39bfc 100644 --- a/docs/versioned_docs/version-1.x/authentication-and-access-control/jwt.md +++ b/docs/versioned_docs/version-1.x/authentication-and-access-control/jwt.md @@ -355,16 +355,6 @@ By default, UTF-8 is used to encode the secret string into bytes when verifying Available encodings are listed [here](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings). -{% code-tabs %} -{% code-tabs-item title="YAML" %} -```yaml -settings: - jwt: - secretOrPublicKey: HEwh0TW7w6a5yUwIrpHilUqetAqTFAVSHx2rg6DWNtg= - secretEncoding: base64 -``` -{% endcode-tabs-item %} -{% code-tabs-item title="JSON" %} ```json { "settings": { @@ -375,14 +365,6 @@ settings: } } ``` -{% endcode-tabs-item %} -{% code-tabs-item title=".env or environment variables" %} -``` -SETTINGS_JWT_SECRET_OR_PUBLIC_KEY=HEwh0TW7w6a5yUwIrpHilUqetAqTFAVSHx2rg6DWNtg= -SETTINGS_JWT_SECRET_ENCODING=base64 -``` -{% endcode-tabs-item %} -{% endcode-tabs %} ## Store JWTs in a cookie diff --git a/docs/versioned_docs/version-1.x/authentication-and-access-control/password-management.md b/docs/versioned_docs/version-1.x/authentication-and-access-control/password-management.md index 7b4c75034e..60eb2a5b64 100644 --- a/docs/versioned_docs/version-1.x/authentication-and-access-control/password-management.md +++ b/docs/versioned_docs/version-1.x/authentication-and-access-control/password-management.md @@ -45,4 +45,4 @@ The `verifyPassword` takes three arguments: Promise ``` -> If you used the `parsePassword` function in previous versions of Foal (<0.7.0), you must pass the `legacy: true` option to `verifyPassword` and `hashPassword`. +> If you used the `parsePassword` function in previous versions of Foal (< 0.7.0), you must pass the `legacy: true` option to `verifyPassword` and `hashPassword`. diff --git a/docs/versioned_docs/version-1.x/databases/typeorm.md b/docs/versioned_docs/version-1.x/databases/typeorm.md index 91b2f396ee..4c28ff1ef7 100644 --- a/docs/versioned_docs/version-1.x/databases/typeorm.md +++ b/docs/versioned_docs/version-1.x/databases/typeorm.md @@ -120,8 +120,6 @@ module.exports = { With this configuration, database credentials can be provided in a YAML, a JSON or a `.env `configuration file or in environment variables. -{% code-tabs %} -{% code-tabs-item title="config/default.yml" %} ```yaml # ... @@ -132,8 +130,7 @@ database: password: password database: my-db ``` -{% endcode-tabs-item %} -{% code-tabs-item title="config/default.json" %} + ```json { // ... @@ -146,8 +143,7 @@ database: } } ``` -{% endcode-tabs-item %} -{% code-tabs-item title=".env or environment variables" %} + ```json DATABASE_HOST=localhost DATABASE_PORT=3306 @@ -155,8 +151,7 @@ DATABASE_USERNAME=root DATABASE_PASSWORD=password DATABASE_DATABASE=my-db ``` -{% endcode-tabs-item %} -{% endcode-tabs %} + ### MySQL / MariaDB diff --git a/docs/versioned_docs/version-1.x/deployment-and-environments/configuration.md b/docs/versioned_docs/version-1.x/deployment-and-environments/configuration.md index c4280b58ea..c17ae9e374 100644 --- a/docs/versioned_docs/version-1.x/deployment-and-environments/configuration.md +++ b/docs/versioned_docs/version-1.x/deployment-and-environments/configuration.md @@ -33,8 +33,6 @@ SETTINGS_CSRF_SECRET=YKvV281Z8nbkPowDLkMTTIrg Both formats, JSON and YAML, are supported. Choose the one that suits you the best. -{% code-tabs %} -{% code-tabs-item title="JSON" %} ```json { "port": 3001, @@ -55,8 +53,7 @@ Both formats, JSON and YAML, are supported. Choose the one that suits you the be } } ``` -{% endcode-tabs-item %} -{% code-tabs-item title="YAML" %} + ```yaml port: 3001 @@ -73,8 +70,6 @@ settings: database: database: './db.sqlite3' ``` -{% endcode-tabs-item %} -{% endcode-tabs %} > **YAML support** > diff --git a/docs/versioned_docs/version-1.x/file-system/local-and-cloud-storage.md b/docs/versioned_docs/version-1.x/file-system/local-and-cloud-storage.md index 4953f1249f..c6047589f0 100644 --- a/docs/versioned_docs/version-1.x/file-system/local-and-cloud-storage.md +++ b/docs/versioned_docs/version-1.x/file-system/local-and-cloud-storage.md @@ -37,17 +37,6 @@ settings: The name of the directory where the files are located is specified with the configuration key `settings.disk.local.directory`. -{% code-tabs %} -{% code-tabs-item title="YAML" %} -```yaml -settings: - disk: - driver: 'local' - local: - directory: 'uploaded' -``` -{% endcode-tabs-item %} -{% code-tabs-item title="JSON" %} ```json { "settings": { @@ -60,14 +49,6 @@ settings: } } ``` -{% endcode-tabs-item %} -{% code-tabs-item title=".env or environment variables" %} -``` -SETTINGS_DISK_DRIVER=local -SETTINGS_DISK_LOCAL_DIRECTORY=uploaded -``` -{% endcode-tabs-item %} -{% endcode-tabs %} ### AWS S3 @@ -81,20 +62,6 @@ The bucket name is specified with the `settings.disk.s3.bucket` configuration ke AWS credentials are specified with the configuration keys `settings.aws.accessKeyId` and `settings.aws.secretAccessKey` or using [AWS traditional techniques](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html). -{% code-tabs %} -{% code-tabs-item title="YAML" %} -```yaml -settings: - aws: - accessKeyId: xxx - secretAccessKey: yyy - disk: - driver: '@foal/aws-s3' - s3: - bucket: 'uploaded' -``` -{% endcode-tabs-item %} -{% code-tabs-item title="JSON" %} ```json { "settings": { @@ -111,14 +78,6 @@ settings: } } ``` -{% endcode-tabs-item %} -{% code-tabs-item title=".env or environment variables" %} -``` -SETTINGS_DISK_DRIVER=@foal/aws-s3 -SETTINGS_DISK_S3_BUCKET=uploaded -``` -{% endcode-tabs-item %} -{% endcode-tabs %} ### DigitalOcean @@ -270,15 +229,6 @@ If FoalTS does not support your favorite Cloud provider, you can also implement If you want to use it through the `Disk` service, you need to specify its path in the configuration (or to publish it as an npm package and specify the package name). The name of the exported class should be `ConcreteDisk`. -{% code-tabs %} -{% code-tabs-item title="YAML" %} -```yaml -settings: - disk: - driver: './app/services/my-disk.service' -``` -{% endcode-tabs-item %} -{% code-tabs-item title="JSON" %} ```json { "settings": { @@ -288,10 +238,3 @@ settings: } } ``` -{% endcode-tabs-item %} -{% code-tabs-item title=".env or environment variables" %} -``` -SETTINGS_DISK_DRIVER=./app/services/my-disk.service -``` -{% endcode-tabs-item %} -{% endcode-tabs %} diff --git a/docs/versioned_docs/version-1.x/file-system/upload-and-download-files.md b/docs/versioned_docs/version-1.x/file-system/upload-and-download-files.md index 5522381aac..ce548fc7b9 100644 --- a/docs/versioned_docs/version-1.x/file-system/upload-and-download-files.md +++ b/docs/versioned_docs/version-1.x/file-system/upload-and-download-files.md @@ -14,17 +14,6 @@ npm install @foal/storage Then specify in your configuration the file storage to be used and its settings. In this example, we will use the local file system with the `uploaded` directory (you must create it at the root of your project). -{% code-tabs %} -{% code-tabs-item title="YAML" %} -```yaml -settings: - disk: - driver: 'local' - local: - directory: 'uploaded' -``` -{% endcode-tabs-item %} -{% code-tabs-item title="JSON" %} ```json { "settings": { @@ -37,14 +26,6 @@ settings: } } ``` -{% endcode-tabs-item %} -{% code-tabs-item title=".env or environment variables" %} -``` -SETTINGS_DISK_DRIVER=local -SETTINGS_DISK_LOCAL_DIRECTORY=uploaded -``` -{% endcode-tabs-item %} -{% endcode-tabs %} ## File Uploads @@ -146,16 +127,6 @@ export class UserController { Optional settings can be provided in the configuration to limit the size or number of files uploaded. -{% code-tabs %} -{% code-tabs-item title="YAML" %} -```yaml -settings: - multipartRequests: - fileSizeLimit: 1024 - fileNumberLimit: 4 -``` -{% endcode-tabs-item %} -{% code-tabs-item title="JSON" %} ```json { "settings": { @@ -166,14 +137,6 @@ settings: } } ``` -{% endcode-tabs-item %} -{% code-tabs-item title=".env or environment variables" %} -``` -SETTINGS_MULTIPART_REQUESTS_FILE_SIZE_LIMIT=1024 -SETTINGS_MULTIPART_REQUESTS_FILE_NUMBER_LIMIT=4 -``` -{% endcode-tabs-item %} -{% endcode-tabs %} | Setting | Type | Description | | --- | --- | --- | @@ -313,14 +276,6 @@ Static files, such as HTML, CSS, images, and JavaScript, are served by default f If necessary, this directory can be modified using the configuration key `settings.staticPath`. -{% code-tabs %} -{% code-tabs-item title="YAML" %} -```yaml -settings: - staticPath: assets -``` -{% endcode-tabs-item %} -{% code-tabs-item title="JSON" %} ```json { "settings": { @@ -328,26 +283,11 @@ settings: } } ``` -{% endcode-tabs-item %} -{% code-tabs-item title=".env or environment variables" %} -``` -SETTINGS_STATIC_PATH=assets -``` -{% endcode-tabs-item %} -{% endcode-tabs %} ### Virtual prefix path In case you need to add a virtual prefix path to your static files, you can do so with the `staticPathPrefix` configuration key. -{% code-tabs %} -{% code-tabs-item title="YAML" %} -```yaml -settings: - staticPathPrefix: /static -``` -{% endcode-tabs-item %} -{% code-tabs-item title="JSON" %} ```json { "settings": { @@ -355,13 +295,6 @@ settings: } } ``` -{% endcode-tabs-item %} -{% code-tabs-item title=".env or environment variables" %} -``` -SETTINGS_STATIC_PATH_PREFIX=/static -``` -{% endcode-tabs-item %} -{% endcode-tabs %} *Example* | Static file | URL path with no prefix | URL path with the prefix `/static `| diff --git a/docs/versioned_docs/version-1.x/utilities/templating.md b/docs/versioned_docs/version-1.x/utilities/templating.md index 3a45428736..4c8f25bb15 100644 --- a/docs/versioned_docs/version-1.x/utilities/templating.md +++ b/docs/versioned_docs/version-1.x/utilities/templating.md @@ -187,4 +187,4 @@ render('./templates/login.html', { /* ... */ }, __dirname) ## The Legacy Package `@foal/ejs` -Previous versions of FoalTS ( - +*config/default.yml* ```yaml settings: @@ -45,8 +31,7 @@ settings: store: "@foal/typeorm" ``` - - +*config/default.json* ```json { @@ -58,8 +43,7 @@ settings: } ``` - - +*config/default.js* ```javascript module.exports = { @@ -71,9 +55,6 @@ module.exports = { } ``` - - - > **YAML support** > > The use of YAML for configuration requires the installation of the package `yamljs`. @@ -102,28 +83,6 @@ Configuration values can also be set or overridden for a specific environment us All parameters under the keyword `settings` are reserved for the operation of the framework. You can assign values to those given in the documentation, but you cannot create new ones. - - - -```yaml -settings: - session: - store: "@foal/typeorm" - -customConfiguration: - message: hello world -``` - - - - ```json { "settings": { @@ -137,25 +96,6 @@ customConfiguration: } ``` - - - -```javascript -module.exports = { - settings: { - session: { - store: "@foal/typeorm" - } - }, - customConfiguration: { - message: "hello world" - } -} -``` - - - - ## Accessing Configuration Values The `Config` class provides two static methods `get` and `getOrThrow` for reading configuration values. @@ -226,26 +166,6 @@ The recommended approach to provide sensitive information to the application is JWT_SECRET="Ak0WcVcGuOoFuZ4oqF1tgqbW6dIAeSacIN6h7qEyJM8=" ``` - - - -```yaml -settings: - jwt: - secret: env(JWT_SECRET) - secretEncoding: base64 -``` - - - - ```json { "settings": { @@ -257,25 +177,6 @@ settings: } ``` - - - -```javascript -const { Env } = require('@foal/core'); - -module.exports = { - settings: { - jwt: { - secret: Env.get('JWT_SECRET'), - secretEncoding: 'base64' - } - } -} -``` - - - - If the same variable is provided both as environment variable and in the `.env` file, then the value of the `.env` file is used. ### Deployment Environments diff --git a/docs/versioned_docs/version-3.x/architecture/configuration.md b/docs/versioned_docs/version-3.x/architecture/configuration.md index 26e4e73dac..17ba1a3cbc 100644 --- a/docs/versioned_docs/version-3.x/architecture/configuration.md +++ b/docs/versioned_docs/version-3.x/architecture/configuration.md @@ -2,10 +2,6 @@ title: Configuration --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - In FoalTS, _configuration_ refers to any parameter that may vary between deploy environments (production, development, test, etc). It includes sensitive information, such as your database credentials, or simple settings, such as the server port. The framework encourages a **strict separation between configuration and code** and allows you to define your configuration in environment variables, in `.env` files and in files in the `config/` directory. @@ -27,17 +23,7 @@ The framework encourages a **strict separation between configuration and code** Configuration values are provided using configuration files in the `config/` directory. Several formats are supported: YAML, JSON and JS files. -*config/default.{yml|json|js}* - - - +*config/default.yml* ```yaml settings: @@ -45,8 +31,7 @@ settings: store: "@foal/typeorm" ``` - - +*config/default.json* ```json { @@ -58,8 +43,7 @@ settings: } ``` - - +*config/default.js* ```javascript module.exports = { @@ -71,9 +55,6 @@ module.exports = { } ``` - - - > **YAML support** > > The use of YAML for configuration requires the installation of the package `yamljs`. @@ -102,28 +83,6 @@ Configuration values can also be set or overridden for a specific environment us All parameters under the keyword `settings` are reserved for the operation of the framework. You can assign values to those given in the documentation, but you cannot create new ones. - - - -```yaml -settings: - session: - store: "@foal/typeorm" - -customConfiguration: - message: hello world -``` - - - - ```json { "settings": { @@ -137,25 +96,6 @@ customConfiguration: } ``` - - - -```javascript -module.exports = { - settings: { - session: { - store: "@foal/typeorm" - } - }, - customConfiguration: { - message: "hello world" - } -} -``` - - - - ## Accessing Configuration Values The `Config` class provides two static methods `get` and `getOrThrow` for reading configuration values. @@ -226,26 +166,6 @@ The recommended approach to provide sensitive information to the application is JWT_SECRET="Ak0WcVcGuOoFuZ4oqF1tgqbW6dIAeSacIN6h7qEyJM8=" ``` - - - -```yaml -settings: - jwt: - secret: env(JWT_SECRET) - secretEncoding: base64 -``` - - - - ```json { "settings": { @@ -257,25 +177,6 @@ settings: } ``` - - - -```javascript -const { Env } = require('@foal/core'); - -module.exports = { - settings: { - jwt: { - secret: Env.get('JWT_SECRET'), - secretEncoding: 'base64' - } - } -} -``` - - - - If the same variable is provided both as environment variable and in the `.env` file, then the value of the environment variable is used. ### Deployment Environments diff --git a/docs/versioned_docs/version-3.x/databases/typeorm/introduction.md b/docs/versioned_docs/version-3.x/databases/typeorm/introduction.md index abb5d35873..467e59cec5 100644 --- a/docs/versioned_docs/version-3.x/databases/typeorm/introduction.md +++ b/docs/versioned_docs/version-3.x/databases/typeorm/introduction.md @@ -3,10 +3,6 @@ title: TypeORM sidebar_label: Introduction --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - *A simple model:* ```typescript import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'; @@ -79,32 +75,7 @@ Two packages are required to use TypeORM with FoalTS: npm install pg ``` -*config/default.{json|yml|js}* - - - - -```yaml -# ... - -database: - type: postgres - host: localhost - port: 5432 - username: root - password: password - database: my-db -``` - - - +*config/default.json* ```json { @@ -121,59 +92,13 @@ database: } ``` - - - -```javascript -module.exports = { - // ... - - database: { - type: "postgres", - host: "localhost", - port: 5432, - username: "root", - password: "password", - database: "my-db" - } -} -``` - - - - ### MySQL ```sh npm install mysql ``` -*config/default.{json|yml|js}* - - - - -```yaml -# ... - -database: - type: mysql - host: localhost - port: 3306 - username: root - password: password - database: my-db -``` - - - +*config/default.json* ```json { @@ -190,59 +115,13 @@ database: } ``` - - - -```javascript -module.exports = { - // ... - - database: { - type: "mysql", - host: "localhost", - port: 3306, - username: "root", - password: "password", - database: "my-db" - } -} -``` - - - - ### MariaDB ```sh npm install mysql ``` -*config/default.{json|yml|js}* - - - - -```yaml -# ... - -database: - type: mariadb - host: localhost - port: 3306 - username: root - password: password - database: my-db -``` - - - +*config/default.json* ```json { @@ -259,27 +138,6 @@ database: } ``` - - - -```javascript -module.exports = { - // ... - - database: { - type: "mariadb", - host: "localhost", - port: 3306, - username: "root", - password: "password", - database: "my-db" - } -} -``` - - - - ## Configuration and Testing When running the command `npm run test` with the above configuration, FoalTS will try to retrieve the database configuration in this order: From a861e0f40ea928e69f991668cd4102bf7c7f1e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Poullain?= Date: Sun, 5 Nov 2023 11:20:23 +0100 Subject: [PATCH 2/2] [Docs] Remove version-1.x prefix --- .../version-1.x-sidebars.json | 336 +++++++++++------- 1 file changed, 216 insertions(+), 120 deletions(-) diff --git a/docs/versioned_sidebars/version-1.x-sidebars.json b/docs/versioned_sidebars/version-1.x-sidebars.json index 0c4bc60599..cccb3c5eed 100644 --- a/docs/versioned_sidebars/version-1.x-sidebars.json +++ b/docs/versioned_sidebars/version-1.x-sidebars.json @@ -1,124 +1,220 @@ { "someSidebar": [ - "version-1.x/README", - { "type": "category", "label": "TUTORIALS", "collapsed": false, "items": [ - { "type": "category", "label": "Simple To-Do List", "items": [ - "version-1.x/tutorials/simple-todo-list/tuto-1-installation", - "version-1.x/tutorials/simple-todo-list/tuto-2-introduction", - "version-1.x/tutorials/simple-todo-list/tuto-3-the-todo-model", - "version-1.x/tutorials/simple-todo-list/tuto-4-the-shell-script-create-todo", - "version-1.x/tutorials/simple-todo-list/tuto-5-the-rest-api", - "version-1.x/tutorials/simple-todo-list/tuto-6-validation-and-sanitization", - "version-1.x/tutorials/simple-todo-list/tuto-7-unit-testing" - ]}, - { "type": "category", "label": "Multi-User To-Do List", "items": [ - "version-1.x/tutorials/multi-user-todo-list/tuto-1-Introduction", - "version-1.x/tutorials/multi-user-todo-list/tuto-2-the-user-and-todo-models", - "version-1.x/tutorials/multi-user-todo-list/tuto-3-the-shell-scripts", - "version-1.x/tutorials/multi-user-todo-list/tuto-5-auth-controllers-and-hooks", - "version-1.x/tutorials/multi-user-todo-list/tuto-6-todos-and-ownership", - "version-1.x/tutorials/multi-user-todo-list/tuto-7-the-signup-page", - "version-1.x/tutorials/multi-user-todo-list/tuto-8-e2e-testing-and-authentication" - ]}, - { "type": "category", "label": "MongoDB To-Do List", "items": [ - "version-1.x/tutorials/mongodb-todo-list/tuto-1-installation", - "version-1.x/tutorials/mongodb-todo-list/tuto-2-introduction", - "version-1.x/tutorials/mongodb-todo-list/tuto-3-the-todo-model", - "version-1.x/tutorials/mongodb-todo-list/tuto-4-the-shell-script-create-todo", - "version-1.x/tutorials/mongodb-todo-list/tuto-5-the-rest-api", - "version-1.x/tutorials/mongodb-todo-list/tuto-6-validation-and-sanitization", - "version-1.x/tutorials/mongodb-todo-list/tuto-7-unit-testing" - ]} - ]}, - { "type": "category", "label": "TOPIC GUIDES", "collapsed": false, "items": [ - { "type": "category", "label": "Architecture", "items": [ - "version-1.x/architecture/architecture-overview", - "version-1.x/architecture/controllers", - "version-1.x/architecture/services-and-dependency-injection", - "version-1.x/architecture/hooks", - "version-1.x/architecture/initialization" - ]}, - { "type": "category", "label": "Databases", "items": [ - "version-1.x/databases/typeorm", - "version-1.x/databases/create-models-and-queries", - "version-1.x/databases/generate-and-run-migrations", - "version-1.x/databases/mongodb", - "version-1.x/databases/using-another-orm" - ]}, - { "type": "category", "label": "Authentication & Access Control", "items": [ - "version-1.x/authentication-and-access-control/quick-start", - "version-1.x/authentication-and-access-control/user-class", - "version-1.x/authentication-and-access-control/password-management", - "version-1.x/authentication-and-access-control/session-tokens", - "version-1.x/authentication-and-access-control/jwt", - "version-1.x/authentication-and-access-control/social-auth", - "version-1.x/authentication-and-access-control/administrators-and-roles", - "version-1.x/authentication-and-access-control/groups-and-permissions" - ]}, - "version-1.x/validation-and-sanitization", - "version-1.x/serializing-and-deserializing", - { "type": "category", "label": "API", "items": [ - "version-1.x/api-section/rest-blueprints", - "version-1.x/api-section/openapi-and-swagger-ui", - "version-1.x/api-section/public-api-and-cors-requests", - "version-1.x/api-section/graphql" - ]}, - { "type": "category", "label": "Frontend Integration", "items": [ - "version-1.x/frontend-integration/single-page-applications", - "version-1.x/frontend-integration/angular-react-vue", - "version-1.x/frontend-integration/jsx-server-side-rendering", - "version-1.x/frontend-integration/nuxt.js" - ]}, - { "type": "category", "label": "File System", "items": [ - "version-1.x/file-system/local-and-cloud-storage", - "version-1.x/file-system/upload-and-download-files" - ]}, - { "type": "category", "label": "CLI & Development Environment", "items": [ - "version-1.x/development-environment/build-and-start-the-app", - "version-1.x/development-environment/create-and-run-scripts", - "version-1.x/development-environment/code-generation", - "version-1.x/development-environment/linting-and-code-style", - "version-1.x/development-environment/vscode" - ]}, - { "type": "category", "label": "Testing", "items": [ - "version-1.x/testing/introduction", - "version-1.x/testing/unit-testing", - "version-1.x/testing/e2e-testing" - ]}, - { "type": "category", "label": "Cloud", "items": [ - "version-1.x/cloud/aws-beanstalk", - "version-1.x/cloud/firebase" - ]}, - { "type": "category", "label": "Security", "items": [ - "version-1.x/security/http-headers-protection", - "version-1.x/security/csrf-protection", - "version-1.x/security/xss-protection" - ]}, - { "type": "category", "label": "Utilities", "items": [ - "version-1.x/utilities/templating", - "version-1.x/utilities/logging-and-debugging" - ]}, - { "type": "category", "label": "Cookbook", "items": [ - "version-1.x/cookbook/error-handling", - "version-1.x/cookbook/generate-tokens", - "version-1.x/cookbook/scheduling-jobs", - "version-1.x/cookbook/not-found-page", - "version-1.x/cookbook/request-body-size", - "version-1.x/cookbook/expressjs", - "version-1.x/cookbook/root-imports", - "version-1.x/cookbook/limit-repeated-requests" - ]}, - { "type": "category", "label": "Deployment & Environments", "items": [ - "version-1.x/deployment-and-environments/configuration", - "version-1.x/deployment-and-environments/ship-to-production" - ]} - ]}, - { "type": "category", "label": "Upgrading", "collapsed": false, "items": [ - { "type": "link", "label": "To v1", "href": "https://github.com/FoalTS/foal/releases/tag/v1.0.0" }, - { "type": "link", "label": "To v0.8", "href": "https://github.com/FoalTS/foal/releases/tag/v0.8.0" } - ]}, - { "type": "category", "label": "Community", "collapsed": false, "items": [ - { "type": "link", "label": "Awesome Foal", "href": "https://github.com/FoalTS/awesome-foalts" } - ]} + "README", + { + "type": "category", + "label": "TUTORIALS", + "collapsed": false, + "items": [ + { + "type": "category", + "label": "Simple To-Do List", + "items": [ + "tutorials/simple-todo-list/tuto-1-installation", + "tutorials/simple-todo-list/tuto-2-introduction", + "tutorials/simple-todo-list/tuto-3-the-todo-model", + "tutorials/simple-todo-list/tuto-4-the-shell-script-create-todo", + "tutorials/simple-todo-list/tuto-5-the-rest-api", + "tutorials/simple-todo-list/tuto-6-validation-and-sanitization", + "tutorials/simple-todo-list/tuto-7-unit-testing" + ] + }, + { + "type": "category", + "label": "Multi-User To-Do List", + "items": [ + "tutorials/multi-user-todo-list/tuto-1-Introduction", + "tutorials/multi-user-todo-list/tuto-2-the-user-and-todo-models", + "tutorials/multi-user-todo-list/tuto-3-the-shell-scripts", + "tutorials/multi-user-todo-list/tuto-5-auth-controllers-and-hooks", + "tutorials/multi-user-todo-list/tuto-6-todos-and-ownership", + "tutorials/multi-user-todo-list/tuto-7-the-signup-page", + "tutorials/multi-user-todo-list/tuto-8-e2e-testing-and-authentication" + ] + }, + { + "type": "category", + "label": "MongoDB To-Do List", + "items": [ + "tutorials/mongodb-todo-list/tuto-1-installation", + "tutorials/mongodb-todo-list/tuto-2-introduction", + "tutorials/mongodb-todo-list/tuto-3-the-todo-model", + "tutorials/mongodb-todo-list/tuto-4-the-shell-script-create-todo", + "tutorials/mongodb-todo-list/tuto-5-the-rest-api", + "tutorials/mongodb-todo-list/tuto-6-validation-and-sanitization", + "tutorials/mongodb-todo-list/tuto-7-unit-testing" + ] + } + ] + }, + { + "type": "category", + "label": "TOPIC GUIDES", + "collapsed": false, + "items": [ + { + "type": "category", + "label": "Architecture", + "items": [ + "architecture/architecture-overview", + "architecture/controllers", + "architecture/services-and-dependency-injection", + "architecture/hooks", + "architecture/initialization" + ] + }, + { + "type": "category", + "label": "Databases", + "items": [ + "databases/typeorm", + "databases/create-models-and-queries", + "databases/generate-and-run-migrations", + "databases/mongodb", + "databases/using-another-orm" + ] + }, + { + "type": "category", + "label": "Authentication & Access Control", + "items": [ + "authentication-and-access-control/quick-start", + "authentication-and-access-control/user-class", + "authentication-and-access-control/password-management", + "authentication-and-access-control/session-tokens", + "authentication-and-access-control/jwt", + "authentication-and-access-control/social-auth", + "authentication-and-access-control/administrators-and-roles", + "authentication-and-access-control/groups-and-permissions" + ] + }, + "validation-and-sanitization", + "serializing-and-deserializing", + { + "type": "category", + "label": "API", + "items": [ + "api-section/rest-blueprints", + "api-section/openapi-and-swagger-ui", + "api-section/public-api-and-cors-requests", + "api-section/graphql" + ] + }, + { + "type": "category", + "label": "Frontend Integration", + "items": [ + "frontend-integration/single-page-applications", + "frontend-integration/angular-react-vue", + "frontend-integration/jsx-server-side-rendering", + "frontend-integration/nuxt.js" + ] + }, + { + "type": "category", + "label": "File System", + "items": [ + "file-system/local-and-cloud-storage", + "file-system/upload-and-download-files" + ] + }, + { + "type": "category", + "label": "CLI & Development Environment", + "items": [ + "development-environment/build-and-start-the-app", + "development-environment/create-and-run-scripts", + "development-environment/code-generation", + "development-environment/linting-and-code-style", + "development-environment/vscode" + ] + }, + { + "type": "category", + "label": "Testing", + "items": [ + "testing/introduction", + "testing/unit-testing", + "testing/e2e-testing" + ] + }, + { + "type": "category", + "label": "Cloud", + "items": [ + "cloud/aws-beanstalk", + "cloud/firebase" + ] + }, + { + "type": "category", + "label": "Security", + "items": [ + "security/http-headers-protection", + "security/csrf-protection", + "security/xss-protection" + ] + }, + { + "type": "category", + "label": "Utilities", + "items": [ + "utilities/templating", + "utilities/logging-and-debugging" + ] + }, + { + "type": "category", + "label": "Cookbook", + "items": [ + "cookbook/error-handling", + "cookbook/generate-tokens", + "cookbook/scheduling-jobs", + "cookbook/not-found-page", + "cookbook/request-body-size", + "cookbook/expressjs", + "cookbook/root-imports", + "cookbook/limit-repeated-requests" + ] + }, + { + "type": "category", + "label": "Deployment & Environments", + "items": [ + "deployment-and-environments/configuration", + "deployment-and-environments/ship-to-production" + ] + } + ] + }, + { + "type": "category", + "label": "Upgrading", + "collapsed": false, + "items": [ + { + "type": "link", + "label": "To v1", + "href": "https://github.com/FoalTS/foal/releases/tag/v1.0.0" + }, + { + "type": "link", + "label": "To v0.8", + "href": "https://github.com/FoalTS/foal/releases/tag/v0.8.0" + } + ] + }, + { + "type": "category", + "label": "Community", + "collapsed": false, + "items": [ + { + "type": "link", + "label": "Awesome Foal", + "href": "https://github.com/FoalTS/awesome-foalts" + } + ] + } ] } \ No newline at end of file