Adding the contribution doc to help new developers setup their local machines and contribute to Appsmith. Co-authored-by: Arpit Mohan <arpit@appsmith.com>
4.4 KiB
Contributing to Appsmith
Thank you for your interest in Appsmith and taking the time to contribute on this project. 🙌 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.
Table of contents
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
- Documentation
- Code contribution
- Widgets
- Datasources
👨💻 How to set up local development
Client
Appsmith's client (UI/frontend) uses the ReactJS library and Typescript. The application also uses libraries like react-redux and redux-saga for workflows.
Pre-requisites:
On your development machine, please ensure that:
- You have
dockerinstalled in your system. If not, please visit: https://docs.docker.com/get-docker/ - You have
mkcertinstalled. Please visit: https://github.com/FiloSottile/mkcert#installation for details. Formkcertto work with firefox you may require thenssutility to be installed. Details are in the link above. - You have
envsubstinstalled. usebrew install gettexton macOS. Linux machines usually have this installed. - You have cloned the repo in your local machine.
Create local HTTPS certificates:
- Run the following command from the project root.
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
-
Copy the
.env.examplefile and rename the new file to.envin the same directory. Populate the entries in the.envfile with values to enable/toggle features. -
Run the script
start-https.shin order to start the nginx container that will proxy the frontend code on your local system.
Steps to build & run the code:
- Add a domain like
dev.appsmith.comto/etc/hosts.
echo "127.0.0.1 dev.appsmith.com" | sudo tee -a /etc/hosts
-
Run
cd app/client -
Run
yarn -
Run
yarn build(optional) -
Run
yarn startif you are hitting https://release-api.appsmith.com (Staging environment) as your API backend. -
If you are hitting any other API endpoint,
- Please run:
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.templateordocker/templates/nginx-mac.conf.template. You will have to runstart-https.shscript again after making the change.
-
Go to https://dev.appsmith.com on your browser
If you are unable to run docker:
- Make the values in
nginx-mac.conf.templateempty. None of those properties are required. proxy_passvalue must be changed fromhttp://host.docker.internal:3000tohttp://localhost:3000- Generate the certificates manually via
mkcert. Check the command instart-https-server.shfile. - Change the value of the certificate location for keys
ssl_certificate&ssl_certificate_keyto the place where these certificates were generated.
Server
- We use the Spring framework in Java for all backend development.
- We use
mavenas our build tool. - We use pf4j as a library for plugins.
- We use MongoDB for our database.
-
After cloning the repository, change your directory to
app/server -
Run
mvn clean compile. This generates a bunch of classes required by IntelliJ for compiling the rest of the source code. -
Create a copy of the
envs/dev.env.examplecp envs/dev.env.example envs/dev.env
🧪 How to run tests
Client
- In order to run the Cypress integration tests, run:
yarn run test
- In order to run the Jest unit tests, run:
yarn run test:unit
Server
-
Ensure that you have Redis running on your local system.
-
Run the command to execute tests
mvn clean package