Giter Club home page Giter Club logo

babybuddy / babybuddy Goto Github PK

View Code? Open in Web Editor NEW
1.9K 35.0 239.0 63.44 MB

A :baby: buddy to help caregivers track sleep, feedings, diaper changes, and tummy time to learn about and predict baby's needs without (as much) guess work.

Home Page: https://docs.baby-buddy.net/

License: BSD 2-Clause "Simplified" License

Python 77.71% JavaScript 2.74% HTML 18.04% Shell 0.01% SCSS 0.98% Procfile 0.01% HCL 0.52%
baby parents tracker self-hosted python django dashboard parenting

babybuddy's Introduction

Baby Buddy

License Gitter CI Status Coverage Status Gitpod ready-to-code Open in GitHub Codespaces ready-to-code Code style: black

A buddy for babies! Helps caregivers track sleep, feedings, diaper changes, tummy time and more to learn about and predict baby's needs without (as much) guess work.

Baby Buddy desktop view

Baby Buddy mobile views

๐Ÿ‘พ Demo

A demo of Baby Buddy is available. The demo instance resets every hour. Login credentials are:

  • Username: admin
  • Password: admin

๐Ÿ“˜ Documentation

Visit https://docs.baby-buddy.net for full documentation.

Additional documentation

๐Ÿ—บ๏ธ Languages

Baby Buddy is available in a variety of languages thanks to the efforts of numerous translators. Language can be set on a per-user basis from the user settings page (/user/settings/). See Contributing for information about how to create/update translations.

Available languages

๐Ÿ‡ง๐Ÿ‡ท Brazilian Portuguese, ๐Ÿ‡ช๐Ÿ‡ธ Catalan, ๐Ÿ‡จ๐Ÿ‡ณ Chinese (simplified), :czech*republic: Czech, ๐Ÿ‡ฉ๐Ÿ‡ฐ Danish, ๐Ÿ‡ณ๐Ÿ‡ฑ Dutch, ๐Ÿ‡ฌ๐Ÿ‡ง English (U.K.), ๐Ÿ‡บ๐Ÿ‡ธ English (U.S.) *(base)_, ๐Ÿ‡ซ๐Ÿ‡ฎ Finnish, ๐Ÿ‡ซ๐Ÿ‡ท French, ๐Ÿ‡ฉ๐Ÿ‡ช German, ๐Ÿ‡ฎ๐Ÿ‡ฑ Hebrew, ๐Ÿ‡ญ๐Ÿ‡บ Hungarian, ๐Ÿ‡ฎ๐Ÿ‡น Italian, ๐Ÿ‡ณ๐Ÿ‡ด Norwegian Bokmรฅl, ๐Ÿ‡ต๐Ÿ‡ฑ Polish, ๐Ÿ‡ต๐Ÿ‡น Portuguese, ๐Ÿ‡ท๐Ÿ‡บ Russian, ๐Ÿ‡ฒ๐Ÿ‡ฝ ๐Ÿ‡ช๐Ÿ‡ธ Spanish, ๐Ÿ‡ธ๐Ÿ‡ช Swedish, ๐Ÿ‡น๐Ÿ‡ท Turkish, ๐Ÿ‡บ๐Ÿ‡ฆ Ukrainian

๐ŸŒ Baby Buddy on the Web

This is a non-exhaustive list of neat projects and blog posts that either extend or use Baby Buddy in fun ways. If you have a project to share please open a PR adding it here or reach out via GitHub Issues or Discussions or on Gitter!

Smart home

Hardware

Mobile

Videos

Other

๐Ÿ” Reporting Vulnerabilities

See SECURITY.md for information about where and how to report potential Baby Buddy vulnerabilities.

โค๏ธ Support

Contribution and sponsorship

Contribute or sponsor Baby Buddy's contributors using any of the following methods:

Tools and infrastructure

The following organizations and services support Baby Buddy contributors in various ways (software licensing, service credits, etc.).

Some of the links below use referral codes -- all referral proceeds are treated as contributions to the Baby Buddy project.

DigitalOcean Referral Badge JetBrains Logo (Main) logo.

babybuddy's People

Contributors

alberdi avatar alzyee avatar amith211 avatar amorphobia avatar barakplasma avatar benjaminhae avatar bespokebob avatar billybonks avatar btoconnor avatar cdubz avatar codisart avatar daegalus avatar danbeard avatar earthcomfy avatar jcgoette avatar jljouannic avatar jmunoz94 avatar johnmerlie avatar lastpixl avatar lutzky avatar maximiliankindshofer avatar mikejgray avatar mrapplejuice avatar myxor avatar novski avatar ntrecina avatar overshard avatar paulcalabro avatar pgazda-up avatar reallinfo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

