Skip to content

Latest commit

 

History

History
95 lines (67 loc) · 4.35 KB

File metadata and controls

95 lines (67 loc) · 4.35 KB

Flaredown

rspec frontend ERB lint standardrb lint

Flaredown makes it easy for people to track symptoms over time, and learn how to control them. Our goal is to analyze the aggregate data from users of this tool to understand the probable effects of treatments and environmental stressors on chronic illness.

Help would be appreciated! Please join us in slack #flaredown or raise a github issue, or email the contact@flaredown email which is currently checked every few days.

Environment

Installation

If you are running on an M1 mac, run the following command before you start the installation process:

$env /usr/bin/arch -arm64 /bin/zsh ---login

Remove all gems before you proceed

gem uninstall -aIx

Backend

On macOS, you can install libpq by running brew install libpq && brew link --force libpq && bundle config --local build.pg "--with-ldflags=-L$(brew --prefix libpq)/lib --with-pg-include=$(brew --prefix libpq)/include", which is required for bundle install to succeed.

cd backend
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
bundle config set --local without 'production'
bundle config set --local jobs 5
bundle config set --local retry 10
bundle install
cp env-example .env # You may adjust it however you like
                    # RVM is going to autoload this on every 'cd' to the directory
bundle exec rake app:setup

gem install foreman

Frontend

cd frontend
npm install

Running / Development

From the project root:

docker compose up
rake run

Visit your app at http://localhost:4300

Open API Documentation

This project is using the rswag gem to generate interactive api documentation. You can access this documentation locally at http://localhost:3000/api-docs/index.html. If you make changes to the api, you will need to run bundle exec rake rswag from the backend directory to update the generated examples.

CI

Several checks are configured to run on all commits using Github Actions, including lint, build and test steps. Definitions can be found in ./github/workflows. Those checks which always run are required to be successful for PRs to be mergable.

Deployment

Deployments target Heroku. The traditional deployment is manually configured and is composed of two distinct applications (frontend and api) in two environments (staging and production), with automatic deployments to staging of commits to master:

Addons are used for Heroku Postgres, Heroku Redis, Heroku Scheduler + Papertrail. MongoDB is provided by mongodb.com.

Style Guide

License

Copyright 2015-2017 Logan Merriam and contributors.

Flaredown is open source software made available under the GPLv3 License. For details see the LICENSE file.