Skip to content

Commit

Permalink
Improve Documentation (twentyhq#3795)
Browse files Browse the repository at this point in the history
* Begin docs improvement

* Keep improving documentation

* Upgrade Docusarus

* Fix broken links
  • Loading branch information
FelixMalfait authored Feb 5, 2024
1 parent 6748dfe commit a5989a4
Show file tree
Hide file tree
Showing 91 changed files with 1,045 additions and 895 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

We’ve spent thousands of hours grappling with traditional CRMs like Pipedrive and Salesforce to align them with our business needs, only to end up frustrated — customizations are complex and the closed ecosystems of these platforms can feel restrictive.

We felt the need for a CRM platform that empowers rather than constrains. We believe the next great CRM will come from the open source community. And we’ve packed Twenty with powerful features to give you full control and help you win more deals.
We felt the need for a CRM platform that empowers rather than constrains. We believe the next great CRM will come from the open source community. And we’ve packed Twenty with powerful features to give you full control and help you run your business efficiently.

<br>

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"@chakra-ui/accordion": "^2.3.0",
"@chakra-ui/system": "^2.6.0",
"@codesandbox/sandpack-react": "^2.11.3",
"@docusaurus/core": "^3.0.0",
"@docusaurus/preset-classic": "^3.0.0",
"@docusaurus/core": "^3.1.0",
"@docusaurus/preset-classic": "^3.1.0",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@floating-ui/react": "^0.24.3",
Expand Down Expand Up @@ -157,8 +157,8 @@
"devDependencies": {
"@babel/core": "^7.14.5",
"@babel/preset-react": "^7.14.5",
"@docusaurus/module-type-aliases": "^3.0.0",
"@docusaurus/tsconfig": "3.0.0",
"@docusaurus/module-type-aliases": "^3.1.0",
"@docusaurus/tsconfig": "3.1.0",
"@graphql-codegen/cli": "^3.3.1",
"@graphql-codegen/client-preset": "^4.1.0",
"@graphql-codegen/typescript": "^3.0.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/twenty-docs/docs/contributor/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Contributor guide",
"position": 2
"label": "Contributing",
"position": 3
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Bugs & Requests
title: Bugs and Requests
sidebar_position: 3
sidebar_custom_props:
icon: TbBug
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"position": 3
"position": 3,
"collapsible": true,
"collapsed": true
}

This file was deleted.

This file was deleted.

53 changes: 0 additions & 53 deletions packages/twenty-docs/docs/contributor/frontend/basics/basics.mdx

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Prop drilling, in the React context, refers to the practice of passing state var

3. **Reduced Component Reusability**: A component receiving a lot of props solely for passing them down becomes less general-purpose and harder to reuse in different contexts.

If you feel that you are using excessive prop drilling, see [state management best practices](/contributor/frontend/advanced/best-practices#state-management).
If you feel that you are using excessive prop drilling, see [state management best practices](#state-management).

## Imports

Expand Down
80 changes: 76 additions & 4 deletions packages/twenty-docs/docs/contributor/frontend/frontend.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,86 @@
---
id: frontend
title: Frontend Development
displayed_sidebar: frontendSidebar
sidebar_position: 0
sidebar_custom_props:
icon: TbTerminal2
isSidebarRoot: true
---

Welcome to the Frontend Development section of the documentation.
Here you will find information about the frontend development process, the recommended tools, and the best practices you should follow.
import DocCardList from '@theme/DocCardList';


<DocCardList />

## Useful commands

### Starting the app

```bash
nx start twenty-front
```

### Regenerate graphql schema based on API graphql schema

```bash
nx graphql:generate twenty-front
```

### Lint

```bash
nx lint twenty-front
```

### Test

```bash
nx test twenty-front# run jest tests
nx storybook:dev twenty-front# run storybook
nx storybook:test twenty-front# run tests # (needs yarn storybook:dev to be running)
nx storybook:coverage twenty-front # (needs yarn storybook:dev to be running)
```

## Tech Stack

The project has a clean and simple stack, with minimal boilerplate code.

**App**

- [React](https://react.dev/)
- [Apollo](https://www.apollographql.com/docs/)
- [GraphQL Codegen](https://the-guild.dev/graphql/codegen)
- [Recoil](https://recoiljs.org/docs/introduction/core-concepts)
- [TypeScript](https://www.typescriptlang.org/)

**Testing**

- [Jest](https://jestjs.io/)
- [Storybook](https://storybook.js.org/)

**Tooling**

- [Yarn](https://yarnpkg.com/)
- [Craco](https://craco.js.org/docs/)
- [ESLint](https://eslint.org/)

## Architecture

### Routing

[React Router](https://reactrouter.com/) handles the routing.

To avoid unnecessary [re-renders](/contributor/frontend/best-practices#managing-re-renders) all the routing logic is in a `useEffect` in `PageChangeEffect`.

### State Management

[Recoil](https://recoiljs.org/docs/introduction/core-concepts) handles state management.

See [best practices](/contributor/frontend/best-practices#state-management) for more information on state management.

## Testing

[Jest](https://jestjs.io/) serves as the tool for unit testing while [Storybook](https://storybook.js.org/) is for component testing.

Jest is mainly for testing utility functions, and not components themselves.

Storybook is for testing the behavior of isolated components, as well as displaying the design system.
4 changes: 3 additions & 1 deletion packages/twenty-docs/docs/contributor/server/_category_.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"position": 4
"position": 4,
"collapsible": true,
"collapsed": true
}

This file was deleted.

35 changes: 0 additions & 35 deletions packages/twenty-docs/docs/contributor/server/basics/overview.mdx

This file was deleted.

61 changes: 0 additions & 61 deletions packages/twenty-docs/docs/contributor/server/basics/workflows.mdx

This file was deleted.

This file was deleted.

Loading

0 comments on commit a5989a4

Please sign in to comment.