feat: complete saleor core extensions app with React email templates

- Order confirmation, shipped, and cancelled email templates
- Uses @react-email/components for professional HTML emails
- Sends admin and customer notifications
- Integrates with Resend for email delivery
- Webhook handlers for ORDER_CREATED, ORDER_FULFILLED, ORDER_CANCELLED
- Docker image optimized for production
- Persistent auth data storage via PVC
This commit is contained in:
Unchained
2026-03-27 05:21:56 +02:00
commit 33fb9a8452
76 changed files with 209115 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
# Copilot Instructions
## Verify Schema
Whenever the user is asking for integration with Saleor API, verify the [schema.graphql](../graphql/schema.graphql) to match the queries, mutations and inputs required by Saleor API.
## GraphQL Files
Whenever the user requires some GraphQL query/mutation, write them to a .graphql file in [/graphql](../graphql) folder. Queries go to "/query", mutations go to "/mutations" etc.
## Generating Types
When you add a new GraphQL file, make sure to regenerate the types using the "generate" command from [package.json](../package.json). It may take some time for the TS Server to detect the changes.
+46
View File
@@ -0,0 +1,46 @@
import { spawnSync } from "node:child_process";
const {
stdout: branchesDiffer,
stderr,
status,
} = spawnSync("git", ["log", "main..canary"], {
encoding: "utf8",
});
if (status !== 0) {
console.error("Fail reading branches diff");
console.error(stderr);
process.exit(1);
}
if (branchesDiffer === "") {
console.log("Branches canary and main have no different commits");
process.exit(0);
} else if (branchesDiffer.length > 0) {
const result = spawnSync(
"gh",
[
"pr",
"create",
"-B",
"main",
"-H",
"canary",
"--title",
"Merge canary to main",
"--body",
"Merge canary to main, to trigger a prod release",
],
{}
);
if (result.status === 0) {
console.log("Successfully opened a PR");
process.exit(0);
} else {
console.error("Error trying to open a PR");
console.error(result.stderr);
process.exit(1);
}
}
+16
View File
@@ -0,0 +1,16 @@
name: Assign PR to creator
on:
pull_request:
types: [opened]
jobs:
assign_creator:
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- name: Assign PR to creator
uses: toshimaru/auto-author-assign@ebd30f10fb56e46eb0759a14951f36991426fed0 # v2.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
+48
View File
@@ -0,0 +1,48 @@
name: Check Licenses
on:
pull_request:
types:
- opened
- synchronize
# Labels are needed to handle external contributors
- labeled
- unlabeled
paths:
# Self
- ".github/workflows/check-licenses.yaml"
# Python Ecosystem
- "**/pyproject.toml"
- "**/setup.py"
- "**/requirements*.txt"
- "**/Pipfile.lock"
- "**/poetry.lock"
# JS/TS Ecosystem
- "**/package.json"
- "**/pnpm-lock.yaml"
- "**/package-lock.json"
jobs:
default:
permissions:
contents: read
pull-requests: write
uses: saleor/saleor-internal-actions/.github/workflows/run-license-check.yaml@v1
with:
# List of ecosystems to scan.
ecosystems: >-
python
javascript
# Grant rules (https://github.com/anchore/grant/blob/4362dc22cf5ea9baeccfa59b2863879afe0c30d7/README.md#usage)
rules: |
# Explicitly allow LGPL as "*GPL*" rule will cause to reject them otherwise.
- pattern: "*lgpl*"
name: "allow-lgpl"
mode: "allow"
reason: "LGPL is allowed."
- pattern: "*gpl*"
name: "deny-gpl"
mode: "deny"
reason: "GPL licenses are not compatible with BSD-3-Clause"
- pattern: "*proprietary*"
name: "deny-proprietary"
mode: "deny"
+29
View File
@@ -0,0 +1,29 @@
name: QA
on: [pull_request]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Check types
run: pnpm check-types
- name: Check for changes in generated files
run: |
pnpm generate
git diff --name-status --exit-code .
- name: Test
run: pnpm test
- name: Build project
run: pnpm build
@@ -0,0 +1,25 @@
# Branches with names starting with `example` are meant to be long living branches used as
# documentation/usage example.
# After accepting the branch, the main PR should be closed
name: Example branch management
on: pull_request
jobs:
example-branches-checks:
if: ${{ startsWith(github.head_ref, 'example') }}
name: Checks
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- uses: actions-ecosystem/action-add-labels@bd52874380e3909a1ac983768df6976535ece7f8 # v1.1.0
name: Set example label
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: |
example
- name: Example branches are not meant to be merged
run: |
echo "Example branches are not meant to be merged"
exit 1