尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
The Edify Planning & Monitoring backend, rebuilt in Django 5 + Django REST
Framework (replacing the previous NestJS + Prisma backend). The School
Directory is the source of truth; ~200 endpoints across 33 domain apps; JWT
access + rotating refresh tokens; a 38-key RBAC permission matrix with
data-access scope resolution; a tamper-evident audit hash-chain; realtime SSE;
and 7 background jobs (weekly fund requests, monthly work plans, notification
escalation, daily digest, target-ledger sync, PD reminders, and recurring
field-debrief issue detection — see apps/realtime/registry.py).檢視完整 README ↗The Edify Planning & Monitoring backend, rebuilt in Django 5 + Django REST
Framework (replacing the previous NestJS + Prisma backend). The School
Directory is the source of truth; ~200 endpoints across 33 domain apps; JWT
access + rotating refresh tokens; a 38-key RBAC permission matrix with
data-access scope resolution; a tamper-evident audit hash-chain; realtime SSE;
and 7 background jobs (weekly fund requests, monthly work plans, notification
escalation, daily digest, target-ledger sync, PD reminders, and recurring
field-debrief issue detection — see apps/realtime/registry.py).
drf-spectacular (OpenAPI at /api/docs)PyJWT) access tokens (15m) + rotating revocable refresh (7d, SHA-256 hashed)@Cron worker)cd edify-api
uv venv --python 3.13 .venv && source .venv/bin/activate
uv pip install -r requirements/dev.txt
# Postgres must be running. Configure via DATABASE_URL or POSTGRES_* env vars:
export DATABASE_URL="postgresql://edify:edify@localhost:5432/edify_pm"
export JWT_SECRET="dev-secret-12345678" # ≥16 chars in prod
export NODE_ENV=development
export PORT=4000
python manage.py migrate
python manage.py seed # REFERENCE DATA ONLY (permissions). Safe on every deploy.
# Local development only — demo accounts + sample data (refuses production):
python manage.py seed --demo # demo users + geography + 700 schools/SSA/partners
python manage.py runserver # or: daphne -b 0.0.0.0 -p 4000 config.asgi:application
CORE RULE: the database is the only runtime source of truth. Production must never contain demo/mock data.
seedalone seeds only the RBAC permission matrix;seed --demois local-only and refuses to run in production. Real operational data arrives through backend upload/admin workflows.
Local development:
# Upload test data into the LOCAL database (never fabricated in code):
python manage.py seed --demo # demo accounts + sample schools/SSA (local only)
python manage.py import_schools_local schools.csv # CSV → School rows (tagged source=local_test_upload)
python manage.py import_ssa_local ssa.csv # CSV → SSA records; updates readiness
python manage.py purge_local_test_data --yes # remove local-test records (keeps reference data)
python manage.py audit_mock_data # scan for mock/demo leakage
Production:
seed --demo, import_*_local, purge_local_test_data)
refuse to run in production.ALLOW_PRODUCTION_IMPORTS
workflows after deployment.config/settings/prod.py) fail-closed if ENABLE_MOCK_DATA,
ENABLE_DEV_SEED, ENABLE_DEV_IMPORTS, or PARTNER_ROLE_BRIDGE are on.The API is served at http://localhost:4000/api (global /api prefix, matching
the legacy contract). OpenAPI docs at /api/docs (non-production).
DEMO_LOGIN_PASSWORD, default edify)Created by seed --demo (refuses production). Production creates real users
through the admin user-management workflow.
| Role | |
|---|---|
[email protected] | Admin |
[email protected] | CountryDirector |
[email protected] | ImpactAssessment |
[email protected] | RegionalVicePresident |
[email protected] | ProgramAccountant |
[email protected] | HumanResources |
[email protected] | ProjectCoordinator |
[email protected] | PartnerFieldOfficer |
[email protected] | CountryProgramLead |
[email protected], [email protected] | CCEO |
[email protected] | super-admin (password from SUPER_ADMIN_PASSWORD env only) |
The journeys and the role route audit in e2e/ run against a real server on a
demo-seeded database, the way CI runs them:
python manage.py migrate && python manage.py seed --demo
RATE_LIMIT_LOGIN_PER_MIN=1000 python manage.py runserver 127.0.0.1:8000 --noreload
npx playwright test --project=chromium-desktop # or one spec: npx playwright test e2e/<name>.spec.js
seeded-accounts setup project, which
signs each seeded account in once and clears its first-login agreements, so
any spec, shard or project can run on its own. It runs in Chromium, and only
against a server on this machine.RATE_LIMIT_LOGIN_PER_MIN for the test server; otherwise the sign-in
helper waits out each window.chromium-desktop (journeys and the authenticated route audit) in two
shards on every push, each with its own database and server
(.github/workflows/browser-suite.yml). Firefox, WebKit and the phone and
tablet projects run nightly in Browser Matrix
(.github/workflows/browser-matrix.yml), which can also be started by hand.apps/)| App | Purpose |
|---|---|
core | CUID/soft-delete bases, pagination envelope, request-context + exception middleware, RBAC matrix, ScopeService, FY/crypto/email/throttle |
accounts | User, RBAC (Permission/RolePermission), StaffProfile, JWT auth |
geography | Uganda admin hierarchy (Region→District→SubCounty→Parish→Village) |
schools | School Directory (source of truth) + bulk upload + duplicates |
clusters | School grouping, sub-county uniqueness, intelligence |
ssa | School Self-Assessment upload, QA provenance, readiness recompute |
activities | The 21-state field-work lifecycle |
budget | Cost spine + the automatic costing engine |
partners | Partner-org directory + self-service |
assignment | Direct-support capacity + assignment policy |
evidence | Secure multipart file pipeline (5-gate validation + DOCX→PDF) |
planning | Plan authoring + scheduling + lifecycle |
fund_requests | The Budget→Fund Request approval chain |
monthly_work_plan | CD→RVP monthly budget routing |
core_schools | Core/Champion pipeline (polymorphic slot actions) |
projects | Special projects |
messaging / notifications | In-app threads + per-user rail |
hr / debriefs / targets / reports / flags / pl_review | Operations |
command_center / filters / search / my_plan / system_health / security | Surfaces |
admin_users | Account provisioning + invite lifecycle |
/api global prefix, no trailing slashes on routes (/api/schools, /api/auth/login)Paginated<T> envelope: {data, page, pageSize, total, totalPages}{statusCode, correlationId, message}whitelist:trueAUTH_MAX_FAILED_LOGINS failures; rate-limited 10/min/IPconfig/settings/prod.py): refuse to boot unless mock data,
dev endpoints, and shadow authorization are off, the JWT secret is strong, and
evidence storage is on a persistent absolute path.docker build -t edify-api ./edify-api
# Entry: migrate → optional seed (RUN_SEED=true) → daphne ASGI on :4000
python manage.py seed [--mock] [--reset] — permissions + demo datapython manage.py spectacular --color --file schema.yml — OpenAPI exportpython manage.py makemigrations / migrate — schemaanalytics | Role-scoped summaries + SSA performance + correlation |
leadership / budget_intelligence | The two decision engines |
audit / realtime | Audit hash-chain + DomainEvent seam + SSE + jobs |