Skip to content

feat(api): add listed_in_marketplace flag to store apps - #260

Merged
dan2k3k4 merged 1 commit into
devfrom
feat/store-app-listed-in-marketplace
Aug 18, 2026
Merged

feat(api): add listed_in_marketplace flag to store apps#260
dan2k3k4 merged 1 commit into
devfrom
feat/store-app-listed-in-marketplace

Conversation

@dan2k3k4

@dan2k3k4 dan2k3k4 commented Aug 18, 2026

Copy link
Copy Markdown
Member

Why

The AWS Marketplace amazeeClaw flow needs its store apps available + available_for_trials so /api/register accepts them, and it enumerates regions via the public GET /api/regions. The regular apps (Dependency Track, AnythingLLM, non-AWS claws) should no longer be exposed on that unauthenticated endpoint. Until now visibility was only controllable per store, not per app.

What

  • New listed_in_marketplace boolean on polydock_store_apps, default false.
  • GET /api/regions now only lists apps with listed_in_marketplace = true (in addition to the existing app-available + store-public+listed filters).
  • Filament: toggle on the store app form, icon column in the table, entry in the infolist.
  • Factory defaults it to true (tests unaffected); local seeders mark their apps listed so /api/regions keeps working in dev.
  • MOAD is unaffected: it consumes the authenticated /api/store-apps (unchanged) and filters by Stripe product mapping.

Rollout note

Existing rows default to false, so after migrating, /api/regions returns empty app lists until the intended apps (the five amazeeClaw - AWS (*) store apps) are flipped on via the admin panel or SQL.

Testing

  • New test: available-but-unlisted app is excluded from /api/regions.
  • Full Pest suite passes (579), Pint clean, PHPStan clean (one baseline count bumped for the house-style relation closure).

Greptile Summary

The PR adds per-app control over inclusion in the unauthenticated marketplace catalog while leaving authenticated store-app access and registration eligibility unchanged.

  • Adds the listed_in_marketplace database field, model assignment support, and boolean casting.
  • Filters apps returned by GET /api/regions using the new flag.
  • Exposes the flag in the Filament form, table, and infolist.
  • Updates factories and local seeders and adds coverage for excluding unlisted apps.

Confidence Score: 5/5

The PR appears safe to merge, with the temporary empty-catalog rollout behavior explicitly documented and controllable through the admin panel.

The new schema field is consistently wired through persistence and administration, and the public catalog applies the intended default-deny app filter with focused regression coverage.

Important Files Changed

Filename Overview
app/Http/Controllers/Api/RegionsController.php Adds the intended app-level marketplace filter to the public regions catalog without changing its response shape.
database/migrations/2026_08_18_000000_add_listed_in_marketplace_to_polydock_store_apps_table.php Adds a reversible, default-deny boolean column using a migration pattern already established in the repository.
app/Models/PolydockStoreApp.php Coordinates the new persisted field through mass assignment and boolean casting.
app/Filament/Admin/Resources/PolydockStoreAppResource.php Provides operators with editable and read-only representations of the new marketplace flag.
tests/Feature/Api/RegionsApiTest.php Verifies that an otherwise available app is excluded when its marketplace flag is false.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    Client["Public client"] --> Regions["GET /api/regions"]
    Regions --> Stores{"Store is public<br/>and listed"}
    Stores --> Apps{"App is available<br/>and listed"}
    Apps -->|Yes| Catalog["Return app in region catalog"]
    Apps -->|No| Hidden["Exclude app"]
    Admin["Filament admin"] --> Flag["listed_in_marketplace"]
    Flag --> Apps
Loading

Reviews (1): Last reviewed commit: "feat(api): add listed_in_marketplace fla..." | Re-trigger Greptile

Context used (3)

@dan2k3k4
dan2k3k4 marked this pull request as ready for review August 18, 2026 16:18
@dan2k3k4
dan2k3k4 enabled auto-merge August 18, 2026 16:26
@dan2k3k4
dan2k3k4 merged commit 03a1dec into dev Aug 18, 2026
5 checks passed
@dan2k3k4
dan2k3k4 deleted the feat/store-app-listed-in-marketplace branch August 18, 2026 16:26
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.

1 participant