2019-04-10 16:58:26 +02:00
# offen
2019-04-20 03:41:21 +02:00
[![CircleCI ](https://circleci.com/gh/offen/offen/tree/master.svg?style=svg )](https://circleci.com/gh/offen/offen/tree/master)
2019-04-26 04:19:47 +02:00
[![Pivotal Tracker ](https://img.shields.io/static/v1.svg?label=Project+Planning&message=Pivotal+Tracker&color=informational )](https://www.pivotaltracker.com/n/projects/2334535)
2019-04-10 18:17:24 +02:00
> The offen analytics software
This repository contains all source code needed to build and run __offen__ , both on the server as well as on the client.
---
2019-04-26 04:19:47 +02:00
Development of __offen__ has just started, so instructions are rare and things will stay highly volatile for quite some while. Also __do not use the software in its current state__ as it is still missing crucial pieces in protecting the data end to end.
Guidelines for running and developing the Software will be added when it makes sense to do so.
2019-04-10 18:17:24 +02:00
2019-04-26 04:19:47 +02:00
Project planning and issue tracking is done using [Pivotal Tracker ](https://www.pivotaltracker.com/n/projects/2334535 ), but feel free to open a GitHub issue if you have a question or found a bug.
2019-04-10 18:17:24 +02:00
2019-04-19 18:56:24 +02:00
### Developing the application
2019-04-26 04:08:17 +02:00
#### Local cookies and SSL
2019-05-02 04:34:00 +02:00
In local development __offen__ requires to be served both via SSL (in order to use window.crypto) as well as a `local.offen.dev` host.
2019-04-26 04:08:17 +02:00
This requires the following steps to be taken:
1. Edit your `/etc/hosts` to include the following line:
```
2019-05-02 04:34:00 +02:00
127.0.0.1 local.offen.dev
2019-04-26 04:08:17 +02:00
```
2. Install and setup [mkcert ](https://github.com/FiloSottile/mkcert ). Assuming you have Go installed, this looks like:
```
$ go get -u github.com/FiloSottile/mkcert
$ mkcert -install
```
2019-05-02 04:34:00 +02:00
3. Navigate into the repository root and create a local certificate and key for the `local.offen.dev` host:
2019-04-26 04:08:17 +02:00
```
2019-05-02 04:34:00 +02:00
$ mkcert local.offen.dev
2019-04-26 04:08:17 +02:00
```
You can test setup by starting the application:
```
$ docker-compose up
```
2019-05-02 04:34:00 +02:00
Now you should be able to access < https: / / local . offen . dev:8080 / status > in your browser without any security warnings.
2019-04-26 04:08:17 +02:00
2019-04-19 18:56:24 +02:00
#### `server`
To work on the `server` you will need to install `docker-compose` and Go 1.12+.
First, bootstrap the dockerized Postgres database used for development:
```
2019-04-20 01:37:26 +02:00
docker-compose run server make bootstrap
2019-04-19 18:56:24 +02:00
```
Run the server:
```
docker-compose up
```
Run the tests:
```
docker-compose run server make
```
2019-04-20 05:16:21 +02:00
#### `vault`
To work on the `vault` you will need to install `docker-compose` .
First, install the project's dependencies:
```
2019-04-20 17:06:06 +02:00
cd vault
npm install
2019-04-20 05:16:21 +02:00
```
Run the server:
```
docker-compose up
```
Run the tests:
```
2019-04-20 17:06:06 +02:00
cd vault
npm test
2019-04-20 05:16:21 +02:00
```
2019-04-10 18:17:24 +02:00
### License
2019-05-02 04:34:00 +02:00
MIT © [offen ](https://www.offen.dev )