The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Improved user guide, added CI vale for docs (#2308)
Nimra Ahmed2221c68dff56
diff --git a/.github/SECURITY.md b/.github/SECURITY.mdindex feabe65380b..bc3ef6e1329 100644--- a/.github/SECURITY.md+++ b/.github/SECURITY.md@@ -22,7 +22,7 @@ While we don't currently have a formal bug bounty program due to the project's n## Security FeaturesWe are always looking for ways to improve our product's security.-If you have any recommendations or feature request that could enhance the product's security, we invite you to share them with us via the dicsussion forum.+If you have any recommendations or feature request that could enhance the product's security, we invite you to share them with us via the discussion forum.⚠️ Note this does not apply to security vulnerabilities. If you're in doubt, then always follow the security vulnerability processdiff --git a/docs/vale/styles/docs/Acronyms.yml b/.github/styles/docs/Acronyms.ymlsimilarity index 94%rename from docs/vale/styles/docs/Acronyms.ymlrename to .github/styles/docs/Acronyms.ymlindex 5a9553ee259..9244fa9b5aa 100644--- a/docs/vale/styles/docs/Acronyms.yml+++ b/.github/styles/docs/Acronyms.yml@@ -12,6 +12,8 @@ exceptions:- ASP- CLI- CPU+ - CMS+ - CRM- CSS- CSV- DEBUG@@ -22,6 +24,7 @@ exceptions:- GDB- GET- GPU+ - GQL- GTK- GUI- HTML@@ -36,6 +39,7 @@ exceptions:- NET- NOTE- NVDA+ - ORM- OSS- PATH@@ -58,6 +62,7 @@ exceptions:- URL- USB- UTF+ - WSL- XML- XSS- YAMLdiff --git a/docs/vale/styles/docs/ComplexWords.yml b/.github/styles/docs/ComplexWords.ymlsimilarity index 100%rename from docs/vale/styles/docs/ComplexWords.ymlrename to .github/styles/docs/ComplexWords.ymldiff --git a/docs/vale/styles/docs/Contractions.yml b/.github/styles/docs/Contractions.ymlsimilarity index 100%rename from docs/vale/styles/docs/Contractions.ymlrename to .github/styles/docs/Contractions.ymldiff --git a/docs/vale/styles/docs/FirstPerson.yml b/.github/styles/docs/FirstPerson.ymlsimilarity index 100%rename from docs/vale/styles/docs/FirstPerson.ymlrename to .github/styles/docs/FirstPerson.ymldiff --git a/docs/vale/styles/docs/Foreign.yml b/.github/styles/docs/Foreign.ymlsimilarity index 100%rename from docs/vale/styles/docs/Foreign.ymlrename to .github/styles/docs/Foreign.ymldiff --git a/docs/vale/styles/docs/Gender.yml b/.github/styles/docs/Gender.ymlsimilarity index 100%rename from docs/vale/styles/docs/Gender.ymlrename to .github/styles/docs/Gender.ymldiff --git a/docs/vale/styles/docs/HeadingColons.yml b/.github/styles/docs/HeadingColons.ymlsimilarity index 100%rename from docs/vale/styles/docs/HeadingColons.ymlrename to .github/styles/docs/HeadingColons.ymldiff --git a/docs/vale/styles/docs/HeadingPunctuation.yml b/.github/styles/docs/HeadingPunctuation.ymlsimilarity index 100%rename from docs/vale/styles/docs/HeadingPunctuation.ymlrename to .github/styles/docs/HeadingPunctuation.ymldiff --git a/docs/vale/styles/docs/Npm2Yarn.yml b/.github/styles/docs/Npm2Yarn.ymlsimilarity index 100%rename from docs/vale/styles/docs/Npm2Yarn.ymlrename to .github/styles/docs/Npm2Yarn.ymldiff --git a/docs/vale/styles/docs/NpmCommands.yml b/.github/styles/docs/NpmCommands.ymlsimilarity index 100%rename from docs/vale/styles/docs/NpmCommands.ymlrename to .github/styles/docs/NpmCommands.ymldiff --git a/docs/vale/styles/docs/NpmGlobal.yml b/.github/styles/docs/NpmGlobal.ymlsimilarity index 100%rename from docs/vale/styles/docs/NpmGlobal.ymlrename to .github/styles/docs/NpmGlobal.ymldiff --git a/docs/vale/styles/docs/Numbers.yml b/.github/styles/docs/Numbers.ymlsimilarity index 100%rename from docs/vale/styles/docs/Numbers.ymlrename to .github/styles/docs/Numbers.ymldiff --git a/docs/vale/styles/docs/Ordinal.yml b/.github/styles/docs/Ordinal.ymlsimilarity index 100%rename from docs/vale/styles/docs/Ordinal.ymlrename to .github/styles/docs/Ordinal.ymldiff --git a/docs/vale/styles/docs/Our.yml b/.github/styles/docs/Our.ymlsimilarity index 100%rename from docs/vale/styles/docs/Our.ymlrename to .github/styles/docs/Our.ymldiff --git a/docs/vale/styles/docs/OxfordComma.yml b/.github/styles/docs/OxfordComma.ymlsimilarity index 100%rename from docs/vale/styles/docs/OxfordComma.ymlrename to .github/styles/docs/OxfordComma.ymldiff --git a/docs/vale/styles/docs/Passive.yml b/.github/styles/docs/Passive.ymlsimilarity index 100%rename from docs/vale/styles/docs/Passive.ymlrename to .github/styles/docs/Passive.ymldiff --git a/docs/vale/styles/docs/Percentages.yml b/.github/styles/docs/Percentages.ymlsimilarity index 100%rename from docs/vale/styles/docs/Percentages.ymlrename to .github/styles/docs/Percentages.ymldiff --git a/docs/vale/styles/docs/SentenceLength.yml b/.github/styles/docs/SentenceLength.ymlsimilarity index 100%rename from docs/vale/styles/docs/SentenceLength.ymlrename to .github/styles/docs/SentenceLength.ymldiff --git a/docs/vale/styles/docs/Spacing.yml b/.github/styles/docs/Spacing.ymlsimilarity index 100%rename from docs/vale/styles/docs/Spacing.ymlrename to .github/styles/docs/Spacing.ymldiff --git a/docs/vale/styles/docs/Terms.yml b/.github/styles/docs/Terms.ymlsimilarity index 100%rename from docs/vale/styles/docs/Terms.ymlrename to .github/styles/docs/Terms.ymldiff --git a/docs/vale/styles/docs/TypeScript.yml b/.github/styles/docs/TypeScript.ymlsimilarity index 100%rename from docs/vale/styles/docs/TypeScript.ymlrename to .github/styles/docs/TypeScript.ymldiff --git a/docs/vale/styles/docs/We.yml b/.github/styles/docs/We.ymlsimilarity index 84%rename from docs/vale/styles/docs/We.ymlrename to .github/styles/docs/We.ymlindex 564c0d4a605..3801203df42 100644--- a/docs/vale/styles/docs/We.yml+++ b/.github/styles/docs/We.yml@@ -1,6 +1,6 @@extends: existencemessage: "Avoid using first-person plural like '%s'."-level: error+level: warningignorecase: truetokens:- wediff --git a/docs/vale/styles/docs/Wordiness.yml b/.github/styles/docs/Wordiness.ymlsimilarity index 100%rename from docs/vale/styles/docs/Wordiness.ymlrename to .github/styles/docs/Wordiness.ymldiff --git a/docs/vale/styles/docs/WritingLevel.yml b/.github/styles/docs/WritingLevel.ymlsimilarity index 100%rename from docs/vale/styles/docs/WritingLevel.ymlrename to .github/styles/docs/WritingLevel.ymldiff --git a/docs/vale/styles/write-good/Cliches.yml b/.github/styles/write-good/Cliches.ymlsimilarity index 100%rename from docs/vale/styles/write-good/Cliches.ymlrename to .github/styles/write-good/Cliches.ymldiff --git a/docs/vale/styles/write-good/E-Prime.yml b/.github/styles/write-good/E-Prime.ymlsimilarity index 100%rename from docs/vale/styles/write-good/E-Prime.ymlrename to .github/styles/write-good/E-Prime.ymldiff --git a/docs/vale/styles/write-good/Illusions.yml b/.github/styles/write-good/Illusions.ymlsimilarity index 100%rename from docs/vale/styles/write-good/Illusions.ymlrename to .github/styles/write-good/Illusions.ymldiff --git a/docs/vale/styles/write-good/Passive.yml b/.github/styles/write-good/Passive.ymlsimilarity index 100%rename from docs/vale/styles/write-good/Passive.ymlrename to .github/styles/write-good/Passive.ymldiff --git a/docs/vale/styles/write-good/README.md b/.github/styles/write-good/README.mdsimilarity index 100%rename from docs/vale/styles/write-good/README.mdrename to .github/styles/write-good/README.mddiff --git a/docs/vale/styles/write-good/So.yml b/.github/styles/write-good/So.ymlsimilarity index 100%rename from docs/vale/styles/write-good/So.ymlrename to .github/styles/write-good/So.ymldiff --git a/docs/vale/styles/write-good/ThereIs.yml b/.github/styles/write-good/ThereIs.ymlsimilarity index 100%rename from docs/vale/styles/write-good/ThereIs.ymlrename to .github/styles/write-good/ThereIs.ymldiff --git a/docs/vale/styles/write-good/TooWordy.yml b/.github/styles/write-good/TooWordy.ymlsimilarity index 100%rename from docs/vale/styles/write-good/TooWordy.ymlrename to .github/styles/write-good/TooWordy.ymldiff --git a/docs/vale/styles/write-good/Weasel.yml b/.github/styles/write-good/Weasel.ymlsimilarity index 100%rename from docs/vale/styles/write-good/Weasel.ymlrename to .github/styles/write-good/Weasel.ymldiff --git a/docs/vale/styles/write-good/meta.json b/.github/styles/write-good/meta.jsonsimilarity index 100%rename from docs/vale/styles/write-good/meta.jsonrename to .github/styles/write-good/meta.jsondiff --git a/.github/workflows/ci-vale.yaml b/.github/workflows/ci-vale.yamlnew file mode 100644index 00000000000..584a0ace8c0--- /dev/null+++ b/.github/workflows/ci-vale.yaml@@ -0,0 +1,22 @@+name: CI-Vale+on:+ push:+ branches:+ - main+ pull_request:+jobs:+ vale:+ name: runner / vale+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v3+ - uses: errata-ai/vale-action@reviewdog+ with:+ files: ${{ steps.directories.outputs.LIST }}+ fail_on_error: true+ vale_flags: '--minAlertLevel=error'+ reporter: github-pr-check+ token: ${{ github.token }}+ filter_mode: nofilter+ env:+ REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}\ No newline at end of filediff --git a/.vale.ini b/.vale.iniindex 98780c02f3f..4dc538de40a 100644--- a/.vale.ini+++ b/.vale.ini@@ -1,4 +1,4 @@-StylesPath = docs/vale/styles+StylesPath = .github/stylesMinAlertLevel = suggestion@@ -6,6 +6,11 @@ Packages = write-good[*.{md,mdx}]BasedOnStyles = Vale, write-good, docs+Vale.Spelling=warning+write-good.E-Prime=No+write-good.So=No+write-good.ThereIs=No+Vale.Terms=No[formats]diff --git a/docs/docs/contributor/frontend/advanced/style-guide.mdx b/docs/docs/contributor/frontend/advanced/style-guide.mdxindex cd3a636d001..458e0bb5607 100644--- a/docs/docs/contributor/frontend/advanced/style-guide.mdx+++ b/docs/docs/contributor/frontend/advanced/style-guide.mdx@@ -86,7 +86,7 @@ const EmailField = ({ value }: EmailFieldProps) => (#### No Single Variable Prop Spreading in JSX Elements-We discourage the use of single variable prop spreading in JSX elements, e.g., `{...props}`. This practice often leads to less readable and maintainable code as it's unclear what props are being passed down to the component.+We discourage the use of single variable prop spreading in JSX elements, like `{...props}`. This practice often leads to less readable and maintainable code as it's unclear what props are being passed down to the component.```tsx/* ❌ - Bad, spreads a single variable prop into the underlying componentdiff --git a/docs/docs/contributor/local-setup/troubleshooting.mdx b/docs/docs/contributor/local-setup/troubleshooting.mdxindex 4a51e6a5198..79c81bec3c0 100644--- a/docs/docs/contributor/local-setup/troubleshooting.mdx+++ b/docs/docs/contributor/local-setup/troubleshooting.mdx@@ -23,8 +23,8 @@ Try installing [yarn classic](https://classic.yarnpkg.com/lang/en/)!## Missing metadata schema-During Twenty installation, your postgres database needs to be provisioned with right schemas, extensions and users.+During Twenty installation, your postgres database needs to be provisioned with right schemas, extensions, and users.We provide [different ways](/contributor/local-setup/yarn-setup#step-2-set-up-postgresql-database) to set up your postgres instance.-If you sucessfully run this provisioning, you should have `default` and `metadata` schemas in your database.+If you successfully run this provisioning, you should have `default` and `metadata` schemas in your database.If you don't, make sure you don't have multiple postgres instance running on your computer.diff --git a/docs/docs/developer/graphql_api.mdx b/docs/docs/developer/graphql_api.mdxindex c7e04392434..248a44ebb9d 100644--- a/docs/docs/developer/graphql_api.mdx+++ b/docs/docs/developer/graphql_api.mdx@@ -11,7 +11,7 @@ Use our [in-browser GraphiQL app](https://docs.twenty.com/graphql/) to browse, qGraphQL is a query language for APIs that enables declarative data fetching that allows a client to specify exactly what data it needs from the API.-Instead of exposing various endpoints that return fixed data strcutures, GraphQL exposes only a single endpoint that precisely returns the data that the client asked for. This makes GraphQL more flexible and efficient than other kinds of APIs, like REST APIs.+Instead of exposing various endpoints that return fixed data structures, GraphQL exposes only a single endpoint that precisely returns the data that the client asked for. This makes GraphQL more flexible and efficient than other kinds of APIs, like REST APIs.To learn more about GraphQL, we recommend going through this [Introduction](https://www.howtographql.com/basics/0-introduction/).diff --git a/docs/docs/others/bug-and-requests.mdx b/docs/docs/others/bug-and-requests.mdxindex 8692771bb92..bb8de1a2ac5 100644--- a/docs/docs/others/bug-and-requests.mdx+++ b/docs/docs/others/bug-and-requests.mdx@@ -6,7 +6,7 @@ sidebar_custom_props:---## Reporting Bugs-To report a bug, please [create an issue on Github](https://github.com/twentyhq/twenty/issues/new).+To report a bug, please [create an issue on GitHub](https://github.com/twentyhq/twenty/issues/new).## Feature Requestsdiff --git a/docs/docs/user-guide/basics/_category_.json b/docs/docs/user-guide/basics/_category_.jsonnew file mode 100644index 00000000000..daec3e16a89--- /dev/null+++ b/docs/docs/user-guide/basics/_category_.json@@ -0,0 +1,4 @@+{+ "label": "Basics",+ "position": 1+}diff --git a/docs/docs/user-guide/custom objects.mdx b/docs/docs/user-guide/basics/custom objects.mdxsimilarity index 99%rename from docs/docs/user-guide/custom objects.mdxrename to docs/docs/user-guide/basics/custom objects.mdxindex 660d0d9cfec..e399f4a81cd 100644--- a/docs/docs/user-guide/custom objects.mdx+++ b/docs/docs/user-guide/basics/custom objects.mdx@@ -24,6 +24,7 @@ To create a new custom object:</div><br/>+3. Click on `+ New object` at the top, then choose Custom as the object type. Enter the name (both singular and plural) and description for your custom object and hit Save (at the top right). Using Listing as an example of custom object, the singular would be "listing" and the plural would be "listings" along with a description like "Listings that hosts created to showcase their property."<br/>diff --git a/docs/docs/user-guide/integrations/_category_.json b/docs/docs/user-guide/integrations/_category_.jsonnew file mode 100644index 00000000000..f8777284bd3--- /dev/null+++ b/docs/docs/user-guide/integrations/_category_.json@@ -0,0 +1,4 @@+{+ "label": "Integrations",+ "position": 2+}diff --git a/docs/docs/user-guide/connect-zapier.mdx b/docs/docs/user-guide/integrations/connect-zapier.mdxsimilarity index 100%rename from docs/docs/user-guide/connect-zapier.mdxrename to docs/docs/user-guide/integrations/connect-zapier.mdxdiff --git a/docs/docs/user-guide/generating-api-keys.mdx b/docs/docs/user-guide/integrations/generating-api-keys.mdxsimilarity index 100%rename from docs/docs/user-guide/generating-api-keys.mdxrename to docs/docs/user-guide/integrations/generating-api-keys.mdxdiff --git a/docs/docs/user-guide/others/_category_.json b/docs/docs/user-guide/others/_category_.jsonnew file mode 100644index 00000000000..9aa323d8537--- /dev/null+++ b/docs/docs/user-guide/others/_category_.json@@ -0,0 +1,4 @@+{+ "label": "Others",+ "position": 3+}diff --git a/docs/docs/user-guide/glossary.mdx b/docs/docs/user-guide/others/glossary.mdxsimilarity index 85%rename from docs/docs/user-guide/glossary.mdxrename to docs/docs/user-guide/others/glossary.mdxindex b794719694c..e0dfce3a071 100644--- a/docs/docs/user-guide/glossary.mdx+++ b/docs/docs/user-guide/others/glossary.mdx@@ -12,8 +12,8 @@ They are the two fundamental types of records that the CRM is built around:### PipelinesA `Pipeline` is a way to track a business process. Pipelines are categorized within a *module* and have *stages*:-- A **module** contains the logic for a certain business process (e.g. sales, recruiting).-- **Stages** map the steps in your process (e.g. new, ongoing, won, lost).+- A **module** contains the logic for a certain business process (for example: sales, recruiting).+- **Stages** map the steps in your process (for example: new, ongoing, won, lost).### WorkspaceA `Workspace` usually represents a company using Twenty.diff --git a/docs/docs/user-guide/user-guide.mdx b/docs/docs/user-guide/user-guide.mdxindex c908a1f50da..2d1b621be54 100644--- a/docs/docs/user-guide/user-guide.mdx+++ b/docs/docs/user-guide/user-guide.mdx@@ -8,4 +8,30 @@ sidebar_custom_props:isSidebarRoot: true----Coming soon!\ No newline at end of file+# Welcome to Twenty's User Guide++This user guide is intended to help you learn how you can use Twenty to build the CRM you want.++In this quick-start guide, we'll walk you through the basics.++## Quick Search++You'll see a search bar at the top of your sidebar. You can also bring up the command bar with the `cmd`/`ctrl` + `k` shortcut to quickly navigate through your workspace, and find people, companies, notes, and more.++The command bar also supports numerous shortcuts for navigation.++## Create Pre-filtered Views++Twenty allows you to add filters to see data that meets certain criteria and hides the rest.++To create a filter in your workspace, click Filter at the top right and select the attribute you'd like to filter your records by. Create your filter and then save changes in a new view by clicking `+ Create view`.++The filtered view is now available to your whole team.++## Add Stages For Opportunities++You can also add more stages to the opportunities board.++On the Opportunities page, click on Options, Stages, then `+ Add Stage`.++You can also edit the stage by clicking on the name.\ No newline at end of filediff --git a/docs/src/theme/DocCard/index.js b/docs/src/theme/DocCard/index.jsnew file mode 100644index 00000000000..ca8db784b09--- /dev/null+++ b/docs/src/theme/DocCard/index.js@@ -0,0 +1,97 @@+import React from 'react';+import clsx from 'clsx';+import Link from '@docusaurus/Link';+import {+ findFirstCategoryLink,+ useDocById,+} from '@docusaurus/theme-common/internal';+import isInternalUrl from '@docusaurus/isInternalUrl';+import {translate} from '@docusaurus/Translate';+import styles from './styles.module.css';+import * as icons from "../icons";+++function CardContainer({href, children}) {+ return (+ <Link+ href={href}+ className={clsx('card padding--lg', styles.cardContainer)}>+ {children}+ </Link>+ );+}+function CardLayout({href, icon, title, description}) {+ return (+ <CardContainer href={href}>+ <h2 className={clsx("text--truncate", styles.cardTitle)} title={title}>+ <span className={styles.icon}>+ {typeof icon === "function" ? icon() : icon}+ </span>{" "}+ {title}+ </h2>+ {description && (+ <p+ className={clsx("text--truncate", styles.cardDescription)}+ title={description}+ >+ {description}+ </p>+ )}+ </CardContainer>+ );+}++function CardCategory({item}) {+ const href = findFirstCategoryLink(item);+ // Unexpected: categories that don't have a link have been filtered upfront+ if (!href) {+ return null;+ }+ return (+ <CardLayout+ href={href}+ icon="🗃️"+ title={item.label}+ description={+ item.description ??+ translate(+ {+ message: '{count} items',+ id: 'theme.docs.DocCard.categoryDescription',+ description:+ 'The default description for a category card in the generated index about how many items this category includes',+ },+ {count: item.items.length},+ )+ }+ />+ );+}+++function CardLink({ item }) {+ const customIcon = item.customProps.icon;+ const icon = icons[customIcon] || (isInternalUrl(item.href) ? "📄️" : "🔗");+ const doc = useDocById(item.docId ?? undefined);++ return (+ <CardLayout+ href={item.href}+ icon={icon}+ title={item.label}+ description={item.description ?? doc?.description}+ />+ );+}+++export default function DocCard({item}) {+ switch (item.type) {+ case 'link':+ return <CardLink item={item} />;+ case 'category':+ return <CardCategory item={item} />;+ default:+ throw new Error(`unknown item type ${JSON.stringify(item)}`);+ }+}diff --git a/docs/src/theme/DocCard/styles.module.css b/docs/src/theme/DocCard/styles.module.cssnew file mode 100644index 00000000000..cd4093b1333--- /dev/null+++ b/docs/src/theme/DocCard/styles.module.css@@ -0,0 +1,33 @@+.cardContainer {+ --ifm-link-color: var(--ifm-color-emphasis-800);+ --ifm-link-hover-color: var(--ifm-color-emphasis-700);+ --ifm-link-hover-decoration: none;++ box-shadow: 0 1.5px 3px 0 rgb(0 0 0 / 15%);+ border: 1px solid var(--ifm-color-emphasis-200);+ transition: all var(--ifm-transition-fast) ease;+ transition-property: border, box-shadow;+}++.cardContainer:hover {+ border-color: var(--ifm-color-primary);+ box-shadow: 0 3px 6px 0 rgb(0 0 0 / 20%);+}++.cardContainer *:last-child {+ margin-bottom: 0;+}++.cardTitle {+ font-size: 1.2rem;+ display: flex+}++.cardDescription {+ font-size: 0.8rem;+}++.icon {+ font-size: 1.5rem;+ padding-right: 0.5rem;+}diff --git a/infra/dev/scripts/setup-postgres-macos.sh b/infra/dev/scripts/setup-postgres-macos.shindex a0162c9d48c..bfc1b0ec901 100755--- a/infra/dev/scripts/setup-postgres-macos.sh+++ b/infra/dev/scripts/setup-postgres-macos.sh@@ -55,6 +55,7 @@ current_directory=$(pwd)# Install PostgresSQLecho_header $GREEN "Step [1/4]: Installing PostgreSQL..."+brew install postgresql@$PG_MAIN_VERSION# Install pg_graphql extensions@@ -96,6 +97,12 @@ rm -rf "$temp_dir"# Start postgresql serviceecho_header $GREEN "Step [3/4]: Starting PostgreSQL service..."++if ! command -v brew &> /dev/null; then+ echo_header $RED "Warning: Homebrew is not found in your PATH. Adding it to PATH..."+ export PATH="/opt/homebrew/bin:$PATH"+fi+if brew services start postgresql@$PG_MAIN_VERSION; thenecho "PostgreSQL service started successfully."else