chore: setup project infrastructure and shopify app configuration

This commit is contained in:
Divya Pahuja 2026-03-10 03:01:14 +05:30
parent 23290c49ae
commit 1b7c46ff8d
9 changed files with 8903 additions and 12396 deletions

46
.gitignore vendored
View File

@ -1,35 +1,45 @@
node_modules # Dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz
# macOS # macOS
.DS_Store .DS_Store
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Build and Cache
/.cache /.cache
/build /build
/app/build /app/build
/public/build/ /public/build/
/public/_dev /public/_dev
/app/public/build /app/public/build
/prisma/dev.sqlite /.react-router/
/prisma/dev.sqlite-journal
database.sqlite
.env
.env.*
/extensions/*/dist /extensions/*/dist
# Ignore shopify files created during app dev # Environment and Secrets
.shopify/* .env
.env.*
!.env.example
# Shopify Dev
.shopify/
.shopify.lock .shopify.lock
/shopify.app.*.toml
!/shopify.app.toml
# Hide files auto-generated by react router # IDE and System
.react-router/
# Configuration and Local Settings
.gemini/ .gemini/
.cursor/ .cursor/
.mcp.json .mcp.json
.npmrc .npmrc
.vscode/
.idea/
*.swp
*.bak

View File

@ -2,6 +2,5 @@ package.json
.shadowenv.d .shadowenv.d
.vscode .vscode
node_modules node_modules
prisma
public public
.shopify .shopify

1
.yarnrc.yml Normal file
View File

@ -0,0 +1 @@
nodeLinker: node-modules

12355
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,11 +10,9 @@
"config:use": "shopify app config use", "config:use": "shopify app config use",
"env": "shopify app env", "env": "shopify app env",
"start": "react-router-serve ./build/server/index.js", "start": "react-router-serve ./build/server/index.js",
"docker-start": "npm run setup && npm run start", "docker-start": "yarn start",
"setup": "prisma generate && prisma migrate deploy",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"shopify": "shopify", "shopify": "shopify",
"prisma": "prisma",
"graphql-codegen": "graphql-codegen", "graphql-codegen": "graphql-codegen",
"vite": "vite", "vite": "vite",
"typecheck": "react-router typegen && tsc --noEmit" "typecheck": "react-router typegen && tsc --noEmit"
@ -24,17 +22,16 @@
"node": ">=20.19 <22 || >=22.12" "node": ">=20.19 <22 || >=22.12"
}, },
"dependencies": { "dependencies": {
"@prisma/client": "^6.16.3",
"@react-router/dev": "^7.12.0", "@react-router/dev": "^7.12.0",
"@react-router/fs-routes": "^7.12.0", "@react-router/fs-routes": "^7.12.0",
"@react-router/node": "^7.12.0", "@react-router/node": "^7.12.0",
"@react-router/serve": "^7.12.0", "@react-router/serve": "^7.12.0",
"@shopify/app-bridge-react": "^4.2.4", "@shopify/app-bridge-react": "^4.2.4",
"@shopify/shopify-app-react-router": "^1.1.0", "@shopify/shopify-app-react-router": "^1.1.0",
"@shopify/shopify-app-session-storage-prisma": "^8.0.0", "@shopify/shopify-app-session-storage-memory": "^5.0.5",
"isbot": "^5.1.31", "isbot": "^5.1.31",
"mongoose": "^9.2.3", "lodash": "^4.17.23",
"prisma": "^6.16.3", "lossless-json": "^4.3.0",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-router": "^7.12.0", "react-router": "^7.12.0",
@ -44,6 +41,7 @@
"@shopify/api-codegen-preset": "^1.2.0", "@shopify/api-codegen-preset": "^1.2.0",
"@shopify/polaris-types": "^1.0.1", "@shopify/polaris-types": "^1.0.1",
"@types/eslint": "^9.6.1", "@types/eslint": "^9.6.1",
"@types/lodash": "^4",
"@types/node": "^22.18.8", "@types/node": "^22.18.8",
"@types/react": "^18.3.25", "@types/react": "^18.3.25",
"@types/react-dom": "^18.3.7", "@types/react-dom": "^18.3.7",
@ -66,7 +64,7 @@
"trustedDependencies": [ "trustedDependencies": [
"@shopify/plugin-cloudflare" "@shopify/plugin-cloudflare"
], ],
"overrides": { "resolutions": {
"p-map": "^4.0.0" "p-map": "^4.0.0"
}, },
"author": "divyapahuja" "author": "divyapahuja"

View File

@ -21,7 +21,7 @@ api_version = "2026-04"
[access_scopes] [access_scopes]
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes # Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes
scopes = "write_metaobject_definitions,write_metaobjects,write_products" scopes = "write_metaobject_definitions,write_metaobjects,write_products,read_orders"
[auth] [auth]
redirect_urls = [ "https://example.com/api/auth" ] redirect_urls = [ "https://example.com/api/auth" ]
@ -34,22 +34,30 @@ description = "Tracks products created by the Shopify app template for developme
[product.metafields.app.demo_info.access] [product.metafields.app.demo_info.access]
admin = "merchant_read_write" admin = "merchant_read_write"
[metaobjects.app.example] [metaobjects.app.product_review]
name = "Example" name = "Product Review"
description = "An example metaobject definition created by this template"
[metaobjects.app.example.access] [metaobjects.app.product_review.access]
admin = "merchant_read_write" admin = "merchant_read_write"
storefront = "public_read"
[metaobjects.app.example.fields.title] [metaobjects.app.product_review.fields.product_id]
name = "Title" name = "Product ID"
type = "single_line_text_field" type = "single_line_text_field"
required = true required = true
[metaobjects.app.example.fields.description] [metaobjects.app.product_review.fields.customer_name]
name = "Description" name = "Customer Name"
type = "single_line_text_field"
[metaobjects.app.product_review.fields.content]
name = "Review Content"
type = "multi_line_text_field" type = "multi_line_text_field"
[metaobjects.app.product_review.fields.rating]
name = "Rating"
type = "single_line_text_field"
[app_proxy] [app_proxy]
url = "/api/reviews" url = "/api/reviews"
subpath = "reviews" subpath = "reviews"

View File

@ -3,5 +3,4 @@ roles = ["frontend", "backend"]
webhooks_path = "/webhooks/app/uninstalled" webhooks_path = "/webhooks/app/uninstalled"
[commands] [commands]
predev = "npx prisma generate" dev = "yarn react-router dev"
dev = "npx prisma migrate deploy && npm exec react-router dev"

View File

@ -53,10 +53,9 @@ export default defineConfig({
assetsInlineLimit: 0, assetsInlineLimit: 0,
}, },
optimizeDeps: { optimizeDeps: {
include: ["@shopify/app-bridge-react"], include: ["@shopify/app-bridge-react", "@shopify/shopify-api", "lossless-json"],
exclude: ["@prisma/client"],
}, },
ssr: { ssr: {
external: ["@prisma/client"], noExternal: ["@shopify/shopify-api", "lossless-json"],
}, },
}); });

8848
yarn.lock Normal file

File diff suppressed because it is too large Load Diff