Architecture
Components
| Component | Technology | Role |
|---|---|---|
storeasy-api | .NET 11, ASP.NET Core, EF Core (PostgreSQL), MediatR, SignalR, ModelContextProtocol, SkiaSharp | REST API, identity, organizations and roles, sealed store connections, store engines, change plans, job runner, package intake, webhooks and notifications, mockup studio renderer, live activity hub, remote MCP |
storeasy-app | React 18, Vite, TypeScript, TanStack Query, Tailwind, SignalR client | Web app, served by nginx, which also proxies the API on the same origin |
| PostgreSQL 17 | All product data, job queue, e-mail outbox, webhook logs, audit log | |
| Redis 7 | Cache, token revocation stamps, feature flags, rate limits, Google sign in state, SignalR backplane | |
| S3 compatible storage | SeaweedFS (self-host) or AWS S3 | Screenshots, previews, mockup exports, packages; private bucket, presigned URLs only |
tools/ | Node 22, TypeScript | storeasy CLI, storeasy-mcp bridge, GitHub Action, Azure DevOps task |
rules/ | JSON + JSON Schema | Store rules catalog |
The API follows an onion layout: Domain, Application (CQRS features, one folder per use case), Infrastructure (persistence, store gateways, storage, jobs) and Api (controllers, hub, startup). Architecture tests enforce the layer rules.
Request path
browser ---- https://storeasy.example.com ----+
MCP client -- /mcp --------------------------+--> nginx (storeasy-web)
CI runner --- /api/v1.0/... -----------------+ | /api, /hubs (WebSocket), /mcp
stores, EAS -- /api/webhooks/... ------------+ |
v
storeasy-api :8080
|
+---------------+---------------+------------------+
| | | |
PostgreSQL Redis S3 (presigned) App Store Connect,
Google Play,
Microsoft Store APIs
One origin means no CORS setup and one certificate. Files never pass through the API: clients get presigned URLs and talk to the S3 endpoint directly.
A write, end to end
Example: replacing the screenshots of one locale.
- Plan. The web app (or an MCP tool) uploads the images to storage and calls the planning endpoint. The API reads the current set from the store, checks the files against the rules catalog (size, alpha, count), skips images already in the set, and saves a pending change plan with the diff and a fingerprint of the touched store values. Nothing is written to the store.
- Approve. A member with the plan's permission approves it. The API reads the store again; if the fingerprinted values changed, it answers 409 and a new plan is needed. Otherwise it queues a store job and writes the audit entry.
- Run. The job runner (a hosted service inside the API) claims the job, opens the connection's credential in memory, and performs the store calls: reserve, upload, commit, wait for processing, reorder. Each call is a job step, published live to the organization.
- Finish. The job ends
Succeeded,Failed(with retries for transient errors) orCancelled; one audit entry per changed field records who, when, what and through which channel (web, MCP, API).
Key decisions
| Decision | Why |
|---|---|
| Store engine inside the API, no separate worker | Credentials never leave the API process; events go straight to SignalR; self-host is one image |
| Organization roles checked per request, not from token claims | A user has different roles in different organizations; a role change applies at once |
| Custom roles capped by the assigner | Teams can shape roles without a way to escalate |
| E-mails through an outbox table | A slow or missing mail server never changes answer times or loses a mail |
| Jobs in PostgreSQL with leases | No extra queue service; a crashed instance's job is reclaimed |
| Envelope encryption for credentials, master key from the environment | A database leak does not open the credentials |
| Change plans with store fingerprints | Nothing is written without a reviewed diff, and a plan never overwrites a change made in the store meanwhile |
| Rules as data | Store requirements change faster than releases |
| Remote MCP calls the same commands as the web app | One place for permission, diff, confirmation and audit |
| OIDC trusted publishing for CI | No long lived secret in CI |
| AGPL-3.0-only | Improvements to hosted versions stay open |
Background work
Everything runs as hosted services inside the API process; each can be turned off per instance: the store job runner, the e-mail outbox sender, the web push sender, the outgoing webhook sender, and scheduled work (version state, review and TestFlight syncs, deadline reminders, the rule watcher and retention cleanups). Notifications are written once by a dispatcher that applies each user's preferences and fans out to in-app, e-mail, web push and outgoing webhooks.
Store engines
Each store sits behind the same gateway interfaces (read a snapshot, apply a change set), so change plans, readiness and MCP do not care which store they talk to:
- App Store Connect: JSON:API with an ES256 JWT from the team key.
- Google Play: Android Publisher API with a service account token; every write is an edit that is committed or deleted.
- Microsoft Store: an Entra client credentials token for the MSIX and MSI/EXE APIs; writes go into storeasy's own draft submission, and a content fingerprint detects drafts edited in Partner Center.
- winget: the GitHub REST API; approved writes push a branch to your fork of microsoft/winget-pkgs and open a pull request.
- Chrome Web Store: the Chrome Web Store API v2 with a service account key or OAuth refresh token.
- Firefox Add-ons: the AMO API v5 with an HS256 JWT signed per request from the account's API key.
Work a store has no API for is an assisted step: a checklist, prepared answers and a hand-off prompt for a browser agent in the member's own session. storeasy never stores a store password.
The engines are covered by integration tests against fake store servers. To add a new store or distribution channel, see adding-a-store.md in the repository.
Live activity
/hubs/activity (SignalR, Redis backplane) pushes job and step events to the organization's group. Clients authenticate with the access token and join an organization; the hub checks the membership.
Security boundaries
- Every query is scoped by organization; integration tests check that another organization's record answers 404.
- One permission check for every channel: web, REST with a personal access token, MCP and CI tokens.
- Deny by default: every endpoint needs an authenticated user unless marked anonymous; anonymous endpoints are rate limited.
- Access tokens carry a revocation stamp checked on every request.
- Personal access tokens, CI tokens, upload tokens, invitation and account tokens are stored as SHA-256 hashes.
- Outgoing calls to user supplied addresses are limited to public addresses, checked again at connection time.
- Logs redact bearer tokens, JWTs, PEM blocks, signed URL queries and
access_tokenvalues.
See SECURITY.md for reporting vulnerabilities.