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
.DS_Store
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Build and Cache
/.cache
/build
/app/build
/public/build/
/public/_dev
/app/public/build
/prisma/dev.sqlite
/prisma/dev.sqlite-journal
database.sqlite
.env
.env.*
/.react-router/
/extensions/*/dist
# Ignore shopify files created during app dev
.shopify/*
# Environment and Secrets
.env
.env.*
!.env.example
# Shopify Dev
.shopify/
.shopify.lock
/shopify.app.*.toml
!/shopify.app.toml
# Hide files auto-generated by react router
.react-router/
# Configuration and Local Settings
# IDE and System
.gemini/
.cursor/
.mcp.json
.npmrc
.npmrc
.vscode/
.idea/
*.swp
*.bak

View File

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

View File

@ -21,7 +21,7 @@ api_version = "2026-04"
[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]
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]
admin = "merchant_read_write"
[metaobjects.app.example]
name = "Example"
description = "An example metaobject definition created by this template"
[metaobjects.app.product_review]
name = "Product Review"
[metaobjects.app.example.access]
[metaobjects.app.product_review.access]
admin = "merchant_read_write"
storefront = "public_read"
[metaobjects.app.example.fields.title]
name = "Title"
[metaobjects.app.product_review.fields.product_id]
name = "Product ID"
type = "single_line_text_field"
required = true
[metaobjects.app.example.fields.description]
name = "Description"
[metaobjects.app.product_review.fields.customer_name]
name = "Customer Name"
type = "single_line_text_field"
[metaobjects.app.product_review.fields.content]
name = "Review Content"
type = "multi_line_text_field"
[metaobjects.app.product_review.fields.rating]
name = "Rating"
type = "single_line_text_field"
[app_proxy]
url = "/api/reviews"
subpath = "reviews"

View File

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

View File

@ -53,10 +53,9 @@ export default defineConfig({
assetsInlineLimit: 0,
},
optimizeDeps: {
include: ["@shopify/app-bridge-react"],
exclude: ["@prisma/client"],
include: ["@shopify/app-bridge-react", "@shopify/shopify-api", "lossless-json"],
},
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