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

# Installation

This is documentation for local installation production installation coming soon.

## Installation

Analytics Box is divided into 2 main parts&#x20;

1. Backend
2. Tracker

First clone git repo

```
$ git clone https://github.com/KetanIP/analytics/
```

Then create a `config.json` file in `backend` folder.

```javascript
{
    "test_mode": true,
    "test_ip": "YOUR_PUBLIC_IP_HERE",
    "database_url": "CLICKHOUSE_URL",
    "queries_file": "./queries/pg_queries.sql",
    "database_driver": "clickhouse"
}
```

Then to start backend use the following commands

```bash
$ # Install go dependencies
$ go run .\main.go
```

Your backend should run on <http://localhost:3000/> .

To run frontend for test run the following commands.

{% code title="command line" %}

```bash
$ cd .\tracker
$ npm i
$ npm run dev
```

{% endcode %}

It will start a test severs on <http://localhost:1234> .
