[
  {
    "path": ".docker/.gitkeep",
    "content": ""
  },
  {
    "path": ".gitignore",
    "content": "ecommerce-frontend/\neditor/"
  },
  {
    "path": ".k8s/.gitkeep",
    "content": ""
  },
  {
    "path": "documentation/Step 1 - Netlify Identity Installion Guide.md",
    "content": "## Netlify Identity Setup\n\n### Setup\n\n```javascript\nyarn add react-netlify-identity react-netlify-identity-widget @reach/dialog @reach/tabs @reach/visually-hidden\n```\n\nAdd provider to `gatsby-ssr.js`\n\n```javascript\nimport React from \"react\";\nimport { IdentityContextProvider } from \"react-netlify-identity-widget\";\nconst url =\n  process.env.REACT_APP_NETLIFY_IDENTITY_URL ||\n  \"https://ddow-ecommerce.netlify.app\";\nif (!url)\n  throw new Error(`process.env.REACT_APP_NETLIFY_IDENTITY_URL is blank2`);\nexport const wrapRootElement = ({ element }) => {\n  return <IdentityContextProvider url={url}>{element}</IdentityContextProvider>;\n};\n```\n\nAdd provider to `gatsby-browser.js`\n\n```javascript\nexport { wrapRootElement } from \"./gatsby-ssr\";\n```\n\nAdd Identity modal to `page.js`\n\n```javascript\nimport React, { useState } from \"react\";\nimport { Link } from \"gatsby\";\n// Step 1 - Adding Netlify Identity\nimport {\n  IdentityModal,\n  useIdentityContext,\n} from \"react-netlify-identity-widget\";\n\nimport Layout from \"../components/layout\";\nimport Image from \"../components/image\";\nimport SEO from \"../components/seo\";\n\nconst IndexPage = () => {\n  const identity = useIdentityContext();\n  const [dialog, setDialog] = useState(false);\n  return (\n    <Layout>\n      <SEO title=\"Login\" />\n      {identity && identity.isLoggedIn && (\n        <pre>{JSON.stringify(identity, null, 2)}</pre>\n      )}\n\n      {!dialog && <button onClick={() => setDialog(true)}>Login</button>}\n      <IdentityModal\n        showDialog={dialog}\n        onCloseDialog={() => setDialog(false)}\n        onLogin={(user) => console.log(`Hello `, user?.user_metadata)}\n        onSignup={(user) => console.log(`Hello `, user?.user_metadata)}\n        onLogout={() => console.log(\"bye\")}\n      />\n    </Layout>\n  );\n};\n\nexport default IndexPage;\n```\n\n```bash\ngit config user.email \"1676496+javaniecampbell@users.noreply.github.com\"\n```\n\n### References\n\nhttps://github.com/sw-yx/gatsby-plugin-netlify-identity\n"
  },
  {
    "path": "documentation/Step 2 - Integrating Stripe Guide.md",
    "content": "## Stripe Integration Guide\n\n1. Need to create a list of products that's not client side (i.e. database, a JSON file, etc)\n2. Cannot trust data sent from the client, because it can be corrupted or tampered with.\n3. Buy Button will trigger a Netlify Function, that will be called to get the price, etc.\n4. The Function will then create a stripe checkout session\n5. Return the session back to the client\n6. Stripe JS redirects using the session to the Stripe Checkout Service\n\n### Step 1: Install the packages and create `functions/`\n\n#### Create directory\n\nMake the `functions/` directory at the root of your client application\n\n```bash\nmkdir functions\n```\n\nThen initialize the `functions/` directory as follows:\n\n```bash\nnpm init -y\n```\n\nOR\n\n```bash\nyarn init -y\n```\n\nThen install your packages in the `functions/` directory so that they manage it's own packages and reducing build errors at deployment:\n\n```bash\nnpm install stripe node-fetch --prefix=functions\n```\n\nOR\n\n```bash\nyarn add stripe node-fetch --cwd functions\n```\n"
  },
  {
    "path": "layot.txt",
    "content": "\n    Directory: C:\\Users\\jc601810\\workspace\\DDoW-Projects\\ecommerce-starter\n\nMode                 LastWriteTime         Length Name\n----                 -------------         ------ ----\nd----           7/21/2022  7:46 PM                .docker\nd----           7/21/2022  7:47 PM                .k8s\nd----            1/2/2021 11:14 AM                documentation\nd----           1/15/2022 11:43 AM                ecommerce-frontend\nd----            2/8/2021  9:33 PM                editor\n-a---           7/21/2022  7:47 PM             28 .gitignore\n-a---            7/2/2023 11:20 PM              0 layot.txt\n\n"
  }
]