Commit Graph
45 Commits
Author SHA1 Message Date
mohmdsdg a98fdb8d9e feat(remittance): add enable_remittance plugin setting to catalog and seeds 2026-10-27 18:07:10 +03:30
mohmdsdg 47d210bd7d added chart plugin in khanegi superadmin 2026-10-21 11:13:24 +03:30
MahdiandCursor 11887bc5ed feat(get-user): expose Hamkar menu icon brand colors
Emit menu_icon_color and menu_icon_active_color when brandManaged so apps can theme nav icons separately.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 18:06:24 +03:30
MahdiandCursor 9031135797 feat(get-user): emit brand_chrome for Hamkar brandManaged opt-in
Expose brand_chrome so apps apply header/menu/body colors only after SuperAdmin color save.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 17:04:35 +03:30
MahdiandCursor 30dc83890b feat: granular hamkar/khanegi permissions (manage / settings / appearance)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 20:48:32 +03:30
MahdiandCursor 674da4e939 feat: add 'other' product type for miscellaneous sites (tracking only, no remote control)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 16:52:23 +03:30
mohmdsdgandCursor cf92635c0e Fix plugin purchase 500 when subscription catalog columns are missing.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 10:33:48 +03:30
mohmdsdg 08f648457f fix pluggin bug 2026-09-09 17:04:33 +03:30
mohmdsdgandCursor 67a03d9593 feat(plugins): catalog images and purchase receipt uploads
Catalog items can store up to three photos; remote tenants attach a receipt on pending requests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 14:56:09 +03:30
mohmdsdgandCursor 1f776cf6e2 feat(plugins): sell khanegi plugins as priced subscriptions
Catalog prices, purchase requests, and setting-key activation live on SuperAdmin so module admins can buy add-ons. Also rewrite legacy nerkh logo hosts to the SuperAdmin upload origin.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 16:56:51 +03:30
mohmdsdgandCursor ccf7e90922 feat: catalog has_landing and landing_* for SuperAdmin
Expose the website landing flag and content keys in the deploy setting template.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-05 17:01:54 +03:30
mohmdsdgandCursor 09218ee1e2 Add enable_gold_credit to SuperAdmin setting catalog.
Default the per-tenant gold credit access flag to false so projects opt in explicitly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 00:17:45 +03:30
mohmdsdgandCursor 83f5834aff feat(settings): add enable_automation SuperAdmin switch (default off)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 16:15:52 +03:30
mohmdsdgandCursor 82d961d984 setting pushed
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 22:34:25 +03:30
mohmdsdgandCursor c0b6ec9262 fix(settings): include all can_edit=0 keys in SuperAdmin catalog
Parse both INSERT column orders from deploy_settings_const.sql so
price_provider, zaarbox_api_url, main_product and similar keys are
in the template. Keep template values empty for tokens and per-project IDs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 21:47:43 +03:30
mohmdsdgandCursor 19d28f2ed7 chore(settings): resync superadmin template after can_edit=1 runtime keys
Remove can_edit=1 keys (Montzar runtime, fee_service_charge_percentage, etc.)
from setting-templates-from-deploy.json and editable catalog list.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 19:55:43 +03:30
mohmdsdgandCursor 71d6f6a534 fix(settings): restrict superadmin template to can_edit=0 keys only
Superadmin was seeding all deploy_settings_const INSERT keys including
can_edit=1 entries with wrong defaults (e.g. montzar_product_id=25).
Template/catalog now follow final can_edit=0 from SQL; editable keys are
purged from setting_templates and tenant settings on boot/seed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 18:40:07 +03:30
mohmdsdgandCursor d57ce0a3cb feat(settings): store Khanegi keys in settings tables instead of tenant JSON
Template defaults seed from deploy_settings_const; new tenants copy them, import decides per key, and /get_settings reads the per-tenant rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 20:14:17 +03:30
mohmdsdgandCursor f2cf8c9035 feat(tenants): store Khanegi deploy settings snapshot on tenants.setting
Import can_edit=0 settings via the sold version's admin login + get_settings, for Super Admin program-settings UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 15:02:22 +03:30
MahdiandCursor dd4850d9fa fix: lock new.gholaktala.ir as Khanegi newTheme (userTheme)
Correct prior modular/Hamkar misclassification. Protect locked newTheme domains from bulk-modular brand overrides.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 17:53:04 +03:30
MahdiandCursor 859530a669 fix: new.gholaktala.ir is Khanegi modular, not Hamkar
Revert wrong FORCE_HAMKAR classification; lock domain in FORCE_KHANEGI and keep Hamkar/Khanegi overrides separate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 17:40:13 +03:30
MahdiandCursor 0aeb17bd1b fix: keep new.gholaktala.ir as Hamkar, not Khanegi
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 17:26:00 +03:30
MahdiandCursor 51e350405a feat: per-tenant server access kill switch
Add Tenant.serverAccessBlocked, toggle API with appVersion bump and settings push, and expose stealth server_reachable in get_user.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 16:05:04 +03:30
MahdiandCursor af1e217a68 feat(auth): add module read/write admin RBAC
Introduce permission catalog, PermissionsGuard, JWT/me payload with
role+permissions, and gate all module controllers. Admins CRUD accepts
role/permissions with safety rules; migrate existing users to super_admin.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 15:29:04 +03:30
MahdiandCursor a589c7f0c2 fix: normalize Khanegi newTheme ui config for userTheme schema
Map sidebar+bottom→both, products→buyProduct, ensure header.variant. Repair script + get_user normalize so colors apply instead of Zod fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 12:34:07 +03:30
MahdiandCursor 425eb3c714 feat: bulk apply Niazi modular brand colors to Khanegi tenants
Add prisma:bulk-khanegi-modular-brand (skip Aygin/newTheme). Palette: header #0a1b37, accent #e0be7f, bg #ffffff; bumps appVersion.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 11:42:31 +03:30
MahdiandCursor 1adaef5d18 Add Khanegi uiVariant modular/newTheme with get_user payload split.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-09 12:58:45 +03:30
MahdiandCursor 2f0e39edbb Add bulk copy of Khanegi SMS price and charge info from pilot.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 16:00:54 +03:30
MahdiandCursor 039a2a606b Fix SMS batch apply dry-run env and add rollout tracker.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 15:34:45 +03:30
MahdiandCursor 448dc444c9 Add Khanegi SMS sync inventory, batch import, and rollout helpers.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 15:30:43 +03:30
MahdiandCursor 26f7b7e69e Fix auto-block migration SQL for PostgreSQL.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:42:39 +03:30
MahdiandCursor 8eba9a9b8f Add optional SMS auto-block threshold below balance.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:12:29 +03:30
MahdiandCursor db66a44527 Add support subscription panel API with optional free periods.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 11:20:25 +03:30
MahdiandCursor f61d10e07b Allow multiple hosting servers per sold version.
Drop unique tenant_id on server_accounts and add create/update/delete/renew APIs per server account, with list/expiring using the worst status.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 19:23:37 +03:30
MahdiandCursor c6d90ea262 Fix SMS tenant copy target matching; add list-tenants helper.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 17:17:56 +03:30
MahdiandCursor 7ebee7fa4e Add script to copy SMS wallet between SuperAdmin tenants.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 16:58:19 +03:30
MahdiandCursor 2d21813c7b Fix SMS import tableExists to use selected database name.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 15:39:59 +03:30
MahdiandCursor 17a54774ae Add remote SMS panel sync API and product MySQL import script.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 20:53:59 +03:30
Mahdi 14d9c5d143 Implementing SMS panel in Super Admin 2026-08-05 14:13:44 +03:30
MahdiandCursor b66e47c3b3 Add Khanegi default appearance snapshot seed and strip SA meta from get_user.
Mirrors Hamkar so each khanegi tenant can restore its factory ui-config without exposing defaultSnapshot publicly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 21:13:46 +03:30
MahdiandCursor 3fa24ac965 Add Hamkar default appearance snapshot seed script and builder support.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 20:51:33 +03:30
MahdiandCursor 01f0b82ac6 Switch Prisma from SQLite to PostgreSQL for production deploy.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 19:14:06 +03:30
MahdiandCursor a6b3457779 Add production-ready SuperAdmin API features for tenants, SMS, servers, and plugins.
Includes mobile auth, get_user/get_version, SMS wallet parity endpoints, appearance backfill, and related Prisma migrations.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 18:19:53 +03:30
Mahdi ddf36f8470 Creating a control panel infrastructure 2026-07-23 19:41:21 +03:30
SuperAdmin 7fbc47766c Initial SuperAdmin API (NestJS + Prisma) 2026-07-23 10:25:32 +03:30