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.
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 need to install thenssutility. Details are in the link above.
Note:
- On Linux, you can easily install
mkcertusing the following command
curl -s https://api.github.com/repos/FiloSottile/mkcert/releases/latest \
| grep "browser_download_url.*linux-amd64" \
| cut -d : -f 2,3 | tr -d \" \
| wget -i - -O mkcert
chmod +x mkcert
sudo mv mkcert /usr/local/bin
- You have
envsubstinstalled. Usebrew install gettexton MacOS. Linux machines usually have this installed. - You have cloned the repo in your local machine.
- You have yarn installed as a global npm package, i.e.
npm install -g yarn.
-
Run the following command from the project root.
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
-
Add the domain
dev.appsmith.comto/etc/hosts.echo "127.0.0.1 dev.appsmith.com" | sudo tee -a /etc/hosts
Note:
- Please be careful when copying the above string as space between the IP and the string goes missing sometimes.
- Please check that the string is copied properly
cat /etc/hosts | grep appsmith -
Run cmd:
cp .env.example .env -
Run the script
start-https.shto start the Nginx container that will proxy the frontend code on your local system.cd app/client ./start-https.sh https://release.app.appsmith.com
-
Run
yarn install.Note:
-
On the Ubuntu Linux platform, please run the following cmd before step 2 below:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
-
-
Run
yarn start.🎉 Your Appsmith client is now running on https://dev.appsmith.com.
This URL must be opened with https and not have port 3000 in it.
- By default, your client app points to the local API server -
http://host.docker.internal:8080for MacOS orhttp://localhost:8080for Linux. If you don't have the API server running on your local system, your page will load with errors. To set up the API server on your local system, please follow the instructions here - If you cannot set up the API server on your local system, you can also use Appsmith's staging API server.
This error occurs because the node version is not compatible with the app environment. In this case, Node version manager can be used, allowing multiple node versions in different projects. Check below for installation and usage details:
- Install a node version manager. For eg: check nvm or fnm.
- In the project's root, run
nvm use 16.14.0orfnm use 16.14.0.
-
You can pass the server URL as an arg to the
start-https.shscript../start-https.sh https://release.app.appsmith.com
-
Run
yarn yarn start
-
To run the Cypress integration tests, you can create a local file
app/client/cypress.env.jsonto populateUSERNAMEandPASSWORDenv variables or use one of the methods from their docs.{ "USERNAME": "Enter username", "PASSWORD": "Enter password" } -
run:
cd app/client
yarn run testPlease check out our Testing Contribution guide for more details on setting up & troubleshooting Cypress runs on your machine.
- To run the Jest unit tests, run:
cd app/client
yarn run test:unitBefore you follow the instructions above, make sure to check the following steps:
- You have WSL2 setup in your machine. If not, please visit: https://docs.microsoft.com/en-us/windows/wsl/install-win10.
- You have Node.js installed on the WSL Distro.
- You have Docker Desktop installed with the WSL2 backend. If not, please visit: https://docs.docker.com/docker-for-windows/wsl/.
In the above Docker Desktop Setup instructions, make sure to:
- Set WSL Distro to run in WSL2 mode.
- Enable integration with the WSL Distro in Docker Desktop.
- Install Remote-WSL extension in VSCode.
Make sure to Clone the Repo in the WSL file system instead of the Windows file system.
And finally, you can open the folder in VSCode with WSL by following the instructions in Docker Desktop Setup, or by,
- Clicking on the Green button on the Bottom Left corner in VSCode.
- Selecting Open Folder in WSL and navigating to the folder in WSL.
After this, you can continue Setting up from here.
-
You will need to add
dev.appsmith.comto Windows'C:\Windows\System32\drivers\etc\hostsinstead of/etc/hosts. Alternately, you can install a desktop environment in WSL to opendev.appsmith.comfrom a browser in WSL.127.0.0.1 dev.appsmith.com -
WSL network with windows can be brittle; make sure you can reach http://127.0.0.1:3000 from windows. If not, restarting wsl usually resolves the issue.
-
You can check logs with
docker logs wildcard-nginx. -
If you see
Address already in useerrors, look for the service running on port 80 and 443 withlsof -i tcp:80,443 | grep LISTENand stop the process.Example: Some Linux distros have
apache2listening on 80. Stop them withsudo systemctl stop apache2
- Copy
app/client/docker/templates/nginx-app.conf.templateover to your nginx sites directory. - You can remove or replace values for all the
sub_filter. None of those properties are required. - Change
proxy_passvalue for client from__APPSMITH_CLIENT_PROXY_PASS__tohttp://localhost:3000 - Replace all occurrences of
__APPSMITH_SERVER_PROXY_PASS__withhttp://localhost:8080(or the server you want to point to) - Generate the certificates manually via
mkcert. - Change the value of the certificate location for keys
ssl_certificate&ssl_certificate_keyto the place where these certificates were generated. - Reload nginx! 🎉
Please open a Github issue or join our discord server.