WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/server/envs/dev.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ APPSMITH_DB_URL="mongodb://localhost:27017/appsmith?replicaSet=rs0"

APPSMITH_REDIS_URL="redis://127.0.0.1:6379"

APPSMITH_GIT_ROOT=./path/to/repo/directory

APPSMITH_MAIL_ENABLED=false

APPSMITH_ENCRYPTION_PASSWORD=abcd
Expand Down
8 changes: 4 additions & 4 deletions contributions/ClientSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ On your development machine, please ensure that:
- Check below for installation and usage details:

1. Install a node version manager. For eg: check [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm).
1. In the project's root, run `nvm use 18.17.1` or `fnm use 18.17.1`.
1. In the project's root, run `nvm use 20.11.1` or `fnm use 20.11.1`.

### Running Tests on Client

Expand All @@ -115,22 +115,22 @@ To setup the configurations for running integration tests via Cypress, use these
yarn run setup
```

**Prompt:**
**Prompt:**
`Do you wish to continue without setting up the local server with docker? (yes/no):`

**Options:**
- **`no`:** Selecting "no" will trigger the setup of a local server using Docker with the `appsmith-ce:release` image.
- **`yes`:** Selecting "yes" will skip the local server setup process.


**Prompt:**
**Prompt:**
`https://dev.appsmith.com is not accessible. Do you wish to continue without setting it up? (yes/no):`

**Options:**
- **`no`:** Simply close the process.
- **`yes`:** Continue on the process for next stage

**Prompt:**
**Prompt:**
`TED (TestEventDriver) is not running. Do you want to pull & run the latest Docker container for TED (TestEventDriver)? (yes/no):`

**Options:**
Expand Down
120 changes: 115 additions & 5 deletions contributions/ServerSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,27 @@ Before you can start to hack on the Appsmith server, your machine should have th

