2017-10-22 20:00:29 +00:00
|
|
|
# Baby Buddy
|
|
|
|
|
2017-10-22 22:24:52 +00:00
|
|
|
[![Build Status](https://travis-ci.org/cdubz/babybuddy.svg?branch=master)](https://travis-ci.org/cdubz/babybuddy)
|
|
|
|
[![Coverage Status](https://coveralls.io/repos/github/cdubz/babybuddy/badge.svg?branch=master)](https://coveralls.io/github/cdubz/babybuddy?branch=master)
|
2017-10-23 08:25:31 +00:00
|
|
|
[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
|
2017-10-22 22:24:52 +00:00
|
|
|
|
2017-10-22 21:08:16 +00:00
|
|
|
A buddy for babies! Helps caregivers track sleep, feedings, diaper changes, and
|
2017-10-24 00:33:28 +00:00
|
|
|
tummy time to learn about and predict baby's needs without (*as much*) guess
|
2017-10-23 14:38:52 +00:00
|
|
|
work.
|
|
|
|
|
2017-10-28 03:20:52 +00:00
|
|
|
![Baby Buddy desktop view](screenshot.png)
|
|
|
|
|
|
|
|
![Baby Buddy mobile views](screenshot_mobile.png)
|
2017-10-22 20:00:29 +00:00
|
|
|
|
2017-11-15 18:08:13 +00:00
|
|
|
**Table of Contents**
|
|
|
|
|
|
|
|
- [Demo](#demo)
|
|
|
|
- [Deployment](#deployment)
|
|
|
|
- [Heroku](#heroku)
|
|
|
|
- [Nanobox](#nanobox)
|
|
|
|
- [Development](#development)
|
|
|
|
- [Installation](#installation)
|
|
|
|
- [Fake data](#fake-data)
|
|
|
|
- [Testing](#testing)
|
|
|
|
|
2017-10-23 09:25:56 +00:00
|
|
|
## Demo
|
|
|
|
|
2017-10-23 14:38:52 +00:00
|
|
|
A [demo of Baby Buddy](https://babybuddy.herokuapp.com) is available on Heroku.
|
|
|
|
The demo instance resets every hour. Login credentials are:
|
|
|
|
|
|
|
|
- Username: `admin`
|
|
|
|
- Password: `admin`
|
2017-10-23 09:25:56 +00:00
|
|
|
|
2017-10-24 00:33:28 +00:00
|
|
|
## Deployment
|
|
|
|
|
|
|
|
**:warning: Baby Buddy is still in early development and does not yet have a
|
|
|
|
stable production deployment flow. :warning:**
|
|
|
|
|
2017-11-15 18:08:13 +00:00
|
|
|
The default user name and password for Baby Buddy is `admin`/`admin`. For any
|
|
|
|
deployment, **log in and change the default password immediately**.
|
|
|
|
|
2017-10-24 00:33:28 +00:00
|
|
|
### Heroku
|
|
|
|
|
|
|
|
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
|
|
|
|
|
2017-11-15 18:08:13 +00:00
|
|
|
For manual deployments to Heroku without using the deploy button, make sure to
|
|
|
|
create two settings before pushing using `heroku config:set`:
|
|
|
|
|
|
|
|
heroku config:set DJANGO_SETTINGS_MODULE=babybuddy.settings.heroku
|
|
|
|
heroku config:set SECRET_KEY=<CHANGE TO SOMETHING RANDOM>
|
|
|
|
|
|
|
|
### Nanobox
|
|
|
|
|
|
|
|
An example [Nanobox](https://nanobox.io/) configuration, `boxfile.yml`, is
|
|
|
|
provided with Baby Buddy. The steps below are a rough guide to deployment. See
|
|
|
|
[Create and Deploy a Custom Django App](https://guides.nanobox.io/python/django/)
|
|
|
|
for detailed information about Nanobox's deployment and configuration process.
|
|
|
|
|
|
|
|
1. Clone/download the Baby Buddy repo
|
|
|
|
|
|
|
|
git clone https://github.com/cdubz/babybuddy.git
|
|
|
|
|
|
|
|
1. Enter the cloned/downloaded directory
|
|
|
|
|
|
|
|
cd babybuddy
|
|
|
|
|
|
|
|
1. Add the `SECREY_KEY` and `DJANGO_SETTINGS_MODULE` environment variables
|
|
|
|
|
|
|
|
nanobox evar add DJANGO_SETTINGS_MODULE=babybuddy.settings.nanobox
|
|
|
|
nanobox evar add SECRET_KEY=<CHANGE TO SOMETHING RANDOM>
|
|
|
|
|
|
|
|
1. Deploy! :rocket:
|
|
|
|
|
|
|
|
nanobox deploy
|
2017-10-24 00:33:28 +00:00
|
|
|
|
2017-10-23 08:25:31 +00:00
|
|
|
## Development
|
|
|
|
|
|
|
|
### Installation
|
2017-10-22 20:00:29 +00:00
|
|
|
|
2017-11-15 18:08:13 +00:00
|
|
|
pip install pipenv
|
|
|
|
pipenv install --dev
|
|
|
|
npm install -g gulp-cli
|
|
|
|
npm install
|
|
|
|
gulp migrate
|
|
|
|
gulp
|
2017-10-22 20:00:29 +00:00
|
|
|
|
2017-10-22 20:50:47 +00:00
|
|
|
Open [http://127.0.0.1:8000](http://127.0.0.1:8000) and log in with the default
|
2017-10-23 14:38:52 +00:00
|
|
|
user name and password (`admin`/`admin`).
|
2017-10-22 20:50:47 +00:00
|
|
|
|
2017-10-22 20:00:29 +00:00
|
|
|
### Fake data
|
|
|
|
|
2017-10-26 16:26:09 +00:00
|
|
|
Add some fake data to the database with the following command:
|
2017-10-22 20:00:29 +00:00
|
|
|
|
2017-11-15 18:08:13 +00:00
|
|
|
gulp fake
|
2017-10-24 00:33:28 +00:00
|
|
|
|
2017-10-26 16:26:09 +00:00
|
|
|
By default, ``fake`` creates one child and 31 days of random data. Use the
|
|
|
|
``--children`` and ``--days`` flags to change the default values, e.g.
|
|
|
|
``gulp fake --children 5 --days 7`` to generate five fake children and seven
|
|
|
|
days of data for each.
|
|
|
|
|
2017-10-24 00:33:28 +00:00
|
|
|
### Testing
|
|
|
|
|
|
|
|
:exclamation: Tests require static files to be collected, it may be necessary
|
|
|
|
to execute ``gulp build && gulp collectstatic`` before tests (if static files
|
|
|
|
have changed).
|
|
|
|
|
2017-11-15 18:08:13 +00:00
|
|
|
gulp test
|