Skip to content

Bootstrap cli interactive setup wizard for new open stellar deployments#367

Open
ekwe7 wants to merge 7 commits into
Bitcoindefi:mainfrom
ekwe7:Bootstrap-CLI-interactive-setup-wizard-for-new-Open-Stellar-deployments
Open

Bootstrap cli interactive setup wizard for new open stellar deployments#367
ekwe7 wants to merge 7 commits into
Bitcoindefi:mainfrom
ekwe7:Bootstrap-CLI-interactive-setup-wizard-for-new-Open-Stellar-deployments

Conversation

@ekwe7

@ekwe7 ekwe7 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

closes #309

Description

This PR implements an interactive bootstrap wizard for npx open-stellar bootstrap to streamline first-time project setup.

Changes

  • Added an interactive setup wizard that prompts for:

    • Project name (NEXT_PUBLIC_APP_NAME)
    • Stellar network (testnet or mainnet)
    • Database URL (DATABASE_URL)
    • Admin Stellar wallet address
  • Displays a configuration summary for confirmation before writing files.

  • Generates a .env.local file with the collected configuration.

  • Prints a success message with next steps (npm run dev).

  • Added support for the --yes flag to skip prompts and confirmations using default values.

Validation

  • Re-prompts until a valid Stellar public key (G..., 56 characters) is provided.
  • Warns (without failing) when the database URL does not resemble a postgres:// connection string.
  • Prevents invalid configuration from being written.

Testing

  • Added unit tests covering:

    • Successful wizard flow and .env.local generation
    • Invalid Stellar address re-prompt
    • --yes non-interactive mode
    • Correct environment variable output

Files Changed

  • Bootstrap CLI wizard implementation
  • .env.local generation logic
  • Unit tests for the bootstrap wizard

ekwe7 and others added 7 commits June 24, 2026 18:13
- Create lib/renderer/construction.ts to manage the 4-phase animation timeline.

- Integrate district.unlocked SSE event listener into components/pixel-city.tsx.

- Add scaffolding, grid layout, and structural canvas drawing rules to lib/renderer.ts.

- Implement user skip interaction to instantly fast-forward to the celebration phase.
Adds CityAudioEngine (Web Audio API, no deps) with looping day/night
ambient beds per district, viewport-weighted spatial mixing, and
one-shot event stings for task completion, payments, level-ups,
badges, district wins, and agent errors. Ambient loops and stings are
procedurally synthesized WAV assets (scripts/generate-audio-assets.mjs)
checked into public/audio/. Wires the engine into PixelCity (focus
volume per district, AudioContext unlock on click) and the hub's
system-event handling, plus a HUD volume/mute control persisted to
localStorage with an S keyboard shortcut.
…) unlocked via XP

Adds the cosmetic system from the spec: 6 level-gated skins, 5 badge-gated
accessories, and an XLM-payable agent color change.

- lib/cosmetics.ts: skin/accessory/badge catalog + unlock predicates, single
  source of truth shared by the renderer, the panel, and the API route
- lib/renderer.ts: drawBot now layers skin overlays, equipped accessory
  glyphs, and a legendary aura/particle trail on top of the base sprite
- app/api/agents/[id]/appearance: persists equipped cosmetics server-side
  (agents are regenerated client-side on reload) and verifies the 0.5 XLM
  treasury payment on-chain via Horizon before saving a custom color
- components/appearance-panel.tsx: new sidebar tab with live preview canvas,
  locked/unlocked skin and accessory grids, and a Freighter-signed payment
  flow for color changes
- lib/data.ts, lib/types.ts: agents now carry a default AgentAppearance

Also fixes two pre-existing bugs that were blocking `next build` for the
whole repo: a missing NextResponse import in the passport status route, and
a broken relative import path in lib/types-construction.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…idden

The preview comment is informational only. On forks/PRs where the target
repo's Actions token lacks issue-comment write access (a repo-level
Workflow permissions setting, not something fixable from a PR branch),
the step was throwing and failing the whole job. Catch and warn instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s, badges, district wins

Adds lib/renderer/particles.ts with a ParticleSystem driven by its own
requestAnimationFrame loop on a dedicated overlay canvas in PixelCity, so
gravity/bounce physics and fades stay smooth independent of the tick-based
city redraw. SSE events (task.completed, payment.received, agent.xp,
badge.unlocked, district.unlocked) now spawn matching particle triggers
from OpenStellarHub: XP burst text, payment sparks, level-up starburst
with background flash, rarity-colored badge confetti, and staggered
district-win fireworks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements GET /api/cron/close-stale-quests secured with CRON_SECRET.
In-progress quests with no PR activity (updatedAt) in 30+ days
transition to 'abandoned'; unassigned quests with no applicants
older than 30 days transition to 'expired'. Both emit protocol
events (quest.abandoned / quest.expired) via the system event bus.
Schedule added to vercel.json at midnight UTC daily (0 0 * * *).
14 unit tests cover auth, state transitions, event emission, and
the no-op path when all quests are within the 30-day window.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oyments

Implements the npx open-stellar bootstrap setup wizard with readline prompts
for project name, Stellar network, database URL, and admin wallet address.
Validates Stellar G... addresses (re-prompts on failure), warns on non-postgres
DB URLs, writes .env.local with all four values, and supports --yes for CI.
Adds 15 unit tests covering validation, env generation, file writing, and
the --yes code path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@leocagli

Copy link
Copy Markdown
Collaborator

Thanks @ekwe7! A few blockers before this can merge:

  1. Merge conflict — this is currently conflicting with main; please rebase on the latest main.
  2. SonarCloud Code Analysis is failing (the real quality gate, not the wrapper) — please check the dashboard and resolve the flagged issues.
  3. Implicit any in the Freighter signing path:
    const signResult: any = await freighter.signTransaction(buildData.xdr, {...})
    signTransaction returns a typed result — please type signResult properly ({ signedTxXdr: string; signerAddress: string } or the SDK's return type) instead of any.

One more thing — this PR touches 47 files (renderer, audio assets, cosmetics, appearance) well beyond a bootstrap wizard. If those are unrelated, consider splitting them into separate PRs so each can be reviewed and merged independently; a 47-file PR is hard to land cleanly. Happy to review once it's rebased and the gate is green. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bootstrap CLI: interactive setup wizard for new Open-Stellar deployments

2 participants