# I'M HERE 
I'M HERE is a campaign webapp built for Amnesty Switzerland.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

What things you need to install:

```
composer
node / npm
php >7.0
```

### Installing

A step by step series of examples that tell you have to get a development env running

Go to the root folder of the project and install all packages necessary:
```
cd [root]
composer install
```

After install the necessary packages for the app, install the node_modules necessary for the frontend env:

```
cd [root]/dev/
npm install
```

There are 4 main tasks described on gulp

```
gulp styles
* This task compiles all the *.scss assets to /public/
```

```
gulp bundle-app
* This task compiles all the *.js assets to /public/
```

```
gulp production
* This task compiles all the *.js & *.scss assets to /public/ in production mode (minified, etc)
```

```
gulp
* The default gulp task, runs the watcher, styles and bundle-app. It's the task you want to use for your dev flow.
```

## GIT

Bellow there's a simple explanation on each main branch in git
```
Master
* The main branch is Master, each and every work should start as a branch of Master
```

```
station_io
* This is the branch to deploy on STATION's *.io environment, it's suitableas a STAGING environment
```

```
ninja
* This is the branch to deploy on STATION's *.ninja environment, it's suitableas a DEV environment
```

```
live
* This is the branch to deploy changes to the LIVE environment. It should always be feeded by MASTER.
```

## Deployment

Notes on how to deploy on each environment:

#### Station Ninja:
All information regarding Ninja access's are under 1password of STATION.
The branch of this environment as mentioned above is NINJA.
```
cd /sub/imhere
git pull
[write your credentials]
cd dev
gulp bundle-app
gulp styles
```

#### Station IO:
All information regarding IO access's are under 1password of STATION.
The branch of this environment as mentioned above is STATION_IO.
```
cd /sub/imhere
git pull
[write your credentials]
cd dev
gulp bundle-app
gulp styles
```

#### Live:
The live server is on AMAZON.
To access that, you'll need a *.pem file. You can ask [Luisa](luisa@station.ch) for it.
All information regarding Amazon access's are under 1password of STATION.
The branch of this environment as mentioned above is live.
```
cd /home/www/imhere.amnesty.ch/htdocs
git pull
[write your credentials]
cd dev
gulp production
```

## Built With

* [Laravel](https://laravel.com/)
* [Node/NPM](https://nodejs.org/en/)
* [Composer](https://getcomposer.org/)
* [Webpack](https://webpack.js.org/) 

## Devs

* **Carlos Martinho** - [Email](carlos@eae.pt)
* **Ilias Trichopoulos** - [Email](ilias@station.ch)

