GithubHelp home page GithubHelp logo

samojeyinka / flaredown Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rubyforgood/flaredown

0.0 0.0 0.0 18 MB

Flaredown web app and API

Home Page: http://www.flaredown.com

License: GNU General Public License v3.0

Shell 0.03% JavaScript 29.50% Ruby 53.34% TypeScript 1.47% Makefile 0.07% HTML 0.90% Handlebars 10.28% Dockerfile 0.17% SCSS 4.22% Procfile 0.01%

flaredown's Introduction

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, raise a GitHub issue, or email contact@flaredown.

Environment

  • PostgreSQL 12.8
  • MongoDB 4.4.9
  • Redis 6.2.3
  • Ruby 3.1.3
  • Node 12.22.6

Installation

The application and all dependencies are dockerized and can be run using docker compose, so there's no dependencies to install other than Docker. Alternatively, you can run the app using the make commands available: make help

If you want to run the application on your own machine see the next sections on dependency installations

Running natively

Mac Prerequisites

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

You can install the dependencies via asdf-vm declared in the .tool-versions file, or:

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

React Native

cd native
npm install

Development

Prerequisites

  • Populate the necessary environment parameters with cp backend/env-example backend/.env && cp backend/env-example frontend/.env
  • Create a Facebook dev app and paste your own ID into frontend/.env file's FACEBOOK_APP_ID parameter.
    • Note: This is not necessary in backend/.env but we have not yet cleaned up these two files into the necessary components.
  • Seed your database using make seed or bundle exec rails app:setup

Running

If you are running the application natively, run the following to start your server. If you're using docker, this should be up and running already.

rake run

Visit your app at http://localhost:4300 for the current ember application, or http://localhost:19006 for the React Native version.

Running tests locally

  1. Run make build or docker compose build backend to ensure the latest backend is built and being run
  2. To run all tests run make specs or script/backend rspec spec spec, or you can run a specific test suite such as script/backend rspec spec spec/services/weather_retriever_spec.rb
  3. Debugging tip: in Ruby code you can add a line that says debugger and rspec will automatically break on that line and give you an interactive Ruby shell

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 pull requests to be merged.

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

๐ŸŽจ Figma Assets

Common Problems

  • On first load, the app displays a blank beige screen instead of the login screen. Temporary fix is to add console.log(process.env.FACEBOOK_APP_ID) right inside of the module.exports at the top of the frontend/config/environment.js file. You can then refresh the page (no need to kill Docker) and this should fix it. You can now remove the log.

License

Copyright 2015-2024 Logan Merriam and contributors.

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

flaredown's People

Contributors

algodave avatar mpugach avatar safeforge avatar compwron avatar x-tina avatar lmerriam avatar dependabot[bot] avatar benlangfeld avatar bklang avatar mansona avatar tonkpils avatar codemonium avatar haydenrou avatar johnpaulashenfelter avatar batistadev1113 avatar hussam-i-am avatar kre8sions avatar bglusman avatar cwille97 avatar freestylebit avatar alysonbasilio avatar esquith avatar jasperfurniss avatar joekarow avatar samanthar8 avatar atinybeardedman avatar seanmarcia avatar solebared avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.