mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-02-28 13:13:00 +00:00
7.4 KiB
7.4 KiB
16. Unified Product Roadmap (3x-ui Custom)
Objective
Build a production-grade custom 3x-ui that keeps current compatibility while adding modern client management, automation, policy control, and optional advanced ops capabilities inspired by Marzban, Remnawave, and Hiddify.
Source of ideas
3x-uibaseline: inbound-centric model, compatibility, existing operator workflows.- Marzban inspiration: node architecture, webhook/admin automation, host/profile concepts.
- Remnawave inspiration: squads/policy groups, template/rule engine, notification matrix, HWID management.
- Hiddify inspiration: template-driven config generation, advanced edge routing, strong operational tooling.
Product principles
- Backward-compatible by default.
- Additive changes first, migrations only with rollback.
- Feature flags for every major module.
- Safe defaults for exposure, auth, and transport settings.
- Operator-first UX: fast bulk actions, clear observability, low-click routine tasks.
Current baseline (already done)
- Centralized client page exists (
/panel/clients) with master client + inbound assignment sync. - Local dev tooling exists (
justfile,air, sqlite dev flow). - Documentation split exists under
docs/panel-guide.
Roadmap phases
Phase 0: Stabilize Foundation (1 week)
Deliverables
- Harden current client-center behavior.
- Add regression tests for assignment/sync paths.
- Add lightweight structured audit for client mutations.
Acceptance criteria
- No regression in existing inbound CRUD and client operations.
- Sync errors are user-visible and recoverable.
- Automated tests cover add/update/delete + attach/detach flows.
Phase 1: Operator Productivity Core (2-3 weeks)
Deliverables
- Plan presets (
30d-100GB,90d-300GB,unlimited) with one-click apply. - Bulk client actions: extend expiry, add/reset quota, enable/disable, tag/comment edits.
- Better client details: assigned inbounds, usage summary, expiry status, quick actions.
- Audit log UI/API for sensitive changes.
Inspiration mapping
- Marzban: plan-like lifecycle and operational workflows.
- Remnawave: stronger user detail and admin ergonomics.
Acceptance criteria
- Operator can modify 100+ clients via previewed bulk action safely.
- Every sensitive operation writes immutable audit records.
- Average clicks for common tasks reduced (create client, assign inbounds, extend plan).
Phase 2: Automation and Integration (2 weeks)
Deliverables
- Webhook endpoints with per-event filtering and HMAC signatures.
- Delivery logs, retry policy, and test-send action.
- Notification matrix (event x channel) with sane defaults.
Inspiration mapping
- Remnawave: webhook scopes + fine-grained notification tuning.
- Marzban: external integration-friendly operator model.
Acceptance criteria
- Webhook payload contracts are versioned and documented.
- Failed deliveries are visible with retry status.
- Operators can disable noisy events without disabling all alerts.
Phase 3: Policy Groups and Access Model (2-3 weeks)
Deliverables
- Policy groups (squad-like) to assign bundles of inbounds/settings to clients.
- Group-level limits/metadata inheritance with per-client override.
- Group-based bulk assignment and membership management UI.
Inspiration mapping
- Remnawave: Internal/External squad model.
Acceptance criteria
- Many-to-many assignment handled without manual per-inbound editing.
- Inheritance and override behavior is deterministic and documented.
- Migration from existing direct assignment remains seamless.
Phase 4: Template and Subscription Engine (3-4 weeks)
Deliverables
- Host/profile template manager with preview variables.
- Output templates by client/app/core (xray/sing-box/mihomo style profiles).
- Rule-based response behavior (safe subset first): header/app-based template selection.
Inspiration mapping
- Remnawave: templates + response rules.
- Marzban: host/profile customization model.
Acceptance criteria
- Operators can preview rendered output before publishing.
- Template changes are versioned and rollbackable.
- Existing subscription links continue working.
Phase 5: Security and Anti-Abuse Layer (2-3 weeks)
Deliverables
- Device tracking and optional HWID/device limits per client.
- Risk controls: suspicious device churn alerts, quick revoke flows.
- Policy options for account sharing tolerance level.
Inspiration mapping
- Remnawave: HWID/device management and anti-sharing controls.
Acceptance criteria
- Device history is queryable per client.
- Operators can enforce or relax limits per policy group.
- Enforcement failures fail safe and are auditable.
Phase 6: Advanced Ops Profile (Optional, staged, 4-8 weeks)
Deliverables
- Template-driven advanced config generation module.
- Optional edge routing profile (HAProxy/nginx map-based patterns).
- Optional multi-core orchestration profile (xray + sing-box).
- Backup/update/health-check operational toolkit.
Inspiration mapping
- Hiddify: config generation and ops automation.
Acceptance criteria
- Advanced profile is optional and isolated from default path.
- Health checks and rollback mechanisms are mandatory.
- Security review passes before enabling in production.
Cross-cutting workstreams
Data model and migration safety
- Every schema change gets forward + rollback migration plan.
- Soft launch new tables/columns before hard dependencies.
- Keep legacy APIs until replacement is validated.
API design and compatibility
- Version new APIs under clear prefixes when behavior differs.
- Keep old endpoint behavior stable unless explicitly deprecated.
- Add contract tests for webhook/template/assignment APIs.
UI/UX consistency
- Preserve current mental model for existing users.
- Expose advanced controls progressively (basic vs advanced tabs).
- Add inline docs/tooltips for protocol-sensitive fields.
Testing and quality gates
- Unit tests for model/service logic.
- Integration tests for db migrations and sync flows.
- UI flow tests (Playwright) for client lifecycle and bulk operations.
- Staging soak test before each phase release.
Security controls
- HMAC for outbound webhooks.
- RBAC prep for future multi-admin model.
- Secret rotation support for API tokens and webhook secrets.
- Harden defaults for exposed panels and management ports.
Release strategy
- Release per phase behind feature flags.
- Rollout order: local sqlite -> staging VPS -> production VPS.
- Each release ships with:
- migration notes
- rollback procedure
- updated docs in
docs/panel-guide - smoke test checklist
Success metrics
- Time to create + assign a client drops by at least 50%.
- Bulk operations complete with zero silent failures.
- Webhook delivery success rate stays above 99% after retries.
- Support incidents caused by misconfiguration trend downward.
- No increase in critical outages after enabling new modules.
Suggested execution order
- Phase 0 + Phase 1 immediately.
- Phase 2 next (automation unlock).
- Phase 3 and Phase 4 together only after Phase 1/2 are stable.
- Phase 5 once policy groups are in place.
- Phase 6 only as opt-in advanced deployment profile.
Non-goals (for now)
- Full rewrite of 3x-ui core architecture.
- Mandatory multi-core or edge-router stack for all users.
- Breaking changes to existing inbound-native workflows.