babybuddy's Issues

users not able to login

After adding a user in the admin panel i can not login with the credentials.
I don't get a error or message. A Pageload hapens and the login page apears again.
Admin login works.
How can i debug that?

modul Image missing

i can't determine if thats comming from django or Node but this is the error:

pi@babybuddy:/var/www/babybuddy/public $ gulp collectstatic
[23:07:51] Using gulpfile /var/www/babybuddy/public/gulpfile.js
[23:07:51] Starting 'collectstatic'...
Traceback (most recent call last):
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/easy_thumbnails/utils.py", line 11, in <module>
    from PIL import Image
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/PIL/Image.py", line 60, in <module>
    from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 27, in <module>
    execute_from_command_line(sys.argv)
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
    utility.execute()
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/core/management/__init__.py", line 347, in execute
    django.setup()
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/apps/registry.py", line 112, in populate
    app_config.import_models()
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/apps/config.py", line 198, in import_models
    self.models_module = import_module(models_module_name)
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 673, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/easy_thumbnails/models.py", line 6, in <module>
    from easy_thumbnails import utils, signal_handlers
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/easy_thumbnails/utils.py", line 13, in <module>
    import Image
ImportError: No module named 'Image'
[23:07:56] 'collectstatic' errored after 4.63 s
[23:07:56] Error: 1
    at formatError (/usr/lib/node_modules/gulp-cli/lib/versioned/^3.7.0/format-error.js:20:10)
    at Gulp.<anonymous> (/usr/lib/node_modules/gulp-cli/lib/versioned/^3.7.0/log/events.js:41:15)
    at emitOne (events.js:116:13)
    at Gulp.emit (events.js:211:7)
    at Gulp.Orchestrator._emitTaskDone (/var/www/babybuddy/public/node_modules/orchestrator/index.js:264:8)
    at /var/www/babybuddy/public/node_modules/orchestrator/index.js:275:23
    at finish (/var/www/babybuddy/public/node_modules/orchestrator/lib/runTask.js:21:8)
    at ChildProcess.cb (/var/www/babybuddy/public/node_modules/orchestrator/lib/runTask.js:29:3)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)

Version:

pi@babybuddy:/var/www/babybuddy/public $ node -v
v8.11.1

Feature Request: Vitamin and Medicine Tracking

I'd like to be able to track Vitamin and Medicine tracking.

I can see two ways this works. Add a new entry called Medicine that has a time, amount, and note. In the note the user can indicate how it is being used.

Or add additional items to the Feedings Type menu. This would disrupt feeding dashboards and stats though.

Refresh dashboard without full reload

Currently the dashboard refreshes with a full page reload every X seconds (user setting) or when it gains focus (using the page visibility API). I would like to add a special API endpoint that gets updated numbers for all dashboard elements and some JS to handle updating everything in place, without a full page reload.

Task 'migrate' is not in your gulpfile

Hello!

First of all, kudos for the nice project :)

The error bellow was thrown for the gulp migrate command. I was following the installation instructions on README.

(babybuddy-gnv08_rE) โžœ  babybuddy git:(master) gulp migrate
[11:55:46] Using gulpfile ~/Devel/tools/babybuddy/gulpfile.js
[11:55:46] Task 'migrate' is not in your gulpfile
[11:55:46] Please check the documentation for proper gulpfile formatting

sha256 of docopt does not match

when installing from pipfile.lock with $ sudo pipenv install --three --dev i get this error:

THESE PACKAGES DO NOT MATCH THE HASHES FROM Pipfile.lock!. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    docopt==0.6.2 from https://www.piwheels.org/simple/docopt/docopt-0.6.2-py2.py3-none-any.whl#sha256=0340515c74203895f92f87702896e45424bf51dc71bf15b4748450f50be04346 (from -r /tmp/pipenv-vf5_eub9-requirements/pipenv-k7_dvsro-requirement.txt (line 1)):
        Expected sha256 49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491
             Got        0340515c74203895f92f87702896e45424bf51dc71bf15b4748450f50be04346

can i do anything to workaround?

Docker installation

Not an issue, but a feature request:
Is there a possibility to add docker installation instructions?
I'm just starting to learn, and currently I'd like to reroute multiple webapps through a nginx reverse proxy.
The problem is nanobox seems to only like outputting on port 80.
With a more simple setup, and a docker image, one could output on localhost:anyport and route that to a subdomain using nginx

Safari pinned iOS App links to Home / Permission denied

