> For the complete documentation index, see [llms.txt](https://icehrm.gitbook.io/icehrm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://icehrm.gitbook.io/icehrm/developer-guide/setup-development-environment.md).

# Setup Development Environment

## Clone the IceHrm repo

```
$ git clone https://github.com/gamonoid/icehrm.git
```

## Check prerequisites

{% hint style="info" %}
You will be more productive when using vagrant for your development environment
{% endhint %}

### Install Virtual Box

Please download and install virtual box for your platform from here: <https://www.virtualbox.org/wiki/Downloads>

### Install Vagrant

Instructions for installing vagrant <https://www.vagrantup.com/docs/installation>

Then we need to install vagrant host updater plugin

```
$ vagrant plugin install vagrant-hostsupdater
```

## Build Frontend Assets

Icehrm has two pakage.json files. Once under the root and the other one under /web directory. NPM should run on both locations

```
$ npm install
$ cd web
$ npm install
$ cd ..
$ npm install -g gulp-cli
$ gulp
```

## Add Development Configuration

Create file **icehrm/app/config.php**

```php
<?php
$protocol = $_SERVER["REQUEST_SCHEME"] ? : 'http';
define('CLIENT_NAME', 'icehrm');

// ------- Vagrant ---------
ini_set('error_log', '/vagrant/app/data/icehrm.log');
define('APP_BASE_PATH', '/vagrant/core/');
define('CLIENT_BASE_PATH', '/vagrant/app/');
define('BASE_URL',$protocol.'://icehrm.os/web/');
define('CLIENT_BASE_URL',$protocol.'://icehrm.os/app/');

define('APP_DB', 'icehrm');
define('APP_USERNAME', 'dev');
define('APP_PASSWORD', 'dev');
define('APP_HOST', 'localhost');
define('APP_CON_STR', 'mysqli://'.APP_USERNAME.':'.APP_PASSWORD.'@'.APP_HOST.'/'.APP_DB);
// ----------------------------



//file upload
define('FILE_TYPES', 'jpg,png,jpeg');
define('MAX_FILE_SIZE_KB', 10 * 1024);
```

## Start Vagrant

The pre-built IceHrm vagrant box contains php 7.3 / nginx and MySQL 5.7 installed. Nginx configurations are loaded from `icehrm/deployment/vagrant`

```
$ vagrant up
```

Then navigate to <http://icehrm.os> and login with credentails, admin / admin


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://icehrm.gitbook.io/icehrm/developer-guide/setup-development-environment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
