User Authentication
- User registration
- Email verification
- Login / logout
- Forgot password & reset password
- Change password
- User profile
- Account activation / deactivation
A simple web platform where traders sign up, get a subscription, and use risk and trading services โ plus a management portal to run users, roles, services and subscriptions.
Users register, log in, get subscribed to a plan, and only see the services their plan and permissions allow. Everything is kept small and modular so new services can be added later without rebuilding.
Plain pages, clear menus, no unnecessary features in version 1.
Each service is a plug-in module switched on per subscription plan.
Hashed passwords, verified emails, permission checks on every page, audit log.
Built on the existing PHP + MySQL code in this repo, same patterns throughout.
Two entry points: the public side that leads users to their services, and the management side for staff.
The nine building blocks of version 1. Each one can be built, tested and switched on independently.
One simple rule decides access everywhere in the platform.
Permissions are named module.action โ for example users.view, subscriptions.manage, risk.edit. Adding a new permission is just a new database row; no code changes to the permission system.
| Permission | Super Admin | Admin | Support | User |
|---|---|---|---|---|
users.view | โ | โ | โ | โ |
users.manage | โ | โ | โ | โ |
roles.manage | โ | โ | โ | โ |
services.manage | โ | โ | โ | โ |
subscriptions.manage | โ | โ | โ | โ |
reports.view | โ | โ | โ | โ |
risk.view | โ | โ | โ | โ |
risk.edit | โ | โ | โ | โ |
settings.manage | โ | โ | โ | โ |
New MySQL tables, added alongside the existing trade-server tables (accounts, positions, deals, orders). Colors match the modules above.
id, name, email, password_hash, status, email_verified_at, last_login_at
user_id, token_hash, expires_at
user_id, token_hash, expires_at, used_at
id, name, description
id, key (module.action), label
role_id, permission_id
user_id, role_id
id, code, name, description, is_active
id, name, duration_days, price_note, is_active
plan_id, service_id
id, user_id, plan_id, starts_at, expires_at, status, payment_status, notes
subscription_id, action, old/new values, changed_by, created_at
id, user_id, mt5_login, name, currency, is_active
account_id, max_daily_loss, max_drawdown_pct, max_exposure, max_lots
account_id, type, level, message, value, created_at, acknowledged_at
user_id, type, title, body, read_at, emailed_at
user_id, action, entity, entity_id, before, after, ip, created_at
key, value
Six phases. Each ends with something working that can be tested.
Built-in safeguards for version 1, and ideas that fit in later without a rebuild.
password_hash