Visiting my Babybuddy with safari on iOS and pinning it to the Homescreen of my iPhone works. Taping on that nice babybudy icon on my Homescreen leads me to a page with a breadcrumb: Home / Permissions Denied. Switching back to Safari im still loged in. In menu there is a AnnonymousUser loged in that if i press logout leads to a switch over to Safari where i land on the login page.
Did someome ever noticed that?

Add status messages

Currently only form error messages are supported. There is no system in place for simple status messages (e.g. "Sleep entry added!", "Password changed", etc.)

Improve Timeline view and placement.

Right now this is buried in the โ€œgraphsโ€ menu and it doesnโ€™t really make sense there. It could perhaps go directly under the child info on the child detail page.

Configurable units?

Hi there! Love the work you've done here, I just started using it with my daughter!

I noticed the feeding units are hardcoded to ounces, any chance you could make it configurable for us metric folks? :-)

Feature Reqest: Temperature

its sometimes when my litle is sick good to keep temperature in sight. In the dropdown of Children there is a Wheigt Dataset. I see that Feature similar to that.
What do you think?
Would you help me with question answering if i wold implement that myself?

Use Visibilty API on dashboard

c339062 has been a nice little improvement (based on my own experience). Something similar for the dashboard would also be interesting. Iโ€™m thinking both auto-update once per minute and update on visibility changes after more than one minute. A simple page reload could save a lot of complexity but the Timer JS update is a nice touch...

Make dashboard cards configurable per user

Make dashboard cards configurable per user (good example: GitHub's pinned repos system for display and ordering).

Sortable could work but the current three column dashboard layout makes localStorage save and reload tricky.

Add photo field to Child model

Optional field - would be fun for parents and useful for multi-child instances (especially with a cleaned up dashboard).

Add basic users management

While this can currently be handled in Django's admin backend, I'd like to add simple users list/add/edit/delete functionality. It would be nice to support all permissions, but perhaps this could just make all users superuser (if not staff) automatically to prevent the complexity of recreating Django's fine-grained permissions or building something simpler on top of them.

UI needs work

Hey,
Love your work. I'm using BB to track my 3week old sons <dad joke>poo-gress</dad joke>. We were very into it during the first week but as we get less and less sleep we're finding the UI is a bit too fiddly (particularly the date/time entry).

I'm a frontender these days (was a Django man myself) and was thinking of redoing the forms to make them easier for tired parents who forget when/what the timer is on/for... you know what i mean.

I see you have a good API setup (have you looked into GraphQL yet?) so i might try and write a frontend app using that. Do some interactive D3.js charts. Maybe even some DTW clustering (as feedings are a bit staccato for us).

Anyway, do you think its worth having the front & back in the same repo or should they be separate projects? I'm deploying to Heroku and not sure how to combine a Django + Create React App (at work we keep them separate but that's a big project and parents would want the simplest deploy i guess?).

word

alex

p.s. these are big words as i might get an hour or two a day in while he's sleeping (if i'm not too sleep deprived myself :)

p.p.s If you have another plan for the frontend? Otherwise i can work independently for now and just talk to the API.

configure nginx

I can't reach my babybuddy app. And im not sure how to solve.
I installed the manual way as in the readme.md and as we discoussed for a Raspberry pi.
My hostname is set to babybuddy in the sudo raspi-config panel. Now i can reach with URL:"babybuddy.local" the default "welcome to nginx" site if i set the /etc/nginx/sites-enabled/babybuddy file to:

upstream babybuddy {
     server unix:///var/run/uwsgi/app/babybuddy/socket;
 }

 server {
     listen 80;
     server_name xy.local;

     location / {
         uwsgi_pass babybuddy;
         include uwsgi_params;
     }
 }

but get a bad request (400) if i set it to:

upstream babybuddy {
     server unix:///var/run/uwsgi/app/babybuddy/socket;
 }

 server {
     listen 80;
     server_name babybuddy.local;

     location / {
         uwsgi_pass babybuddy;
         include uwsgi_params;
     }
 }

i read this tutorial: https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html
saddly the log in (/var/log/nginx/error.log) is empty and a second file in that folder named error.log.1 has only this single line in it:

pi@babybuddy:/var/log/nginx $ sudo cat /var/log/nginx/error.log.1
2018/05/07 23:33:17 [notice] 5234#5234: signal process started 

my user pi is in the group www-data.
my /etc/uwsgi/apps-available/babybuddy.ini file is configured like this:

