Feature/hacktoberfest (#841)

* Update IssuesReport.md

* Update IssuesReport.md

* Create ClientSetup.md

* Update ClientSetup.md

* Update ClientSetup.md

* Update ClientSetup.md

* Create ServerSetup.md

* Update ClientSetup.md

* Create CodeContributionsGuidelines.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CodeContributionsGuidelines.md

* Update IssuesReport.md

* Update CodeContributionsGuidelines.md

* Update CONTRIBUTING.md

* Update IssuesReport.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update ClientSetup.md

* Update ClientSetup.md

Co-authored-by: Nikhil <nikhil@users.noreply.github.com>
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
This commit is contained in:
Nikhil Nandagopal 2020-09-30 23:23:10 +05:30 committed by GitHub
parent 4c20412c5c
commit cf650f8ad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 251 additions and 146 deletions

View File

@ -4,162 +4,43 @@ Thank you for your interest in Appsmith and taking the time to contribute on thi
Appsmith is a project by developers for developers and there are a lot of ways you can contribute. Appsmith is a project by developers for developers and there are a lot of ways you can contribute.
Feel free to propose changes to this document in a pull request. Feel free to propose changes to this document in a pull request.
### Table of contents
- Code of conduct
- How can I contribute?
- Git Workflow
- Setting up local development
- Running tests
## How can I contribute?
There are many ways in which we/one can to contribute to Appsmith. All contributions are highly appreciated.
- Beta testing
- Raise Issues / Feature Requests
- Improve the Documentation
- Code contribution
- Introduce New Widgets
- Introduce New Database Integrations
- Introduce New SAAS Integrations
## Code of conduct ## Code of conduct
Read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing Read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing
## Git Workflow ## How can I contribute?
We use [Github Flow](https://guides.github.com/introduction/flow/index.html), so all code changes happen through pull requests. There are many ways in which we/one can to contribute to Appsmith. All contributions are highly appreciated.
Pull requests are the best way to propose changes to the codebase and get them reviewed by maintainers. #### 🐛 Report a bug
Report all issues through GitHub Issues using the [Report a Bug](https://github.com/appsmithorg/appsmith/issues/new?assignees=Nikhil-Nandagopal&labels=Bug%2C+High&template=---bug-report.md&title=%5BBug%5D) template.
To help resolve your issue as quickly as possible, read the template and provide all the requested information.
1. Fork the repo and create your branch from `release`. #### 🛠 File a feature request
2. If you've added code that should be tested, add tests. If it's a client-side change, tests must be added via Cypress/Jest. For server-side changes, please add JUnit tests. We welcome all feature requests, whether it's to add new functionality to an existing extension or to offer an idea for a brand new extension.
3. If you've changed any APIs, please call this out in the pull request. Also, don't forget to add/modify integration tests via Cypress to ensure that changes are backwards compatible. File your feature request through GitHub Issues using the [Feature Request](https://github.com/appsmithorg/appsmith/issues/new?assignees=Nikhil-Nandagopal&labels=&template=----feature-request.md&title=%5BFeature%5D) template.
4. At all times, ensure the test suite passes. We will not be able to accept your change if the test suite doesn't pass.
5. Create an issue referencing the pull request. This ensures that we can track the bug being fixed or feature being added easily.
#### 📝 Improve the documentation
In the process of shipping features quickly, we often forget to keep our [Documentation](https://docs.appsmith.com) up to date. You can help by suggesting improvements to our documentation. Read our [Documentation Contribution Guide]()
## 👨‍💻 Setting up local development #### 💥 Fix a bug
We welcome contributions that help make appsmith bug free. Check our [good first issues](https://github.com/appsmithorg/appsmith/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22+label%3A%22Bug%22) & [begin contributing](#code-contribution)
### Client #### ⚙️ Build a feature
Appsmith's client (UI/frontend) uses the ReactJS library and Typescript. The application also uses libraries like react-redux and redux-saga for workflows. Being a horizontal platform, we have a never ending list of [feature requests](https://github.com/appsmithorg/appsmith/issues?q=is%3Aopen+is%3Aissue+label%3AEnhancement) that you can contribute to. Get started with our [contribution section](#code-contribution)
##### Pre-requisites: ## Code Contribution
All Code contributions are welcome and highly encouraged. Before opening a PR, create an issue and talk to a maintainer about a possible solution.
This ensures that your PR has the highest chance of getting merged quickly and avoids 2 contributors from working on the same issue.
On your development machine, please ensure that: ### Contributing to the Frontend (React / HTML / CSS / JS)
- Go through our list of frontend [good first issues](https://github.com/appsmithorg/appsmith/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22+label%3A%22Frontend%22)
- Pick the ones you like most and drop us a comment!
- [Run the codebase](contributions/ClientSetup.md) on your local machine
- Follow our [Code Contribution Guide](contributions/CodeContributionsGuidelines.md) and raise your first PR!
1. You have `docker` installed in your system. If not, please visit: [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/) ### Contributing to the Backend (Java / Mongo / Springboot)
2. You have `mkcert` installed. Please visit: [https://github.com/FiloSottile/mkcert#installation](https://github.com/FiloSottile/mkcert#installation) for details. For `mkcert` to work with firefox you may require the `nss` utility to be installed. Details are in the link above. - Go through our list of backend [good first issues](https://github.com/appsmithorg/appsmith/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22+label%3A%22Backend%22+)
3. You have `envsubst` installed. use `brew install gettext` on macOS. Linux machines usually have this installed. - Pick the ones you like most and drop us a comment!
4. You have cloned the repo in your local machine. - [Run the codebase](contributions/ServerSetup.md) on your local machine
- Follow our [Code Contribution Guide](contributions/CodeContributionsGuidelines.md) and raise your first PR!
##### Create local HTTPS certificates:
1. Run the following command from the project root.
```bash
cd app/client/docker && mkcert -install && mkcert "*.appsmith.com" && cd ..
```
This command will end up creating 2 files in the `docker/` directory:
- `_wildcard.appsmith.com-key.pem`
- `_wildcard.appsmith.com.pem`
2. Copy the `.env.example` file and rename the new file to `.env` in the same directory. Populate the entries in the `.env` file with values to enable/toggle features.
3. Run the script `start-https.sh` in order to start the nginx container that will proxy the frontend code on your local system.
##### Steps to build & run the code:
1. Add a domain like `dev.appsmith.com` to `/etc/hosts`.
```bash
echo "127.0.0.1 dev.appsmith.com" | sudo tee -a /etc/hosts
```
1. Run `cd app/client`
2. Run `yarn`
3. Run `yarn build` (optional)
4. Run `yarn start` if you are hitting [https://release-api.appsmith.com](https://release-api.appsmith.com) (Staging environment) as your API backend.
5. If you are hitting any other API endpoint,
- Please run:
```shell script
REACT_APP_ENVIRONMENT=DEVELOPMENT HOST=dev.appsmith.com craco start
```
- Change the API endpoint in the Nginx configuration available in `docker/templates/nginx-linux.conf.template` or `docker/templates/nginx-mac.conf.template`. You will have to run `start-https.sh` script again after making the change.
6. Go to [https://dev.appsmith.com](https://dev.appsmith.com) on your browser
#### If you are unable to run docker:
1. Make the values in `nginx-mac.conf.template` empty. None of those properties are required.
2. `proxy_pass` value must be changed from `http://host.docker.internal:3000` to `http://localhost:3000`
3. Generate the certificates manually via `mkcert`. Check the command in `start-https-server.sh` file.
4. Change the value of the certificate location for keys `ssl_certificate` & `ssl_certificate_key` to the place where these certificates were generated.
### Server
- We use the Spring framework in Java for all backend development.
- We use `maven` as our build tool.
- We use pf4j as a library for plugins.
- We use MongoDB for our database.
1. After cloning the repository, change your directory to `app/server`
2. Run the command
```bash
mvn clean compile
```
This generates a bunch of classes required by IntelliJ for compiling the rest of the source code. Without this step, your IDE may complain about missing classes and will be unable to compile the code.
3. Create a copy of the `envs/dev.env.example`
```shell script
cp envs/dev.env.example .env
```
This command creates a `.env` file in the `app/server` folder. All run scripts pick up environment configuration from this file.
4. Modify the property values in the file `.env` to point to your local running instance of MongoDB and Redis.
5. In order to create the final JAR for the Appsmith server, run the command:
```
./build.sh
```
This command will create a `dist` folder which contains the final packaged jar along with multiple jars for the binaries for plugins as well.
6. Start the Java server by running
```
./scripts/start-dev-server.sh
```
By default, the server will start on port 8080.
7. When the server starts, it automatically runs migrations on MongoDB and will populate it with some initial required data.
8. You can check the status of the server by hitting the endpoint: [http://localhost:8080](http://localhost:8080) on your browser. By default you should see an blank page.
## 🧪 Running tests
##### Client
1. In order to run the Cypress integration tests, run:
```bash
yarn run test
```
2. In order to run the Jest unit tests, run:
```bash
yarn run test:unit
```
##### Server
1. Ensure that you have Redis running on your local system.
2. Run the command to execute tests
```bash
mvn clean package
```

72
IssuesReport.md Normal file
View File

@ -0,0 +1,72 @@
### My Issues Report
### Summary
| Section Title | Labels | Threshold | Count | Status |
| -- | -- | -- | -- | -- |
| [Critical](#-Critical-query) | `Critical` | 100 | 2 | 💚🥳 |
| [High](#-High-query) | `High` | 100 | 43 | 💚🥳 |
| [Low](#-Low-query) | `Low` | 100 | 63 | 💚🥳 |
| [Good First Issue](#-Good-First-Issue-query) | `Good First Issue` | 100 | 49 | 💚🥳 |
## Details
### 💚🥳 Critical [(query)](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3ACritical)
Total: 2
Threshold: 100
Labels: `Critical`
| Owner | Count |
| -- | -- |
| [riodeuno](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3ACritical+assignee%3Ariodeuno) | 2 |
| [Nikhil-Nandagopal](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3ACritical+assignee%3ANikhil-Nandagopal) | 1 |
### 💚🥳 High [(query)](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh)
Total: 43
Threshold: 100
Labels: `High`
| Owner | Count |
| -- | -- |
| [Nikhil-Nandagopal](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh+assignee%3ANikhil-Nandagopal) | 30 |
| [hetunandu](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh+assignee%3Ahetunandu) | 15 |
| [mohanarpit](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh+assignee%3Amohanarpit) | 6 |
| [vicky-primathon](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh+assignee%3Avicky-primathon) | 5 |
| [riodeuno](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh+assignee%3Ariodeuno) | 4 |
| [trishaanand](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh+assignee%3Atrishaanand) | 3 |
| [satbir121](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh+assignee%3Asatbir121) | 2 |
| [sharat87](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh+assignee%3Asharat87) | 2 |
| [devrk96](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh+assignee%3Adevrk96) | 1 |
| [akash-codemonk](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh+assignee%3Aakash-codemonk) | 1 |
| [areyabhishek](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3AHigh+assignee%3Aareyabhishek) | 1 |
### 💚🥳 Low [(query)](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3ALow)
Total: 63
Threshold: 100
Labels: `Low`
| Owner | Count |
| -- | -- |
| [Nikhil-Nandagopal](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3ALow+assignee%3ANikhil-Nandagopal) | 60 |
| [satbir121](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3ALow+assignee%3Asatbir121) | 17 |
| [riodeuno](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3ALow+assignee%3Ariodeuno) | 16 |
| [hetunandu](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3ALow+assignee%3Ahetunandu) | 14 |
| [mohanarpit](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3ALow+assignee%3Amohanarpit) | 10 |
| [trishaanand](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3ALow+assignee%3Atrishaanand) | 5 |
| [vicky-primathon](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3ALow+assignee%3Avicky-primathon) | 2 |
### 💚🥳 Good First Issue [(query)](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good%20First%20Issue%22)
Total: 49
Threshold: 100
Labels: `Good First Issue`
| Owner | Count |
| -- | -- |
| [Nikhil-Nandagopal](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good%20First%20Issue%22+assignee%3ANikhil-Nandagopal) | 45 |
| [satbir121](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good%20First%20Issue%22+assignee%3Asatbir121) | 15 |
| [hetunandu](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good%20First%20Issue%22+assignee%3Ahetunandu) | 11 |
| [riodeuno](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good%20First%20Issue%22+assignee%3Ariodeuno) | 9 |
| [mohanarpit](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good%20First%20Issue%22+assignee%3Amohanarpit) | 7 |
| [trishaanand](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good%20First%20Issue%22+assignee%3Atrishaanand) | 3 |
| [ari-hacks](https://github.com/appsmithorg/appsmith/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good%20First%20Issue%22+assignee%3Aari-hacks) | 1 |

View File

@ -0,0 +1,61 @@
## Running Client Codebase
Appsmith's client (UI/frontend) uses the ReactJS library and Typescript. The application also uses libraries like react-redux and redux-saga for workflows. We use VS Code Editor as our primary editor
### Pre-requisites:
On your development machine, please ensure that:
1. You have `docker` installed in your system. If not, please visit: [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/)
2. You have `mkcert` installed. Please visit: [https://github.com/FiloSottile/mkcert#installation](https://github.com/FiloSottile/mkcert#installation) for details. For `mkcert` to work with firefox you may require the `nss` utility to be installed. Details are in the link above.
3. You have `envsubst` installed. use `brew install gettext` on macOS. Linux machines usually have this installed.
4. You have cloned the repo in your local machine.
### Create local HTTPS certificates:
1. Run the following command from the project root.
```bash
cd app/client/docker && mkcert -install && mkcert "*.appsmith.com" && cd ..
```
This command will create 2 files in the `docker/` directory:
- `_wildcard.appsmith.com-key.pem`
- `_wildcard.appsmith.com.pem`
2. Add the domain `dev.appsmith.com` to `/etc/hosts`.
```bash
echo "127.0.0.1 dev.appsmith.com" | sudo tee -a /etc/hosts
```
3. Run the script `start-https.sh` in order to start the nginx container that will proxy the frontend code on your local system.
```bash
cd app/client
./start-https.sh
```
### Steps to build & run the code:
1. Run `yarn`
2. Run `yarn start`
🎉 Your appsmith client is now running on https://dev.appsmith.com.
This URL must be opened with https and not have the port 3000 in it
Your client is pointing to the cloud staging server https://release-api.appsmith.com
#### If you would like to hit a different appsmith server:
- Change the API endpoint in the Nginx configuration files (`app/client/docker/templates/nginx-linux.conf.template` or `app/client/docker/templates/nginx-mac.conf.template`).
- Run `start-https.sh` script again.
- Run
```bash
REACT_APP_ENVIRONMENT=DEVELOPMENT HOST=dev.appsmith.com craco start
```
#### If you are unable to run docker:
1. Make the values in `nginx-mac.conf.template` empty. None of those properties are required.
2. `proxy_pass` value must be changed from `http://host.docker.internal:3000` to `http://localhost:3000`
3. Generate the certificates manually via `mkcert`. Check the command in `start-https-server.sh` file.
4. Change the value of the certificate location for keys `ssl_certificate` & `ssl_certificate_key` to the place where these certificates were generated.

View File

@ -0,0 +1,48 @@
## Contributing code
Before raising a pull request, ensure you have raised a corresponding issue and discussed a possible solution with a maintainer. This gives your pull request the highest chance of getting merged quickly.
### 🔎 Code and copy reviews
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
### 🍴 Git Workflow
We use [Github Flow](https://guides.github.com/introduction/flow/index.html), so all code changes happen through pull requests.
1. Fork the repo and create a new branch from the `release` branch.
2. Branches are named as `fix/fix-name` or `feature/feature-name`
3. Please add tests for your changes. Client-side changes require Cypress/Jest tests while server-side changes require JUnit tests.
4. Once you are confident in your code changes, create a pull request in your fork to the release branch in the appsmithorg/appsmith base repository.
5. If you've changed any APIs, please call this out in the pull request and ensure backward compatibility.
6. Link the issue of the base repository in your Pull request description. [Guide](https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue)
7. When you raise a pull request, we automatically run tests on our CI. Please ensure that all the tests are passing for your code change. We will not be able to accept your change if the test suite doesn't pass.
### 🏡 Setup for local development
- [Client](contributions/ClientSetup.md)
- [Server](contributions/ServerSetup.md)
### 🧪 Running tests
#### Client
1. In order to run the Cypress integration tests, run:
```bash
cd app/client
yarn run test
```
2. In order to run the Jest unit tests, run:
```bash
cd app/client
yarn run test:unit
```
#### Server
1. Ensure that you have Redis running on your local system.
2. Run the command to execute tests
```bash
cd app/server
mvn clean package
```

View File

@ -0,0 +1,43 @@
## Running Server Codebase
- We use the Spring framework in Java for all backend development.
- We use `maven` as our build tool.
- We use pf4j as a library for plugins.
- We use MongoDB for our database.
- We use IntelliJ as our primary IDE for backend development
1. After cloning the repository, change your directory to `app/server`
2. Run the command
```bash
mvn clean compile
```
This generates a bunch of classes required by IntelliJ for compiling the rest of the source code. Without this step, your IDE may complain about missing classes and will be unable to compile the code.
3. Create a copy of the `envs/dev.env.example`
```shell script
cp envs/dev.env.example .env
```
This command creates a `.env` file in the `app/server` folder. All run scripts pick up environment configuration from this file.
4. Modify the property values in the file `.env` to point to your local running instance of MongoDB and Redis.
5. In order to create the final JAR for the Appsmith server, run the command:
```
./build.sh
```
This command will create a `dist` folder which contains the final packaged jar along with multiple jars for the binaries for plugins as well.
6. Start the Java server by running
```
./scripts/start-dev-server.sh
```
By default, the server will start on port 8080.
7. When the server starts, it automatically runs migrations on MongoDB and will populate it with some initial required data.
8. You can check the status of the server by hitting the endpoint: [http://localhost:8080](http://localhost:8080) on your browser. By default you should see an blank page.