Revised contributing.md, edited docs (#1951)

* Added Overview page

* Revised Getting Started page

* Minor revision

* Edited readme, minor modifications to docs

* Removed sweep.yaml, .devcontainer, .ergomake

* Moved security.md to .github, added contributing.md

* changes as per code review

* updated contributing.md

* fixed broken links & added missing links in doc, improved structure

* fixed link in wsl setup

* fixed server link, added https cloning in yarn-setup
This commit is contained in:
Nimra Ahmed
2023-10-10 15:33:17 +05:00
committed by GitHub
parent 017a0b1563
commit ae32a2da3b
23 changed files with 814 additions and 428 deletions
@@ -5,14 +5,14 @@ sidebar_custom_props:
icon: TbBrandDocker
---
You can also provision the project with Docker. This comes with a few advantages:
This guide will walk you through provisioning the project with Docker. This comes with a few advantages:
- It provides the exact same environment as our core developer team.
- It includes some additional dependencies (such as `playwright`) that you might need if you wish to contribute to some advanced areas of the project.
- It provisions a PostgreSQL database.
## Prerequisites
Make sure you have the latest `Docker` and [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) versions installed on your computer.
Make sure you have the latest [Docker](https://docs.docker.com/get-docker/) and [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) versions installed on your computer.
You can run `docker --version` to verify the installation.
@@ -46,7 +46,7 @@ PG_DATABASE_URL=postgres://twenty:twenty@postgres:5432/default?connection_limit=
We provide an environment containerized with Docker and orchestrated with `docker-compose`.
This installation method will also provision a PostgreSQL container.
**Note:** The configuration for the build is stored in the `infra/dev` folder, but you can run `make` commands directly from the root folder.
> **Note:** The configuration for the build is stored in the `infra/dev` folder, but you can run `make` commands directly from the root folder.
```bash
make build
@@ -103,5 +103,5 @@ yarn prisma:reset
#### Docker throws errors while setting up local environment
If by any chance you will run into problems with Docker, you should change the `docker-compose` to `docker compose` in `./infra/dev/Makefile` as `docker-compose` is old version
becoming slowly obsolete. (More info can be found [here](https://docs.docker.com/compose/migrate/))
If by any chance you run into problems with Docker, you should change the `docker-compose` to `docker compose` in `./infra/dev/Makefile` as `docker-compose` is an old version
that's becoming slowly obsolete. (More info can be found [here](https://docs.docker.com/compose/migrate/))
@@ -5,13 +5,14 @@ sidebar_custom_props:
icon: TbBrandVscode
---
This section will help you setup your IDE for the project. If you haven't setup your development environment, please refer to [Development Environment](/contributor/local-setup) section.
You can obviously use any IDE you want but we recommend using Visual Studio Code as our internal team uses it and we have a lot of extensions and settings that we can share with you.
This section will help you setup your IDE for the project. If you haven't setup your development environment, please refer to our [local setup](/contributor/local-setup) section.
## Visual Studio Code
You can use any IDE you want but we recommend using Visual Studio Code as our internal team uses it and we have a lot of extensions and settings that we can share with you.
### Installation
You can download Visual Studio Code from [here](https://code.visualstudio.com/download). Depending on your operating system, you can download the appropriate version.
@@ -35,7 +36,7 @@ You can use the recommended extensions for the project. You will find them in `.
### Docker Setup
If you are using a [Docker setup](/contributor/local-setup#docker-install), you will need to run VSCode in the container. You can do that by opening the project, clicking on `Remote Explorer` icon on the left sidebar and then clicking on `Attach in New window` on `dev-twenty-dev` container.
If you are using a [Docker setup](/contributor/local-setup/docker-setup), you will need to run VSCode in the container. You can do that by opening the project, clicking on the `Remote Explorer` icon on the left sidebar and then clicking on `Attach in New window` on `dev-twenty-dev` container.
<div style={{textAlign: 'center'}}>
<img src="/img/contributor/ide-start-dev-container.png" alt="Visual Studio Code: Open in container" width="90%" />
@@ -44,8 +45,9 @@ If you are using a [Docker setup](/contributor/local-setup#docker-install), you
<br />
VSCode will open a new window and you will be able to use it as you would normally do. The only difference is that you will be running VSCode inside the container and you will have access to all the tools and dependencies that are installed in the container.
If you stop your containers, you will need to start them again before opening the project in VSCode again.
<br /><br />
If you stop your containers, you will need to restart them before opening the project in VSCode again.
### Conclusion
## Conclusion
You are all set to start developing the project. If you have any questions, feel free to reach out to us on [Discord](https://discord.com/invite/cx5n4Jzs57).
You are all set to start contributing to the project. If you have any questions, feel free to reach out to us on [Discord](https://twenty.com/discord).
@@ -12,16 +12,16 @@ Twenty is designed to be developer-friendly, and your local installation should
## Discord
If you have any questions or need help, you can join our [Discord](https://discord.com/invite/cx5n4Jzs57) server.
If you have any questions or need help, you can join our [Discord](https://twenty.com/discord) server.
## MacOS and Linux users
We recommend using [yarn installation](/contributor/local-setup/yarn-setup) as this is the easiest way to get started.
We also provide an easy way to run the project with [Docker](/contributor/local-setup/yarn-setup) that you can use if you are familiar with containerized environments.
We also provide an easy way to run the project with [Docker](/contributor/local-setup/docker-setup) that you can use if you are familiar with containerized environments.
## Windows users
Windows users can install install the project through WSL2. We provide a [guide](/contributor/local-setup/wsl-setup) to help you get started.
Windows users can install the project through WSL2. We provide a [guide](/contributor/local-setup/wsl-setup) to help you get started.
## Project structure
@@ -5,12 +5,12 @@ sidebar_custom_props:
icon: TbBrandWindows
---
This document guides you through installing the project with WSL2.
## Install WSL
Open PowerShell as Administrator and run:
Install WSL. Follow https://learn.microsoft.com/en-us/windows/wsl/install
```powershell
wsl --install
```
@@ -26,9 +26,7 @@ You will be prompted to create a username and password for your Ubuntu installat
## Setup your developer environment
### Install Git
Follow: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-git
### Step #1: Install Git
```
sudo apt-get install git
@@ -40,9 +38,9 @@ git config --global user.name "Your Name"
git config --global user.email "youremail@domain.com"
```
**Note:$$ If you don't have a Github account, create one now with the corresponding email address. We recommend that you setup a SSH key for your Github account. Follow the instructions here: https://docs.github.com/fr/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
>**Note:** If you don't have a Github account, create one now with the corresponding email address. We recommend that you setup a SSH key for your Github account. Follow the instructions [here](https://docs.github.com/fr/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent).
### Install Node.js, nvm, Yarn
### Step #2: Install Node.js, nvm, Yarn
```bash
sudo apt-get install curl
@@ -50,9 +48,9 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
curl -o- -L https://yarnpkg.com/install.sh | bash
```
Close and reopen your terminal to start using nvm or run the following to use it now:
Close and reopen your terminal to start using nvm.
### Install Twenty project
### Step #3: Install Twenty
You are ready to install Twenty project. Follow the [Yarn install guide](/contributor/local-setup#yarn-install-recommended) instructions.
We don't recommend to use Docker on WSL as it adds an extra layer of complexity.
Follow our [Yarn install guide](/contributor/local-setup/yarn-setup) to install Twenty.
We don't recommend using Docker on WSL as it adds an extra layer of complexity.
@@ -7,8 +7,10 @@ sidebar_custom_props:
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
In this document, you'll learn how to install the project using yarn. We recommend this method since it's the easiest way to get started but you can also run the project with [Docker](/contributor/local-setup/docker-setup) or [WSL2](/contributor/local-setup/wsl-setup).
**Note:** `npm` currently does not support local packages satisfactorily. We strongly recommend using `yarn` instead.
> **Note:** `npm` currently does not support local packages satisfactorily. We strongly recommend using `yarn` instead.
## Prerequisites
@@ -16,22 +18,37 @@ Before you can install and use Twenty, make sure you install the following on yo
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- [Node](https://nodejs.org/en/download)
- [yarn](https://classic.yarnpkg.com/lang/en/docs/install/)
- [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md)
---
## Step #1: Git Clone
In your terminal, run the following command:
In your terminal, run the following command.
```
We recommend using SSH for this step. If you already haven't set up SSH keys, please do so first. You can learn more about it [here](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh).
<Tabs>
<TabItem value="ssh" label="SSH (Recommended)" default>
```bash
git clone git@github.com:twentyhq/twenty.git
```
</TabItem>
<TabItem value="https" label="HTTPS (Not Recommended)" >
```bash
git clone https://github.com/twentyhq/twenty.git
```
</TabItem>
</Tabs>
## Step #2: Set up PostgreSQL Database
You need to have a PostgreSQL database available to be able to use Twenty. If you already have one available, you can skip this step.
If you don't, you can provision one through `docker` using the following commands:
If you don't, you can provision one through `docker`. With docker running, use the following commands:
<Tabs>
<TabItem value="docker" label="Docker" default>
@@ -102,7 +119,7 @@ cp ./server/.env.example ./server/.env
## Step #4: Server setup
**Note:** We recommend that you use `nvm` to install the correct `node` version. We have added a `server/.nvmrc` to ensure all contributors are using the same version.
> **Note:** We recommend that you use `nvm` to install the correct `node` version. We have added a `server/.nvmrc` to ensure all contributors use the same version.
To build Twenty server and seed some data into your database, run the following commands:
```bash
@@ -114,11 +131,11 @@ yarn prisma:reset
yarn start:dev
```
Twenty's server will be up and running at [http://localhost:3000](http://localhost:3000).
Twenty's server will be up and running at [http://localhost:3000/graphql](http://localhost:3000/graphql).
## Step #5: Frontend setup
**Note:** For the frontend setup, too, we recommend using `nvm` to install the right node version.
> **Note:** For the frontend setup, too, we recommend using `nvm` to install the right node version.
To set up the frontend, run the following commands in your terminal:
```bash