Extension to ERPnext for Flash admin users to manage the accounts & services.
You can install this app using the bench CLI:
cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch develop
bench install-app admin_panelApp-owned DocTypes (User Alerts, Account Upgrade Request, the ID-verification set below, …) are defined as module-level JSON files, not fixtures:
admin_panel/admin_panel/doctype/
├── user_alerts/
│ ├── user_alerts.json ← schema definition
│ └── user_alerts.py ← Python controller
└── account_upgrade_request/
├── account_upgrade_request.json
└── account_upgrade_request.py
bench migrate reads these JSON files via sync_all() and applies any schema changes (e.g. ALTER TABLE) automatically. Do not add these DocTypes to fixtures — fixtures are for configuration records on existing doctypes (Custom Fields, Roles, etc.), not for app-owned types.
To modify a DocType:
- Edit the JSON file directly — add, remove, or update fields
- Update the
modifiedtimestamp to the current UTC datetime - Add the field name to
field_orderif adding a new field - Build and deploy a new Docker image
- Run
bench migrate— the schema change is applied automatically
To add a new DocType:
- Create
admin_panel/admin_panel/doctype/{doctype_name}/with{doctype_name}.json,{doctype_name}.py, and__init__.py - Set
"custom": 0and"module": "Admin Panel"in the JSON - Follow the same deploy + migrate flow above
The upgrade-request review is backed by ID Verification (one per request, with Verification Evidence / Verification Check child tables), the Decision Reason and Identity Document Type registries (seeded from after_migrate), the ID Verification Settings single, and Compliance Audit Event — an append-only, hash-chained ledger written only by admin_panel.api.compliance_audit.record_event. Decision endpoints (approve_upgrade_request, reject_upgrade_request, request_resubmission, get_id_verification, get_idv_settings) live in admin_panel.api.admin_api; verify_audit_chain / get_audit_anchor in admin_panel.api.compliance_audit. The daily post_daily_anchor scheduler job needs a scheduler worker. Design and Phase 1 scope: docs/plans/2026-09-01-id-verification-phase0.md.
Pages (alert-users, account-management) are defined in the module directory:
admin_panel/admin_panel/page/
├── alert_users/
│ ├── alert_users.json ← page metadata
│ └── alert_users.js ← page UI
└── account_management/
├── account_management.json
└── account_management.js
Page metadata (name, title, module) is synced to the database via the after_migrate hook in admin_panel/setup.py, which runs automatically as part of bench migrate. The hook uses flags.ignore_validate to bypass Frappe's developer-mode restriction on Page writes. Do not add Pages to fixtures — doing so requires developer_mode to be enabled at deploy time.
To modify a page's UI, edit the .js file and redeploy. No migration needed — the JS is served directly from the app.
To add a new page:
- Create the directory and files under
admin_panel/admin_panel/page/{page_name}/ - Add an entry to the
pageslist inadmin_panel/setup.py - Deploy and run
bench migrate
Only Workspace and Client Script records are managed as fixtures — these are configuration records created through the ERPNext UI that have no other home in the app source tree.
To update them after making UI changes:
bench --site {site} export-fixtures --app admin_panelThis updates admin_panel/fixtures/workspace.json and admin_panel/fixtures/client_script.json.
The Allowed Country list (/app/allowed-country, or the Bridge KYC
Allowlist shortcut on the Admin Panel workspace) is the operator-managed gate
for Bridge KYC — the US virtual account onboarding. The Flash api reads
GET /api/resource/Allowed Country?filters=[["flash_allowed","=",1]] every
60 seconds and lets a user start KYC only when the country of their verified
phone number is checked. Unchecked or missing countries are denied, with an
in-app message that US virtual accounts aren't available there yet.
- Toggle the Flash Allowed checkbox per country; changes reach the api within a minute, no deploy.
- The seed list (2026-09-01) is the Caribbean, US/CA/GB, MX, SV, SN and KE;
plus the NANP US territories PR/VI/GU/AS/MP
(
kyc_allowlist.BRIDGE_KYC_ALLOWLIST). It was applied once by thereseed_bridge_kyc_allowlistpatch;bench migrateonly adds missing rows and refreshes names/tiers afterwards, so operator toggles survive deploys. - Kenya caveat: Bridge's published country table marks KE as not eligible for US ACH/FedWire. It is seeded on the operator's instruction; if Kenyan users are approved by KYC and then get "not authorized to create USD Virtual Accounts", uncheck KE.
Releases are versioned with git tags and published as a multi-arch Docker image (brh28/frappe-flash).
Local release flow:
./release.sh <major|minor|patch>This bumps the version from the last git tag, creates a new tag, pushes it to the remote, and builds and pushes the Docker image.
CI flow:
A push of a version tag (e.g. v1.2.0) triggers CI, which runs ci.sh directly to build and push the image. release.sh is not involved.
Version bump guide:
patch— bug fixesminor— new featuresmajor— breaking changes
This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:
cd apps/admin_panel
pre-commit installPre-commit is configured to use the following tools for checking and formatting your code:
- ruff
- eslint
- prettier
- pyupgrade
mit