Architecture
StorePush is built as a modern web application with a clear separation between the user interface, API layer, and background processing.
System Overview
User Request → API (tRPC + REST) → Background Job Queue → Apple API ↓ PostgreSQL Database ↓ Real-time Progress UpdatesCore Components
Web Application
The frontend is a Next.js application with React Server Components. It communicates with the backend through tRPC for type-safe API calls.
API Layer
StorePush exposes two API interfaces:
- tRPC — Used internally by the web application for type-safe, efficient communication
- REST API — Auto-generated from tRPC routers via OpenAPI, available for external integrations
Both interfaces share the same authentication, validation, and business logic.
Background Job Queue
All Apple API operations run as background jobs in a PostgreSQL-backed queue. This design ensures:
- Reliability — Jobs persist across server restarts
- Ordering — Each app has its own queue, processing jobs sequentially
- Observability — Progress is tracked in the database and visible in real-time
Apple API Integration
StorePush communicates with Apple through the App Store Connect API using JWT authentication. Tokens are generated on-demand and automatically refreshed before expiry.
Data Model
The core data relationships:
User (1) → App (N) → Version (N) → VersionLocalization (N) → AppleApp (1) (stores credentials) → Build (N) → Review (N) → QueueJob (N)- Each User can have multiple Apps
- Each App has one AppleApp record storing Apple credentials
- Each App has multiple Versions, each with locale-specific VersionLocalizations
- Builds, Reviews, and QueueJobs are associated with their parent App
Scheduled Operations
StorePush runs several cron-based operations:
| Job | Schedule | Purpose |
|---|---|---|
| Pull Changes | Every 5/15/30 min (configurable) | Sync incremental changes from Apple |
| Pull Analytics | Daily at 02:00 UTC | Fetch analytics data |
| Predict Analytics | Sundays at 03:00 UTC | Generate AI performance predictions |