Declared

Code Review Dashboard

Review Progress0/14 sections
0 Approved
0 Needs Discussion
14 Unreviewed
01

The Problem

ShipStation has a bug that's been open for 8+ years: when a Shopify order has an ORDER-LEVEL discount (like '20% off you...

02

The Database

The database has 6 tables (called 'models' in Prisma). Session stores Shopify login info. Shop stores each merchant's se...

03

Webhook Intake

When Shopify creates or updates an order, it sends a webhook (an HTTP request) to our app. This is the front door — the ...

04

The Queue

After an order qualifies, it's dropped into an AWS SQS FIFO queue — think of it as a single-file waiting line. The queue...

05

The Worker

The worker is an AWS Lambda function that sits between the queue and the order processor. It reads messages from SQS, ca...

06

The Math

This is the heart of the app — the discount calculator. It takes Shopify's discount information, calculates a ratio (lik...

07

The Orchestrator

This is the big boss function — processOrder(). At 1,040 lines, it's the largest file in the codebase. It coordinates th...

08

ShipStation API

The ShipStation client is how we read and write customs data. It handles authentication (Basic auth with encrypted crede...

09

Shopify API

We use Shopify's GraphQL Admin API to fetch full order details — specifically the discount allocations and line item pri...

10

Verification

After pushing corrected customs values to ShipStation, we read them back via the API and compare what we sent vs what Sh...

11

Email Notifications

The app sends 8 types of email notifications via Resend (an email API service). Error alerts, review needed, plan limit ...

12

Billing & Plans

The app has 4 billing tiers: Free (20 orders/month), Starter ($9.99, 100 orders), Growth ($24.99, 500 orders), and Pro (...

13

The Dashboard

The merchant-facing UI is built with Shopify Polaris (their design system) and Remix (a React framework). There are page...

14

Security & Infrastructure

ShipStation API credentials are encrypted with AWS KMS in production (AES-256-CBC locally for development). All routes a...

Built for reviewing the Declared codebase

~23,400 lines across 99 files