# Setup local environmen

If you do not want to use the `npm` version of Anacleto you can connect the development environment to a local version of the builder.&#x20;

{% hint style="danger" %}
Follow this guide only if you intend to modify the Anacleto Builder sources, otherwise we strongly recommend that you use the stable releases on npm
{% endhint %}

{% hint style="info" %}
Follow this guide if you are a developer and want to edit `anacleto-backend`or `anacleto-frontend`
{% endhint %}

First thing download `Anacleto` project from [Git Repository](https://github.com/anacletobuilder/anacleto).

We suggest that you organize your files this way, but feel free to organize them however you like.

```
workspace
│
└───anacleto (Git repo)
│   └───anacleto-backend
│   └───anacleto-frontend
└───anacleto-apps
│   └───sample-app-1-frontend
│   └───sample-app-1-backend
│   └───sample-app-1-data
│   └───sample-app-1-logs
│   └───sample-app-2-frontend
│   └───sample-app-2-backend
│   └───sample-app-2-data
│   └───sample-app-2-logs
```

Open a terminal in `anacleto-fronend` folder and run `npm install`

Open a terminal in `anacleto-backend` folder and run `npm install`

Create a `sample-app-1-backend` application ([docs](https://anacleto.gitbook.io/anacleto/getting-started/setup-anacleto/..#anacleto-backend)) and link to your local version of `anacleto-backend` instead of `npm` version

```bash
cd <sample-app-1-backend>
npm link <anacleto-backend-path>/anacleto-backend
```

> Es: `cd workspace/anacleto-apps/sample-app-1-backend && sudo npm link ../../anacleto/anacleto-backend`

Create a `sample-app-1-frontend` application ([docs](https://anacleto.gitbook.io/anacleto/getting-started/setup-anacleto/..#anacleto-frontend)) and link to your local version of `anacleto-frontend`:

```bash
cd <sample-app-1-frontend>
npm link <anacleto-frontend-path>/anacleto-frontend
```

> Es: `cd workspace/anacleto-apps/sample-app-1-frontend && sudo npm link ../../anacleto/anacleto-frontend/`

Connect `anacleto-frontend` library to you application react (to avoide react hook errors), run from :

```bash
cd <anacleto-frontend-path>
npm link <sample-app-1-frontend>/node_modules/react
```

> Es: `cd workspace/anacleto/anacleto-frontend && sudo npm link ../../anacleto-apps/sample-app-1-frontend/node_modules/react`

Automatically recompile library and work locally on it (your src/ module are automatically recompile it into dist/ whenever you make changes.):

```bash
cd anacleto-frontend && npm start
```
