diff --git a/docs/.vitepress/theme/components/DbToolsBundleDatabaseCompare.vue b/docs/.vitepress/theme/components/DbToolsBundleDatabaseCompare.vue new file mode 100644 index 00000000..5e19c13e --- /dev/null +++ b/docs/.vitepress/theme/components/DbToolsBundleDatabaseCompare.vue @@ -0,0 +1,188 @@ + + + + + diff --git a/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcher.vue b/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcher.vue index 26c2aeee..d781dfed 100644 --- a/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcher.vue +++ b/docs/.vitepress/theme/components/DbToolsBundleFlavorSwitcher.vue @@ -47,7 +47,7 @@ const id = Math.random().toString(36).substring(2, 6); - diff --git a/docs/content/index.md b/docs/content/index.md index db316b8b..1fedb586 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -45,3 +45,225 @@ features: link: /getting-started/database-vendors --- + +--- + +
+
+ + + +
+
+ +## Anonymize your database from a simple YAML configuration + +Map each column of each table you want to anonymize with +a specific anonymizer. + +```yaml [YAML] +account: + fisrt_name: firstname + last_name: lastname + email_address: + anonymizer: email + options: {domain: 'db-tools-bundle.org'} + hashed_password: password +``` + +[Learn more about anonymization](./anonymization/essentials) + +
+
+ + +
+
+ +## Enjoy full integration with Symfony & Laravel + +*DbToolsBundle* provides a bundle for Symfony and an +experimental package for Laravel. These integrations include +autoconfiguration of database connection. + +![](/symfony-laravel.svg) + + +[Learn more about Symfony integration](./getting-started/flavors#symfony) +[Learn more about Laravel integration](./getting-started/flavors#laravel) + +
+
+ +::: code-group +```php [Symfony (Doctrine entity)] +namespace App\Entity; + +use Doctrine\ORM\Mapping as ORM; +use MakinaCorpus\DbToolsBundle\Attribute\Anonymize; + +#[ORM\Entity()] +#[ORM\Table(name: 'customer')] +class Customer +{ + #[ORM\Column(length: 255)] + #[Anonymize(type: 'firstname')] + private ?string $firstName = null; + + #[ORM\Column(length: 255)] + #[Anonymize(type: 'lastname')] + private ?string $lastName = null; + + #[ORM\Column(length: 255)] + #[Anonymize(type: 'email')] + private ?string $emailAddress = null; + + #[ORM\Column(length: 255)] + #[Anonymize(type: 'password')] + private ?string $hashedPassword = null; +} +``` +```php [Laravel] + [ + 'first_name' => [ + 'anonymizer' => 'firstname' + ] + 'last_name' => [ + 'anonymizer' => 'lastname' + ] + 'email_address' => [ + 'anonymizer' => 'email' + ] + 'hashed_password' => [ + 'anonymizer' => 'password' + ] + ], +]; +``` +::: + +
+
+ +
+
+ +```yaml +services: + postgres: + environment: + POSTGRES_PASSWORD: password + POSTGRES_DB: db + POSTGRES_USER: db + ports: + - 5439:5432 + networks: + - site + + dbtools: // [!code ++] + image: makinacorpus/dbtoolsbundle:stable // [!code ++] + networks: // [!code ++] + - site // [!code ++] + volumes: // [!code ++] + - ./db_tools.config.yaml:/var/www/db_tools.config.yaml // [!code ++] + +networks: + site: +``` + +
+
+ +## Deploy an anonymization workflow on any CI/CD with our Docker image + +The Docker image unlocks the *DbToolsBundle* features for every DevOps teams. +Simply add our image to your `docker-compose.yaml`! + +![](/docker.svg) + +[Learn more about Docker image](./getting-started/flavors#docker) + +
+
+ + + + \ No newline at end of file diff --git a/docs/content/public/db-anonymized.png b/docs/content/public/db-anonymized.png new file mode 100644 index 00000000..154cbf64 Binary files /dev/null and b/docs/content/public/db-anonymized.png differ diff --git a/docs/content/public/db-plain.png b/docs/content/public/db-plain.png new file mode 100644 index 00000000..9af9ed5e Binary files /dev/null and b/docs/content/public/db-plain.png differ diff --git a/docs/content/public/docker.svg b/docs/content/public/docker.svg new file mode 100644 index 00000000..fcf044db --- /dev/null +++ b/docs/content/public/docker.svg @@ -0,0 +1,40 @@ + + + + + + diff --git a/docs/content/public/symfony-laravel.svg b/docs/content/public/symfony-laravel.svg new file mode 100644 index 00000000..139bd15d --- /dev/null +++ b/docs/content/public/symfony-laravel.svg @@ -0,0 +1,45 @@ + + + + + + +