Repository navigation
feat: Cap App Store on web and desktop - #4264
Open
richiemcilroy wants to merge 52 commits into
Open
richiemcilroy wants to merge 52 commits into
richiemcilroy wants to merge 52 commits into
Conversation
…mmarised or commented on
…ion styles, color looks and Cap actions
…; ci: validate App Store apps
…d signing to their own entries
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Sandchest reviewed Sandchest reviews every change for vulnerabilities an attacker could use · 25 credits · Review details |
…t the manifest author
# Conflicts: # apps/web/app/(org)/dashboard/_components/Navbar/Top.tsx
…oll in the Cap menu
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Cap gets an App Store, on the web and in Cap Desktop at the same time. Anyone can build an app by adding a folder to
app-store/appsand opening a pull request. Apps declare what they add, and Cap draws every pixel itself, so apps look native, stay fast and keep working when Cap's design changes.One store, one kind of app
There is one catalog and one noun. An app lists what it contributes, Cap works out where it runs from that, and an install belongs to the account, so installing once makes it work everywhere.
flowchart LR repo["app-store/apps/<id><br/>manifest.json, icon, README, images"] -->|bun app-store validate| ci[CI guards] repo -->|bun app-store build| catalog["catalog.json + content-addressed assets<br/>(served by the web app, cached immutably)"] catalog --> web["Web<br/>/dashboard/apps"] catalog --> desktop["Cap Desktop<br/>Settings, Apps"] web --> installs[("app_store_installations<br/>per user or per organization")] desktop --> installs installs --> events["Cap events<br/>cap.ready, transcript, summary, comment"] events -->|"signed Ed25519 POST"| server["App's own server"]backgrounds(image, gradient, color)captionStylescolorLooksconnection.settingsconnection.actionsconnection.eventsA manifest
{ "$schema": "../../manifest.schema.json", "apiVersion": 1, "id": "discord", "name": "Discord", "version": "1.0.0", "description": "Post new Caps to a Discord channel automatically, or share any Cap to Discord in one click.", "author": { "name": "Cap", "github": "CapSoftware" }, "license": "MIT", "categories": ["communication"], "privacyPolicy": "https://cap.so/privacy", "connection": { "url": "/api/app-store/first-party/discord", "events": ["cap.ready"], "settings": [ { "key": "webhookUrl", "type": "secret", "label": "Channel webhook URL", "required": true }, { "key": "postNewCaps", "type": "toggle", "label": "Post every new Cap", "default": false } ], "actions": [{ "id": "post", "title": "Post to Discord", "target": "cap" }] } }The schema lives once, as Effect Schema in
packages/app-store/src/manifest.ts. The validator, the catalog builder, the web app and the generatedapp-store/manifest.schema.json(editor autocomplete) all come from it. The desktop app parses a catalog built by the TypeScript side (packages/app-store/test/fixtures/catalog.golden.json) in its Rust tests, so the two cannot drift silently.Connections
Cap calls the app's server and never the other way round. Every request is signed with Ed25519 (derived from the server secret via HKDF, public key at
/.well-known/cap-app-store-keys.json), so no secret has to reach an author before the first request.sequenceDiagram participant U as Person participant C as Cap participant A as App server U->>C: Install, fill settings (secrets encrypted at rest) C->>A: POST {url}/lifecycle installed Note over C: Cap finishes uploading C->>A: POST {url}/events cap.ready (workflow, retries about a day) U->>C: Cap menu, "Send to My App" C->>A: POST {url}/actions/send A-->>C: { "type": "toast", "message": "Sent" } C-->>U: Toast, or opens an https URLapps/web/lib/app-store/payload.ts).apps/web/lib/app-store/delivery.ts).apps/web/lib/app-store/first-party/).cap.readyskips Loom imports and Caps older than seven days, and every event is deduplicated throughapp_store_events, so a recovery path can never repost old Caps.Guards for builders
bun app-store validateruns in CI on every PR (.github/workflows/ci.yml). It checks:main.Everything a person checks is in
app-store/GUIDELINES.md.app-store/blocked.jsonis the kill switch.Shipping with
Aurora (8 generated mesh backgrounds plus 2 gradients), Studio Captions (5 styles), Film Looks (6 looks), Discord, and Slack, Amazon S3 and Google Drive as built-in apps that open their existing setup.
Web
Desktop
apps/desktop-gpui/src/app_store/: catalog sync with an on-disk cache, installs synced with the account (local installs while signed out, adopted on sign-in), content-addressed asset downloads verified by SHA-256 before use.editor_sidebar/app_backgrounds.rs), app caption styles and color looks next to the built-ins.Reserved for later API versions
The manifest has
apiVersion, and each client only receives apps it understands. Later versions can add WGSL shader transitions, WebAssembly device code (frozen WIT per version, as Zed does) and scoped API tokens without touching apps written for version 1.Before merge
packages/database/migrations/0062_app_store.sqladdsapp_store_installationsandapp_store_events, so it needs a PlanetScale deploy request.

Confidence Score: 5/5
The latest changes appear safe to merge.Summary
Adds one App Store for the web and desktop, with account-owned installs, editor content, and signed requests to app servers.
Reviews (3) · Last reviewed commit: "fix(desktop): show Cap actions as soon a..." · Reviewed by Greptile