# Scromodoro

Task manager that follows the Scromodoro development methodology.

## Getting started

In order to use this application, you will require the following:

* Elixir 1.10+ in order to compile the code.
* Docker (local only) in order to get up the needed containers.
* Docker-compose to run the `docker-compose.yml` file.

Download the source code and go through your terminal to its root folder.

Then run the following commands (local running):

1. `$ docker-compose up -d` - It will get up the DB in background. Once ready it will be available through **Adminer** on *http://localhost:8080*
2. `$ mix setup` - It will get the needed dependencies for the project and will prepare the DB (create the repo and migrate the tables).
3. `$ mix phx.server` - This will finally get the server up and running. 

Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.

## Database

The details to access the local DB through Adminer are the following:

```Elixir
Server: "database"
username: "root"
password: "scromodoro"
database: "scromodoro_dev"
```

On the first run, when you register a user, can be interesting to go to the `users` table and change its role to `admin`. Then you will have access to all the administrator actions in the app.

## Metrics

Thanks to Phoenix LiveDashboard, monitoring the page is really easy!

If you are running on a local environment, to access the dashboard you can:

1. Click on the Phoenix icon located on the right side of the header.
2. Go to *http://localhost:4000/dashboard*

There you can see the amount of processes running, how much memory the app is consuming, the CPU consuming, etc.