Skip to content

OCD Action App - A collaborative, youth­led project aiming to make use of digital technology to provide mental health support to children & adolescents suffering with anxiety.

Notifications You must be signed in to change notification settings

womenhackfornonprofits/ocdaction

Repository files navigation

OCD Action

Content

  1. Description
  2. Setup
  3. Contributing

Description

A collaborative, youth­led project aiming to make use of digital technology to provide mental health support to children & adolescents suffering with anxiety.

More Info

Tech

  • Python + Django
  • JavaScript for some interactions/ lazy loading images etc
  • Chart.js
  • Sass + HTML
  • Github
  • Slack for group chats/standups etc

Setup

Tools

  1. Terminal: iTerm2 (MacOSX), Terminator (Linux) or use your preffered one.
  2. Text Editor: Sublime Text or you preffered one.

Dev Enviroment Setup

  1. Install Git

  2. Install virtualenv:

    sudo pip install virtualenv

  3. Install virtualenvwrapper: sudo pip install virtualenvwrapper

    If you are on OS X El Capitan, you might get the following error:

    Uninstalling six-1.4.1:
    	Exception:
      	Traceback (most recent call last):
      	...
      	OSError: [Errno 1] Operation not permitted: '/var/folders/7x/h9sy5ff95bl45569k5km9g5m0000gn/T/pip-aWCOxi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
    

    If that happens, re-run the command with the flag --ignore-installed six

  4. Source the virtualenvwrapper: source /usr/local/bin/virtualenvwrapper.sh

    NOTE: To help do this automatically on every new shell you open add the line above to your .bash_profile or .bashrc

  5. Create a new env for the project:

    mkvirtualenv ocdaction

  6. Get the code:

    git clone git@github.com:womenhackfornonprofits/ocdaction.git

  7. Go inside the ocdaction directory:

    cd ocdaction

  8. Activate the virtual enviroment:

    workon ocdaction

    This will now ensure anything you install is within this enviroment.

  9. You will need to have Postgres installed and up and running. You can onstall it via:

  10. Make sure the Postgres Server is up and running:

    • If using the App simply start the server from there
    • If using command line: brew services start postgresql
  11. Install the requirements:

    pip install -r requirements/base.txt

    This will get all the dependencies.

  12. Create a database locally for the project to run:

    createdb ocdaction

  13. Go inside frontend folder:

    cd frontend

  14. Install all the dependencies:

    npm install

    This will get all the dependencies

Running the project locally

  1. Go inside the django app directory:

    cd ocdaction

  2. Run django server:

    python manage.py runserver

  3. The project is now running on http://127.0.0.1:8000/, go to that address in your browser.

  4. You may see a message that you have unapplied migrations, when you see this simply run the command below which will create any tables and fields in the database:

    python manage.py migrate

  5. To run tests, run pytest from within the app directory. This will run all tests within that directory and subfolders.

Front End changes

  1. Make css and javascript changes in the frontend folder
  2. Make any HTML changes in the Django templates located in ocdaction/templates
  3. Use grunt watch in the frontend folder to build, watch and copy all the required files automatically into the Django static folder.

Deploying to Heroku

  1. Create a Heroku Account
  2. Get added to the app in the Heroku Dashboard
  3. Download Heroku toolbelt: wget -qO- https://toolbelt.heroku.com/install.sh | sh
  4. In the terminal heroku login
  5. Within you project directory heroku git:remote -a staging-ocdaction
  6. Once you are ready to deploy, from master branch you can run git push heroku master make sure you have commited all the changes before running this and the git status is clean.
  7. Go to https://staging-ocdaction.herokuapp.com/ to view the live site.

Contributing

Please follow a few guidelines in order to contribute to the project set out in the Contributing file

About

OCD Action App - A collaborative, youth­led project aiming to make use of digital technology to provide mental health support to children & adolescents suffering with anxiety.

Resources

Stars

Watchers

Forks

Packages

No packages published