A baby care tracking web application built with Django. PoopyFeed helps parents and caregivers monitor feeding, diaper changes, and sleep patterns for infants.
- Feedings: Track bottle (amount in oz) and breast (duration, side) feedings with custom per-child bottle presets
- Diapers: Log wet, dirty, or both diaper changes
- Naps: Track sleep times
- Batch Entry: Log multiple past events at once via catch-up mode
- Feeding Trends: Daily aggregates with configurable time range (1–90 days)
- Diaper Patterns: Wet/dirty distribution analysis
- Sleep Summary: Nap duration and frequency insights
- Today & Weekly Summaries: At-a-glance dashboards
- Timeline: Merged chronological activity feed across all tracking types
- CSV Export: Immediate download of tracking data
- PDF Export: Async generation via Celery with progress polling
Share access to children with other accounts via invite links:
- Co-parent role: Full access to view, add, edit, and delete entries
- Caregiver role: Limited access to view and add entries only
- Invite links are reusable and can be deactivated/reactivated
- Only the child's owner can manage sharing settings
- In-app notifications: Alerts when other users log feedings, diapers, or naps for shared children
- Feeding reminders: Configurable interval-based reminders (2/3/4/6 hours) that bypass quiet hours
- Quiet hours: Per-user schedule to suppress non-critical notifications
- Per-child preferences: Toggle notification types (feedings, diapers, naps) per child
- Multi-Child Support: Manage multiple children per account
- Email Authentication: Secure email-based login via django-allauth (headless mode for SPA)
- Progressive Web App: Install on your phone's home screen for quick access
- REST API: Token-authenticated API at
/api/v1/via Django REST Framework - Redis Caching: Analytics and child access queries cached with automatic invalidation
- Background Tasks: Celery worker for PDF export and scheduled notification tasks
- Pumping: Record pumping sessions and milk output
- Temperature: Record body temperature
- Weight: Monitor growth measurements
- Medication: Log medication administration
- Backend: Django 6.0 (Python web framework)
- Database: PostgreSQL (containers/production) or SQLite (local dev)
- Cache & Sessions: Redis 7
- Task Queue: Celery with Redis broker (PDF export, notifications, scheduled tasks)
- Frontend: Django Templates with Bootstrap 5 (via crispy-forms)
- SPA Frontend: Angular 21 (separate submodule, connects via REST API)
- PWA: Service worker with offline support
- Authentication: django-allauth with email-based login (headless mode for SPA)
- Containers: Podman (or Docker)
This backend is also used as a Git submodule in the main poopyfeed monorepo, which orchestrates backend, frontend, and database containers together.
- Root repo:
poopyfeed/(orchestration, shared docs, top-levelMakefile) - Backend submodule:
poopyfeed/back-end/(this repository)
When working in the monorepo:
- Run root-level commands (like
make run,make migrate,make test-backend-parallel-fast) from the monorepo root. - Use the commands in this README when you are working directly in the backend repository (for example, on CI or when cloning
poopyfeed-bealone).
- Python 3.13+
- PostgreSQL 14+ (for container/production deployment)
- Redis 7+ (for caching, sessions, and Celery)
- Podman or Docker with compose support (for local container development)
See requirements.txt for full list. Key packages:
- Django 6.0
- django-allauth (authentication)
- django-crispy-forms + crispy-bootstrap5 (forms)
- djangorestframework (REST API)
- celery + django-redis (background tasks, caching)
- reportlab + matplotlib (PDF export with charts)
- psycopg2-binary (PostgreSQL)
- whitenoise (static files)
- gunicorn (production server)
-
Clone the repository:
git clone https://github.com/DavidMiserak/poopyfeed-be.git cd poopyfeed-be -
Set up pre-commit hooks:
make pre-commit-setup
-
Start the containers (web + PostgreSQL + Redis):
make run
-
Run migrations:
make migrate
-
Access the application at
http://localhost:8000
Other useful commands:
make test # Run tests with coverage in containers
make test-local # Run tests with SQLite locally (no containers)
make logs # View container logs
make stop # Stop containers
make coverage-html # Generate HTML coverage report-
Create and activate virtual environment:
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt -
Run migrations and start server (uses SQLite):
python manage.py migrate python manage.py runserver
-
Run tests:
make test-local # Full suite with coverage (~25-35s) python manage.py test accounts.tests.CustomUserTests.test_create_user # Single test
When running locally without Redis, caching degrades gracefully and sessions use database storage.
- Access the application at
http://localhost:8000 - Create an account or log in
- Add a child from the main page
- Start logging feedings, diapers, and naps
PoopyFeed is a Progressive Web App (PWA) that can be installed on your phone:
Android (Chrome):
- Visit the site in Chrome
- Tap the 3-dot menu → "Install app" or "Add to Home screen"
- The app will appear on your home screen
iOS (Safari):
- Visit the site in Safari
- Tap the Share button → "Add to Home Screen"
- The app will appear on your home screen
Once installed, the app launches in full-screen mode without browser chrome.
To share a child's profile with a partner, family member, or caregiver:
- From the child list, click Share on the child you want to share
- Select a role:
- Co-parent: Full access (view, add, edit, delete)
- Caregiver: Limited access (view, add only)
- Click Create Invite Link
- Copy the link and send it to the person you want to share with
- They click the link while logged into their account to gain access
To revoke access, return to the Share page and click Remove next to the user.
The backend exposes a full REST API at /api/v1/ for the Angular SPA frontend:
- Children:
/api/v1/children/— CRUD with role-based access - Tracking:
/api/v1/children/{id}/feedings/,diapers/,naps/— nested CRUD - Batch:
/api/v1/children/{id}/batch/— bulk create up to 20 events - Analytics:
/api/v1/analytics/children/{id}/feeding-trends/,diaper-patterns/,sleep-summary/,today-summary/,weekly-summary/ - Export: CSV (synchronous) and PDF (async via Celery with status polling)
- Timeline:
/api/v1/analytics/children/{id}/timeline/— merged activity feed - Notifications: List, mark read, preferences, quiet hours, unread count
- Auth: django-allauth headless endpoints at
/api/v1/browser/v1/auth/
Authentication: Token or Session. Rate limited (1000/hour default, stricter for invites and tracking creation).
Access the admin panel at http://localhost:8000/admin/ (requires superuser).
To create a superuser in containers:
podman compose exec web python manage.py createsuperuserPoopyFeed is available as an official Docker image on Docker Hub:
docker.io/davidmiserak/poopyfeed-be:latest
Use this image with Docker Compose, Podman Compose, or Quadlet for easy deployment.
Deploy PoopyFeed as systemd services using Podman Quadlet:
-
Copy quadlet files to your systemd user directory:
mkdir -p ~/.config/containers/systemd/ cp quadlet/* ~/.config/containers/systemd/
-
Update environment variables in
poopyfeed-web.container:- Set
DJANGO_SECRET_KEYto a secure random value - Set
DJANGO_DEBUG=Falsefor production - Update
DJANGO_ALLOWED_HOSTSwith your domain - Configure database credentials
- Set
-
Reload systemd and start services:
systemctl --user daemon-reload systemctl --user start poopyfeed-web.service systemctl --user enable poopyfeed-web.service -
Access at
http://localhost:8000or configure a reverse proxy
The Quadlet setup includes:
poopyfeed-web.container- Django web servicepoopyfeed-db.container- PostgreSQL databasepoopyfeed-migrate.container- Automatic migrations on startuppoopyfeed.network- Container networkpostgres_data.volume- Persistent database storage
Deploy to Render using the included render.yaml Blueprint:
-
Fork this repository to your GitHub account
-
Create a new Render account and connect your GitHub
-
Click "New" > "Blueprint" and select your forked repository
-
Render will automatically provision:
- A PostgreSQL database (free tier)
- A Python web service running gunicorn
- Auto-generated
DJANGO_SECRET_KEY
-
After deployment, create a superuser via the Render shell:
python manage.py createsuperuser
Required environment variables are configured automatically by the Blueprint.
For self-hosting on your own infrastructure:
- Configure HTTPS for production deployment
- Set up proper backup procedures for PostgreSQL database
- Configure reverse proxy (nginx/Apache) for production deployment
- Set environment variables for secrets (see
podman-compose.yamlfor reference)
Required environment variables:
DATABASE_URL: PostgreSQL connection stringREDIS_URL: Redis connection string (caching, sessions, Celery)DJANGO_SECRET_KEY: Secret key for cryptographic signingDJANGO_DEBUG: Set tofalsein productionDJANGO_ALLOWED_HOSTS: Comma-separated list of allowed hosts
When contributing to PoopyFeed:
- Run
make pre-commit-setupto install pre-commit hooks - Follow conventional commit format for all commits (enforced by hooks)
- Run
pre-commit run --all-filesbefore committing - Ensure tests pass with
make test(98% coverage, 555+ tests)
Built with ❤️ for keeping track of the little ones.