> For the complete documentation index, see [llms.txt](https://shaunh.gitbook.io/kairos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shaunh.gitbook.io/kairos/master.md).

# Start Me Up

### Clone the Repo

```bash
git clone https://teamsidev.visualstudio.com/Gravity/_git/Gravity
```

Go into gravity directory then next-frontend

Follow this Readme : <https://teamsidev.visualstudio.com/_git/Gravity?path=/README.md&_a=preview>

#### Potential Issues

* might need to update xcode tools : search error find an easy solution for updating the x tools
* yarn dev error : run npm install
* might need to update node : use NVM for node update : [https://tecadmin.net/install-nvm-macos-with-homebrew](https://tecadmin.net/install-nvm-macos-with-homebrew/)
* Webpack: Bundle.js - Uncaught ReferenceError: process is not defined : <https://newbedev.com/webpack-bundle-js-uncaught-referenceerror-process-is-not-defined>

### Set Up WordPress Environment

You can set up a WordPress instance using [Local by Flywheel](https://localwp.com/).

Create a folder for your WordPress code from Local. **Put it next to your cloned repo directory**. You can call it **gravity-wp-local** for uniformity. Name your Local site gravity platform so that it will match the references in the codebase.

![When you click BROWSE you will be able to set the path for the install. Choose your gravity-wp-local directory](/files/-MjG_4mHCzMWElD1-TVz)

### Install Dependencies

Add the WordPress plugins that the Gravity Platform depends on:

{% hint style="info" %}
if you don't already have composer installed, you will need to do that. `brew install composer. Or, download` [`Composer`](https://getcomposer.org/) `you may need to` [`install PHP`](https://www.php.net/downloads.php) `as well. If you are installing Composer &/or PHP you will need to close your terminal and re-open it for it to be recognized.`
{% endhint %}

Create `.env` file & add the ACF key

```bash
cd gravity/backend
composer install
```

Build the editor blocks scripts:

```bash
cd plugins/gravity-platform-core
npm install
npm start
```

Build the frontend (Next.js) styles:

```bash
cd ../../../frontend
npm install
npm run dev
```

### Add our plugins and theme to your Local WordPress environment

Go into `gravity-wp-local/app/public` and delete the `wp-content` directory.

### Create a Symlink&#x20;

```bash
ln -s TARGET PATH_TO_DIRECTORY_FOR_SYMLINK
```

TARGET: The path to the plugin in your git repository

PATH\_TO\_DIRECTORY\_FOR\_SYMLINK: The path to insert the copy of the target directory.

{% hint style="info" %}
Read more on Symlinks -> [Symbolic Link](https://en.wikipedia.org/wiki/Symbolic_link)
{% endhint %}

You can use `pwd` in the command line to get the paths for the symlink.

This should put everything in our `backend` directory into the `wp-content` directory that it will create. So, if you use pwd to find out where you are, be sure to add `wp-content` onto the end of that path.

Symlink Command for Mac

```bash
ln -s /Users/shaunhartman/Gravity/gravity/backend /Users/shaunhartman/Gravity/gravity-wp-local/app/public/wp-content
```

Symlink Command for Windows

```bash
mklink /d C:\Users\jonat\Documents\GitHub\gravity-wp-local\app\public\wp-content C:\Users\jonat\Documents\GitHub\gravity\backendNow we should see the gravity plugin available in the WordPress backend.
```

Be sure to update your PHP to 7.4.1 in Local

![](/files/xoi60I1ePjc5GXdjlka8)

Open your Wordpress Admin from Local & activate plugins

### Recent Update

Lots of Kairos project changes!

1. Our development URL is now <https://staging.kairosdxp.com/> and the site is now hosted on Lapero's Pro Vercel account. NOTE: we may switch to another URL once we start building content for the Kairos marketing website itself.
2. My personal GitHub mirror repo has been removed in favor of one on our [team GitHub organization](https://github.com/mhpteamsi/kairos-mirror). That's possible now that we're using a paid Vercel hosting plan.
3. Our Build Pipelines have been reconfigured to push commits made to our Azure Devops repo to the new `mhpteamsi/kairos-mirror` mirror repo.
4. The domain mappings service uses a new database in our official Lapero PlanetScale account.

All this means is we have a new preview URL, and that developers will need to update their local `frontend/.env` file and place the new connection string in it. You can find it here: <https://projects.lapero.io/#/notebooks/413933> (edited)&#x20;

{% hint style="info" %}
Composer needs to be version 2.2.6 (composer self-update 2.2.6)
{% endhint %}

&#x20;
