A gamified family-care web application built with Flask. Family members share a virtual farm while completing daily check-ins, care tasks, questions, and photo memories. Google OAuth provides sign-in and group membership keeps records separated by household.
- Google OAuth sign-in and onboarding
- Family/group invitation workflow
- Daily care records and task tracking
- Question-and-answer journal
- Photo album with per-group authorization
- Virtual pets, crops, store items, and rewards
- SQLite development database with PostgreSQL deployment support
git clone https://github.com/mark2146/pet_farm.git
cd pet_farm
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install -r requirements.txt
cp .env.example .envCreate Google OAuth web credentials and register the callback used by the application. Fill in .env using .env.example as a guide.
flask --app wsgi:app run --debugFor a production-like process:
gunicorn wsgi:appapp/__init__.py application factory
app/auth.py Google OAuth and login
app/onboarding.py family setup and invitations
app/patient.py farm, album, and patient-facing pages
app/caregiver.py caregiver views
app/api.py JSON endpoints and uploads
app/models.py SQLAlchemy data model
app/templates/ server-rendered pages
app/static/ CSS, JavaScript, and public assets
seed_store.py development store data
- This application handles family activity data and photos. Treat both as private data.
- Never commit
.env, databases, upload directories, OAuth credentials, or VAPID private keys. - Store uploaded files outside the public static directory, enforce size limits, verify actual file content, and serve files only after group authorization.
- Use a long random
SECRET_KEY, HTTPS, secure cookies, CSRF protection, and rate limiting in production. - Existing sample uploads in repository history should be reviewed and removed if they depict real people or private records.
The SQLAlchemy models cover users, family groups and memberships, daily records, tasks, Q&A entries, photos, pets, crops, inventory, and store items. The local database is created automatically for development.
Prototype/portfolio project. It has not been audited for production handling of health or care data.