7 · Optional tooling
Objective — add optional power-ups only where they fill a real gap: Atlas schema management, a database GUI (Bytebase), Redis caching via Herd Pro, and a right-sized debug-tools stack. None block launch; each has a free fallback.
Background
Section titled “Background”Everything here is optional — the phase is complete without it. Add a tool only when it fills a real gap for your project, and prefer the free fallback if you don’t already own the paid service.
1. Atlas — schema management
Section titled “1. Atlas — schema management”Atlas gives clean schema exports and cross-environment diffs (it’s the preferred exporter on page 5). The CLI is free; Atlas Cloud’s visual diffs and CI checks need a license.
-
Install the CLI and sign in. The CLI install is terminal-runnable; the
atlas loginbrowser sign-in is a 👤 step if you want Cloud features.Terminal window atlas version 2>/dev/null || brew install ariga/tap/atlasatlas login && atlas whoami# Expected: a version, then your Atlas identity after the browser login- ✅ The Atlas CLI is installed (and signed in if you use Cloud).
-
Point it at the local DB via an env var — keep secrets out of
atlas.hcl— and gitignore the env files.Terminal window echo 'ATLAS_LOCAL_URL="mysql://root:@127.0.0.1:3306/[PROJECT_NAME]_local"' > .env.atlasgrep -q '^\.env\.atlas$' .gitignore || printf '.env.atlas\n' >> .gitignoregrep -q '^\.envrc$' .gitignore || printf '.envrc\n' >> .gitignore# Expected: .env.atlas written and both env files added to .gitignore- ✅ Atlas reads the DB URL from a gitignored env file.
2. Bytebase — database GUI & review workflow
Section titled “2. Bytebase — database GUI & review workflow”Bytebase adds a web UI for schema management, SQL review, and approval workflows across staging/production. It’s a heavier setup (~60–90 min) and only worth it for teams running frequent reviewed schema changes.
- Stand up the workspace and connect your instances.
-
Create a free workspace at
hub.bytebase.com. -
Add your staging and production instances (whitelist Bytebase’s egress IP in Remote MySQL first).
-
Create a project, transfer the databases in, sync schemas, and attach an SQL-review policy.
-
✅ Bytebase is connected to your instances with a review policy attached.
-
3. Redis cache via Herd Pro
Section titled “3. Redis cache via Herd Pro”Redis replaces file-based cache/sessions/queues — 2–3× faster page loads, instant sessions. Not required for launch, and easy to add post-deploy. Local dev uses Herd Pro’s built-in Redis; staging/production use Upstash (configured in Phase 4/5).
-
Start the Herd Redis service, then confirm it answers.
Terminal window redis-cli ping # expect PONG# Expected: PONG- ✅
redis-cli pingreturnsPONG.
- ✅
-
Require Predis — pin the platform PHP first if the server runs older PHP.
Terminal window SERVER_PHP_VERSION="<php-version-from-host>"composer config platform.php "$SERVER_PHP_VERSION" # writes a permanent committed pin into composer.json; log it in _CUSTOMIZATIONS.mdcomposer require predis/predis# Expected: Predis resolves to a server-compatible version and installs- ✅ Predis is installed against the server’s PHP version.
-
Wire local
.envto the Herd Redis (no password, localhost).CACHE_DRIVER=redisSESSION_DRIVER=redisQUEUE_CONNECTION=redisREDIS_CLIENT=predisREDIS_HOST=127.0.0.1REDIS_PASSWORD=null # leave unquoted — null is a literal token; "null" breaks auth (exception to the double-quote-secrets rule)REDIS_PORT=6379REDIS_PREFIX=[PROJECT_NAME]_local_- ✅
.envpoints cache/session/queue at the local Redis.
- ✅
-
Verify through tinker, then commit the lock-file change.
Terminal window php artisan config:clear && php artisan cache:clearphp artisan tinker --execute="Cache::put('t','Redis works!',60); echo Cache::get('t');"git add composer.json composer.lock && git commit -m "Add Redis cache support via Predis"# Expected: "Redis works!" prints, then the lock-file commit is created- ✅ Tinker returns
Redis works!and the lock change is committed.
- ✅ Tinker returns
Prepare (don’t populate) the Upstash placeholders in your .env.staging / .env.production templates for the deploy phase.
If you’re not on Herd Pro, any of these gives you the same local Redis:
4. Debug tools — install only what fills a gap
Section titled “4. Debug tools — install only what fills a gap”Shipping without a request/query inspector is guesswork — but many CodeCanyon apps already ship barryvdh/laravel-debugbar. Installing Telescope on top creates competing toolbars and double-captures queries. Check first.
-
Check what’s already present.
Terminal window grep -c '"name": "barryvdh/laravel-debugbar"' composer.lockgrep -c '"name": "laravel/telescope"' composer.lock# Expected: a 0/1 count for each — tells you what's already installed- ✅ The inspectors already in
composer.lockare known.
- ✅ The inspectors already in
-
Add at most one, based on what’s present.
Already present Action debugbar only Keep it — you have request/query visibility. Don’t add Telescope. Telescope only Keep it. Neither Add one — debugbar for a quick bottom-bar, Telescope for a richer dashboard. - ✅ Exactly one request/query inspector is active — no duplicates.
Checklist
Section titled “Checklist”Do not mark this step done until every box below is checked.
- 🔀 Per-tool decision made — installed where it adds value, or skipped with the free fallback noted.
- 🔀 Redis (if added) —
redis-cli ping→PONGand tinker returns"Redis works!". - 🤖 No duplicate inspectors — not both debugbar and Telescope.
- 🤖 Phase 3 complete — local environment installed, verified, committed, and secured.