[uwsgi]
 plugins = python3
 project = babybuddy
 base_dir = /var/www/babybuddy

 virtualenv = /home/pi/.local/share/virtualenvs/public-BuvyXxxq
 chdir = %(base_dir)/public
 module =  %(project).wsgi:application
 env = DJANGO_SETTINGS_MODULE=%(project).settings.production
 master = True
 vacuum = True

because pipenv --venv spits out this:

pi@babybuddy:/var/www/babybuddy/public $ pipenv --venv
/home/pi/.local/share/virtualenvs/public-BuvyXxxq

What can i test further to locate the failure?

ARM (i.e. Raspberry Pi) install problematic

#41 and #42 seem to indicate some issues with doing a manual install on ARM devices. I'm going to work through testing this on a Model B from Raspbian Stretch Lite to see if things can be smoothed out.

Some translated strings not working.

Translated strings are not working in a couple of areas --

  • Some time elements and properties on the dashboard (e.g. in the Statistics and Last Sleep cards).
  • Model properties (in lists, on dashboard, elsewhere -- e.g. poop color, breast types).
  • Dates and times in graphs.
  • CoreDeleteView message.

New logo for Babybuddy

I wanted to contribute to Babybuddy. I designed a logo for it. If you like it, I'll send you files and pr. i hope you like it :)

is there anything you want ?

babybuddy

Feature Reqest: Multilanguage Support

I guess it would be very nice to enable translation other languages.
In my special case it's german, but I guess others are interresting too.