- Java - OpenJDK 17.
- Maven - Version 3+ (preferably 3.6).
- Node.js - Version 20.11.1 (required for RTS server). You can use a node version manager like [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) to manage Node versions.
- A MongoDB database - Refer to the [Setting up a local MongoDB instance](#setting-up-a-local-mongodb-instance) section to setup a MongoDB instance using `Docker`.
- A Redis instance - Refer to the [Setting up a local Redis instance](#setting-up-a-local-redis-instance) section to setup a Redis instance using `Docker`.
- An IDE - We use IntelliJ IDEA as our primary IDE for backend development. To set it up, refer to the [Setting up IntelliJ IDEA](#setting-up-intellij-idea) section.

This document doesn't provide instructions to install Java and Maven because these vary between different operating systems and distributions. Please refer to the documentation of your operating system or package manager to install these. Next we will setup MongoDB and Redis using `Docker`.

#### Verify your Java and Maven versions
Before continuing, make sure the binaries on your `PATH` point to Java 17:

```bash
java -version
mvn -v
echo $JAVA_HOME
```

You should see `17` in the `java -version` output, and `mvn -v` should report `Java version: 17`. If another major version (for example `25`) appears, Maven will fail to build the server because Appsmith targets Java 17.

> If `java -version` or `mvn -v` show a newer JDK, switch your environment back to 17 before proceeding. On macOS you can run `export JAVA_HOME=$(/usr/libexec/java_home -v 17)` and restart the terminal; on Linux/Windows use your JDK manager (e.g. `sdkman`, `jenv`, OS package manager) to activate a Java 17 installation and update `JAVA_HOME`.

After updating `JAVA_HOME`, confirm `echo $JAVA_HOME` points to the Java 17 directory and re-run the commands above until the outputs reference version 17.

### Setting up a local MongoDB instance
* The following command will start a MongoDB docker instance locally:
Expand Down Expand Up @@ -155,11 +170,60 @@ With the prerequisites met, let's build the code.
sudo APPSMITH_DB_URL="mongodb://localhost:27017/appsmith" APPSMITH_REDIS_URL="redis://127.0.0.1:6379" APPSMITH_MAIL_ENABLED=false APPSMITH_ENCRYPTION_PASSWORD=abcd APPSMITH_ENCRYPTION_SALT=abcd ./build.sh
```

8. To point to a custom Git Root where the git repositories will be persisted, update the env variable called APPSMITH_GIT_ROOT to point to your custom file path.

```console
APPSMITH_GIT_ROOT=./path/to/repo/directory
```

8. Start the Java server by running
9. Running the RTS (Real-Time Server)

The RTS Server enables real-time communication features in Appsmith, such as collaborative editing and live synchronization via WebSockets.

### When do you need to run RTS?

**You need RTS if you are:**
- Running the Java server locally and working on collaborative features
- Developing or testing real-time synchronization functionality
- Testing the full editor experience with live updates between multiple users
- Working on features that depend on WebSocket communication

**You can skip RTS if you are:**
- Only making backend changes that don't involve real-time features
- Working on individual components without multi-user synchronization requirements
- Testing basic API functionality that doesn't require live updates

### Steps to run RTS:

1. Ensure you have Node.js 20.11.1 installed. If you have a different version, use a node version manager:
```console
nvm use 20.11.1
```
or
```console
fnm use 20.11.1
```

2. Navigate to the RTS directory:
```console
cd app/client/packages/rts
```

3. Create the environment file:
```console
cp .env.example .env
```

4. Start the RTS server:
```console
./start-server.sh
```

The RTS server will start and be ready to handle real-time WebSocket connections.

10. Start the Java server by running
```console
./scripts/start-dev-server.sh
./app/server/scripts/start-dev-server.sh
```

- By default, the server will start on port 8080.
Expand All @@ -179,6 +243,7 @@ Before you can start to hack on the Appsmith server, your machine should have th
- An IDE - We use IntelliJ IDEA as our primary IDE for backend development.
- Java - OpenJDK 17 in WSL.
- Maven - Version 3+ (preferably 3.6) in WSL.
- Node.js - Version 20.11.1 in WSL (required for RTS server). You can use a node version manager like [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) to manage Node versions.

This document doesn't provide instructions to install Java and Maven because these vary between different operating systems and distributions. Please refer to the documentation of your operating system or package manager to install these.

Expand Down Expand Up @@ -283,17 +348,62 @@ Check failed: Docker environment should have more than 2GB free disk space.
There are two ways to resolve this issue: (1) free up more space (2) change docker's data root path.


7. Start the Java server by running
7. Running the RTS (Real-Time Server)

The RTS Server enables real-time communication features in Appsmith, such as collaborative editing and live synchronization via WebSockets.

### When do you need to run RTS?

**You need RTS if you are:**
- Running the Java server locally and working on collaborative features
- Developing or testing real-time synchronization functionality
- Testing the full editor experience with live updates between multiple users
- Working on features that depend on WebSocket communication

**You can skip RTS if you are:**
- Only making backend changes that don't involve real-time features
- Working on individual components without multi-user synchronization requirements
- Testing basic API functionality that doesn't require live updates

### Steps to run RTS:

1. Ensure you have Node.js 20.11.1 installed. If you have a different version, use a node version manager:
```console
nvm use 20.11.1
```
or
```console
fnm use 20.11.1
```

2. Navigate to the RTS directory:
```console
cd app/client/packages/rts
```

3. Create the environment file:
```console
cp .env.example .env
```

4. Start the RTS server:
```console
./start-server.sh
```

The RTS server will start and be ready to handle real-time WebSocket connections.

8. Start the Java server by running

```console
./scripts/start-dev-server.sh
```

By default, the server will start on port 8080.

8. When the server starts, it automatically runs migrations on MongoDB and will populate it with some initial required data.
9. When the server starts, it automatically runs migrations on MongoDB and will populate it with some initial required data.

9. 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 HTTP 401 error.
10. 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 HTTP 401 error.

Now the last bit, let's get your Intellij IDEA up and running.

Expand Down
Loading