Hello. This has been a personal project of mine for over a year now. I recently started using Reddit in tech-oriented forums and started participating in Cloudways. So I'm still a Reddit newbie. Anyway it occurred to me others might like to use this tool as well. I use it always. I have three servers, about 100 apps and about a dozen projects. If people let me know what needs doing, I'll try my best to steer the dash that way.
The technical breakdown — file map, data flow, and the design decisions behind the dashboard.
| File | Purpose |
|---|---|
index.php |
Entry point. Login form, session, rate limiting, dummy preview, and HTML assembly |
cloudways/CloudwaysAPI.class.php |
API wrapper. Trades email + key for a token; exposes getServers(), getProjects(), getApps() |
cloudways/CloudwaysAPI.functons.php |
Formatters. Turns API JSON into HTML for cards, servers, projects, domains |
cloudways/CloudwaysAPI.js |
All client-side: filter, sort, search, click-to-drill, copy, CSV, sticky header, mobile reflow |
cloudways/CloudwaysAPI.css |
Main stylesheet |
cloudways/CloudwaysAPI.lock.js |
Optional anti-inspection script. Only loads when $lock = "yes" |
cloudways/switch_6.* |
Lightbulb privacy toggle in the header |
cloudways/switch_12.css |
Tooltip styling |
cloudways/switch_13.css |
Custom checkbox styling for the filter bar |
cloudways/switch_*_svg.php |
Inline SVG icons |
index.php checks $_SESSION for credentials. A POST login is rate-limit-checked, then the API class is instantiated in testOnly mode and hits /oauth/access_token. A valid token writes credentials to the session and redirects; a failure increments the counter. POST logout destroys the session.
When authenticated, the script calls getServers() and getProjects(), hands the results to the formatter functions, and echoes the returned HTML strings into the body. Once the DOM is in place, CloudwaysAPI.js hides the loading spinner, wires click handlers, and runs an initial filter/count pass.
When not authenticated, the same four HTML variables get hand-coded dummy content wrapped in a blur class. The same JavaScript runs against it, so the preview is fully styled and partially interactive before you log in.
Domain splitting. The formatter walks each app's cname and aliases, classifies them as root/subdomain/alias, and emits a row per domain — that is why filtering and sorting work cleanly per-domain.
Stable project colors. Badge colors come from hashing the project ID, so the same project is always the same color across the page.
No server-side credential storage. Email and API key live only in the PHP session — no disk, no database, no logs. Google Analytics (G-JCQCHMSKEX) tracks pageviews only.
Optional anti-inspection lock. $lock at the top of index.php (currently "no") controls whether CloudwaysAPI.lock.js loads. When "yes", it blocks right-click, copy/paste, view-source, and devtools shortcuts. Cosmetic friction, not real security.
Versioning. $version (currently "cd.111 28.537.2") renders in the sticky header next to the data-load timestamp.