TODO

  • Enable i18n and locale support in base settings.
  • Add gulp commands for makemessages and compilemessages.
  • Refactor babybuddy app with translatable strings.
  • Refactor core app with translatable strings.
  • Refactor dashboard app with translatable strings.
  • Refactor reports app with translatable strings.
  • Refactor all Python formatted strings to be translatable (just putting this off because I didn't immediately understand how to do it...).
  • Refactor all javascript with translatable strings.
  • Store/use language from user Setting field.
  • Add tests.
  • Find/set up translation tie-in service for easier contribution.
  • Add documentation for translation process/support.

References

Manual Installation on ARM7: ImportError: Missing required dependencies ['numpy']

I get this error when gulp migrate is executed on a Raspberry Pi 3B+ Manual Server Installation

    import pandas as pd
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/pandas/__init__.py", line 19, in <module>
    "Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']
[09:27:05] 'migrate' errored after 6.61 s

I now tried to checkout older commits and installed as i had done in May2018. All builds back to the one i worked on myself break with missing dependency numpy. By then it did not error, so it does not seam to be a self initiated error to me.
More like a package that has changed for arm devices.

Can somebody confirm that on a same Raspberry Pi B+ maybe?

Timezone

I see there is support to change the default time zone for the host. Good practice is to always have the host on UTC time, but it does not appear that the app currently uses the browsers time zone for caclulating the current datetime, it simply uses the servers time. Is this accurate?

I am not very strong in django, but i think this needs to be added to allow the browser to use its own time zone. J ust struggling with where:

from django.utils.timezone import activate
activate(settings.TIME_ZONE)

Source: https://docs.djangoproject.com/en/2.0/topics/i18n/timezones/#default-current-time-zone

Commit compiled assets

The current install process requires download of npm/gulp/node modules/etc. to build assets for Baby Buddy. This is quite a burden on low memory systems and generally complicates everything from the manual install to the Docker build process. I'm considering simplifying this by including pre-compiled assets in git and decoupling a bit from gulp.

Documentation on the API

Is there documentation on using the API that appears in the routes? Is this a standard interaction if you know the routing framework for Django? My goal is to have a webhook hit the app and add data to the database. Is there a way to protect this other than IP whitelisting?

Add ability to export/import data

Suggestion comes from Show HN feedback.

I suspect something already exists for Django that would allow basic import of data from a csv or tab-delimited file. Perhaps that would be useful on its own, initially.

auto reboot server on reboot

I rebooted my pi server and noticed that the server does not autostart.
sudo service nginx start and restart do not take effect.
Do i need a gulp command to restart babybuddy?

Add Weight tracking

Tracking weight is probably worth adding and got a decent amount of interest from the Show HN 1, 2, 3.

Pine64 Docker install fails

Hi I'm having an issue, not directly with manual installation but with Docker on a ARM 64 board, to be more accurate Pine64 with Arch Linux on it.

Seems like, panda is missing, and a couple of gcc to compile --

iNaT import error.txt

The traceback is huge, let me know if you want it as well.

Originally posted by @killua99 in #55 (comment)

Best way to update to latest?

I have a running setup using the manual method. A couple users, a couple kids, but I'd like to update to the latest with the temperature tracking.

Do I just need to run a git pull origin master and reboot? Or is there DJANGO settings to export again?

Fix reset command test

8b98a60 disabled the reset management command test because it fails for some reason after the Django 2.0 upgrade. The regular command works fine. ๐Ÿคทโ€

Provide averages data

Not sure if this can/should be a card, new view, or data plugged in somewhere else (e.g. on the child detail view, or maybe across the top of the dashboard).

Averages to potentially include:

  • Diaper change frequency
  • Feedings frequency
  • Awake time
  • Asleep time
  • daily naps
  • daily diaper changes

Reference: comment on HN

how to setup locale

Hi again, i some strange CSRF and bad request pages and entered the python shell to get a grasp of the error. There i found this line:
django.core.exceptions.ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

I think i have to set the locales right because also my pi has my local time set.
Am i assuming that right and where can i do so?

The full error message:

pi@babybuddy:/var/www/babybuddy/public $ pipenv shell
(public-BuvyXxxq) pi@babybuddy:/var/www/babybuddy/public $  python3 manage.py shell
Traceback (most recent call last):
  File "manage.py", line 27, in <module>
    execute_from_command_line(sys.argv)
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
    utility.execute()
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/core/management/__init__.py", line 365, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/core/management/base.py", line 327, in execute
    saved_locale = translation.get_language()
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/utils/translation/__init__.py", line 187, in get_language
    return _trans.get_language()
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/utils/translation/__init__.py", line 55, in __getattr__
    if settings.USE_I18N:
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/conf/__init__.py", line 56, in __getattr__
    self._setup(name)
  File "/home/pi/.local/share/virtualenvs/public-BuvyXxxq/lib/python3.5/site-packages/django/conf/__init__.py", line 41, in _setup
    % (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

Persistent Data - Docker

This is a great app! Thanks for all the hard work to make it possible. I have one issue that i am trying to resolve. I am running the babybuddy app via docker and I cannot make the data persistent between server restarts. What directories do I need to have as persistent volumes in order to get this to work?

This is my docker-compose file with the volumes I declare to create persistent data. What am I missing? Thanks!

docker-compose.yml
services:
  db:
    image: postgres
    volumes:
      - db:/var/lib/postgresql
  app:
    env_file: docker.env
    build: .
    command: gunicorn -c /app/gunicorn.py babybuddy.wsgi
    volumes:
      - baby_data:/app
    ports:
      - "8000:8000"
    environment:
      - VIRTUAL_HOST=**************
      - LETSENCRYPT_HOST=**************
      - LETSENCRYPT_EMAIL=**************
      - VIRTUAL_PORT=8000
    depends_on:
      - db
    networks:
      - proxy-tier
      - default

volumes:
  baby_data:
  db:

networks:
  proxy-tier:
    external:
      name: webproxy

Use .env file for environment/settings variables

Stemming from discussion in #21, I'd like to consider using a single .env file to control environment variables and a number of Django settings (e.g. TIME_ZONE) options.

  • python-dotenv looks like a good candidate to help with support for this.
  • Need to consider and thoroughly test all deployment methods.
  • It would be nice to cut down on the number of template settings files for various deployments, but some of them use their own special environment variables.

Add fixtures and improve tests

Tests are a bit weak right now, fixtures will likely help to write more specific and useful tests in a lot of situations (instead of relying the fake data generation).

Tangentially related, the fake command could be refactored to generate more realistic data - right now entries with duration intersect and make little sense (e.g. feedings while baby is asleep).

Add a welcome/intro page

Currently, on first login with no children in the database, the user is just dropped on the Child add page. Some sort of first use information there, or a dedicated first use view, would be a better intro to the app.

Handle custom data validation for forms

  • Diaper Change: wet or solid must be selected. (492bcdd)
  • Diaper Change: color required when solid selected. (492bcdd)
  • Feeding: only allow "bottle" method for "formula" type. (492bcdd)
  • Duration sanity checks for all models. (#10)
  • Date/time fields for all models not in the future. (5343db5)
  • Intersection checks for all models with duration (e.g. don't allow overlapping sleep entries for a child).

I will leave this issue open for a bit to discuss other validation requirements.

Improve dashboard mobile performance

We have been experiencing odd issues with the mobile view - often when re-opening the browser with the dashboard, or waking the phone with it already loaded, the dashboard seems to lock up and in my experience Firefox iOS will frequently crash. Chrome on iOS appears to have a similar, but slightly less severe issue (it can usually recover after a second or two).

I'm not sure yet if this is an iOS general, iOS 11, page visibility api, or other issue.

Add API tests

Currently the API does not have any tests at all. There should be tests for GET, OPTIONS, and POST requests to all endpoints.

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.