This is a platfrom for storing, browsing, and updating a family tree, made using Django.
It has the following features:
- Users can add new people, navigate the tree (interactively), and search from a root to any person at once.
- Supported languages: English, and Arabic. (configurable only during deployment).
- Backups every day at 3:00 am. With a restore DB page accessible to staff users.
- User registration through email.
- Staff users see notification on new additions (newly added persons).
- Normal users can add new persons to the tree, but these additions are local and only visible to the user. Once they are published by a staff member, these additions will become global.
- Help and about page are editable using Wagtail CMS.
- Staff users can add shortcuts (bookmarks), which can be further customized (color, font color, size, and overwrite label).
For admins, once the app is running:
-
Default user name: admin
-
default password: admin
-
Admin page:
/edarah -
Wagtail editor (for editing home, and about pages):
/tahreer -
There is a normal user whose credentials are:
- Username: user1
- Password: user12345678
- Install docker compose.
- Adjust the configuration in the .env file (domains, secrets, email, etc.).
- 🚀 start everything (backend + nginx + Flutter web app):
docker compose upThe backend is served on PORT (behind nginx) and the Flutter web app on WEB_PORT, as configured in .env.
To run the same docker setup locally (e.g. localhost URLs instead of the real domains), use .env.local instead:
docker compose --env-file .env.local upGo to localhost:9000 for the backend and localhost:9002 for the Flutter web app (or whichever PORT/WEB_PORT you set in .env.local).
Backend (Django):
hatch run migrate
hatch run serverGo to localhost:8000.
Mobile/web app (Flutter), from the mobile/ directory:
cd mobile
flutter pub get
flutter run --dart-define=API_BASE_URL=http://localhost:8000See mobile/README.md for platform-specific API_BASE_URL values (Android emulator, physical device, etc.).
- During development, you can change configurations from the
.envfile. You can tell git to ignore your changes:
git update-index --assume-unchanged .env
- This project uses ruff for formatting and linting, enforced on commit via pre-commit hooks. Install them once after cloning:
hatch run install-hooksFrom then on, git commit will automatically format and fix your staged Python files (re-staging the result). You can also run the checks manually:
hatch run style # check only
hatch run fix # check and auto-fix-
The
.envfile is loaded automatically (via python-dotenv) whenever Django starts, so the environment variables defined there are picked up no matter how you run the project. This way you can select a different database file, a different language, or different project settings, etc. -
For example, you can run the Django development server as follows:
hatch run server- You can also open a Django shell (using IPython):
hatch run shell- Other common Django operations are also available as hatch scripts:
hatch run migrate
hatch run makemigrations
hatch run createsuperuser
hatch run collectstaticThe test suite is written with pytest (via pytest-django). Run it with:
hatch run testThis runs with coverage by default (via pytest-cov), printing a per-file report with the lines that are still missing coverage. You can pass any pytest arguments through, e.g. to run a specific file or skip coverage:
hatch run test familytree/main/tests/test_models.py
hatch run test --no-covhatch run makemessagesthen compile:
hatch run compilemessages