8 · Dev tooling
Objective — adopt local-development 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.
Steps at a glance:
- Atlas — schema management — Atlas gives clean schema exports and cross-environment diffs (it’s the preferred exporter on page 5).
- Bytebase — database GUI & review workflow — Bytebase adds a web UI for schema management, SQL review, and approval workflows across staging/production.
- 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.
- 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.
Background
Section titled “Background”After Shared-hosting readiness is clean, decide which dev tools earn a place in this project. Adopt what you need, and prefer the free fallback when a paid service does not clearly help.
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, or record a named carry-forward — install only after the Phase 3 PHP-drift check is clean. If PHP drift is unresolved, do not mutate
composer.lockhere; record the package decision for Phase 5 after Phase 4 confirms the deploy PHP, then skip the Redis wiring below for now.Terminal window INSTALL_PREDIS="${INSTALL_PREDIS:-1}" # set to 0 when PHP drift is unresolvedif [ "$INSTALL_PREDIS" = "1" ]; thencomposer require predis/prediselsegrep -q '| redis-predis-package |' Zaj-BACKLOG.md 2>/dev/null || printf '%s\n' \"| $(date +%Y-%m-%d) | redis-predis-package | 🟢 carry-forward non-blocker | Predis install waits for confirmed deploy PHP + Phase 5 Composer pin | Phase 5 page 1 | Predis resolves under the deploy PHP and Redis checks pass |" \>> Zaj-BACKLOG.mdecho "Predis carry-forward recorded in Zaj-BACKLOG.md"fi# Expected: Predis resolves and installs without changing the PHP platform decision,# or a named Phase 5 carry-forward is already recorded.- ✅ Predis is installed, or
Zaj-BACKLOG.mdnames a Phase 5 carry-forward to install it after Phase 4 confirms the deploy PHP and before the first live deploy.
- ✅ Predis is installed, or
-
Wire local
.envto the Herd Redis (no password, localhost). Skip this Step when Predis was carried forward instead of installed.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. Skip this Step when Predis was carried forward instead of installed.
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 Predis was carried forward, leave local cache/session/queue on file/sync drivers and record the reopen trigger in Zaj-BACKLOG.md.
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 marked
N/Awith evidence and 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.