Skip to content

Instantly share code, notes, and snippets.

@StewartLynch
Created July 29, 2026 15:50
Show Gist options
  • Select an option

  • Save StewartLynch/8dab631937109f669a45fc2b9fefa7eb to your computer and use it in GitHub Desktop.

Select an option

Save StewartLynch/8dab631937109f669a45fc2b9fefa7eb to your computer and use it in GitHub Desktop.

I want to build a native macOS app named JSONFormatter using Xcode, Swift, and SwiftUI. Use the attached sketch as the visual reference for the application.

Do not write, modify, or generate any code yet.

First, inspect the existing Xcode project and then produce a staged implementation plan. The plan should be detailed enough that each stage can be completed, built, and manually verified before moving to the next stage.

App requirements:

  • Native macOS SwiftUI application
  • Two-pane layout
  • Left pane contains editable source JSON
  • Right pane displays formatted, read-only JSON
  • Users can type or paste JSON
  • Users can open a JSON file
  • Users can drag and drop a JSON file into the app
  • JSON is validated automatically whenever the source changes
  • Valid JSON is pretty-printed with consistent indentation
  • Invalid JSON displays a clear error message
  • When possible, identify the line and column of any JSON parsing error and format the source code according to poinmt out the error.
  • The formatted output remains read-only
  • Users can save or export the formatted JSON
  • The window resizes gracefully
  • Support both Light and Dark Mode
  • Follow native macOS design conventions
  • Use modern Swift concurrency where appropriate
  • Keep the architecture simple, maintainable, and easy to extend
  • Avoid unnecessary third-party dependencies

Do not begin implementation. End by presenting the complete plan and asking me to approve it before making any code changes.

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