Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEOS-146: added new docs table and rearranged docs layouts #565

Merged
merged 4 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/connections/mysql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /connections/mysql
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader
title="Mysql"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/connections/postgres.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /connections/postgres
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader
title="Postgres"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/connections/s3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /connections/s3
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader
title="S3"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/deploy/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /deploy/docker-compose
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader
title="Deploy with Docker Compose"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/deploy/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /deploy/intro
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader
title="Deploy Neosync"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/deploy/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /deploy/kubernetes
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader
title="Deploy on Kubernetes"
Expand Down
22 changes: 5 additions & 17 deletions docs/docs/overview/Introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,16 @@ hide_title: true
slug: /
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { HeroImage } from '@site/src/components/HomepageFeatures/HeroImage.tsx';
import { CustomCardList } from '@site/src/components/HomepageFeatures/CustomCardList.tsx';
import { CustomCard } from '@site/src/components/HomepageFeatures/CustomCard.tsx';
import {
PiArrowsSplitLight,
PiFlaskLight,
PiPlugsLight,
PiRocketLaunchLight,
} from 'react-icons/pi';
import { BsFunnel } from 'react-icons/bs';
import { FaSync } from 'react-icons/fa';
import { GrConnect } from 'react-icons/gr';
import {
LightningBoltIcon,
LayersIcon,
LightningBoltIcon,
LinkBreak1Icon,
StackIcon,
} from '@radix-ui/react-icons';
import { LuNetwork } from 'react-icons/lu';

<DocPageHeader title="Welcome to the Neosync Docs" />
import { CustomCard } from '@site/src/CustomComponents/CustomCard.tsx';
import { CustomCardList } from '@site/src/CustomComponents/CustomCardList.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';
<DocPageHeader title="Welcome to the Neosync Docs" />;

Neosync is an open-source, developer-first way to create safe, anonymized test data from production data and sync it across all environments for high-quality local, stage and CI testing.

Expand Down
3 changes: 1 addition & 2 deletions docs/docs/overview/platform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ hide_title: true
slug: /platform
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { HeroImage } from '@site/src/components/HomepageFeatures/HeroImage.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader title="Platform Overview" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/overview/use-cases/anonymization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: anonymization
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader title="Anonymization" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/overview/use-cases/replication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: replication
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader title="Replicate Data" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/overview/use-cases/subsetting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: subsetting
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader title="Subset Data" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/overview/use-cases/synthetic-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: synthetic-data
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader title="Synthetic Data" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/transformers/custom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /transformers/custom
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader title="Custom" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/transformers/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /transformers/introduction
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader title="Transformers" />

Expand Down
12 changes: 0 additions & 12 deletions docs/docs/transformers/pre-built/email.mdx

This file was deleted.

12 changes: 0 additions & 12 deletions docs/docs/transformers/pre-built/phone.mdx

This file was deleted.

12 changes: 0 additions & 12 deletions docs/docs/transformers/pre-built/ssn.mdx

This file was deleted.

93 changes: 93 additions & 0 deletions docs/docs/transformers/system/email.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: Email
id: email
hide_title: true
slug: /transformers/system/email
---

import { TransformerPageHeader } from '@site/src/CustomComponents/TransformerPageHeader.tsx';

import { DocsTable } from '@site/src/CustomComponents/DocsTable.tsx';

<TransformerPageHeader
title="Email"
type="string"
apiRef="https://github.com/nucleuscloud/neosync/blob/main/worker/internal/benthos/transformers/email.go"
/>

## Definition

The email transformer can anonymize an existing email address or completely generate a new one. An email is made up of three parts:

`<username>@<domain>.<top-level-domain>`

By default, the transformer randomizes the username, domain and top-level domain while always preserving the email format by retaining the @ and . characters.

For example, the following input value:
`[email protected]`

Would produce the following ouput value:
`[email protected]`

You can see we generated new privacy-safe values for the username and the domain. You can update this structure using the configurations below. Lastly, the email transformer takes in a `string` and returns a `string`.

## Configurations

Depending on your validations, you may want to configure the output email. The email transformer has the following configurations:

<DocsTable
headers={[
'Name',
'Description',
'Default',
'Example Input',
'Example Output',
]}
rowData={[
{
data: [
'PreserveDomain',
'Preserve Domain carries over the input domain to the output email address. This includes the domain and top-level domain.',
'false',
'[email protected]',
'[email protected]',
],
},
{
data: [
'PreserveLength',
'Preserve Length will ensure that the output email address is the same length as the input email address. This includes the domain as well.',
'false',
'[email protected]',
'[email protected]',
],
},
]}
/>

## Examples

There are several ways you can mix-and-match configurations to get different potential email formats. Here are some possible combinations:

<DocsTable
headers={[
'PreserveLength',
'PreserveDomain',
'Example Input',
'Example Output',
]}
rowData={[
{
data: ['false', 'true', '[email protected]', '[email protected]'],
},
{
data: ['true', 'false', '[email protected]', '[email protected]'],
},
{
data: ['true', 'true', '[email protected]', '[email protected]'],
},
{
data: ['false', 'false', '[email protected]', '[email protected]'],
},
]}
/>
12 changes: 12 additions & 0 deletions docs/docs/transformers/system/phone.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Phone
id: phone
hide_title: true
slug: /transformers/system/phone
---

import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader title="Phone" />

## More coming soon!
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
title: Physical Address
id: physical-address
hide_title: true
slug: /transformers/pre-built/physical-address
slug: /transformers/system/physical-address
---

import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader title="Physical Address" />

Expand Down
12 changes: 12 additions & 0 deletions docs/docs/transformers/system/ssn.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: SSN
id: ssn
hide_title: true
slug: /transformers/system/ssn
---

import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';

<DocPageHeader title="ssn" />

## More coming soon!
6 changes: 5 additions & 1 deletion docs/knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const config = {
'docusaurus.config.js',
'sidebars.js',
'static/sync-dark-mode.js',
'src/components/HomepageFeatures/**',
'src/**',
'src/theme/**',
],
ignoreDependencies: [
Expand All @@ -13,9 +13,13 @@ const config = {
'@radix-ui/react-icons',
'autoprefixer',
'postcss',
'node',
'@docusaurus/theme-classic',
'prism-react-renderer',
'react-icons',
'tailwindcss',
'class-variance-authority',
'tailwind-merge',
],
ignoreBinaries: [],
};
Expand Down
Loading