├── next-client ├── .env.development ├── .eslintrc.json ├── .env.production ├── public │ ├── logo.webp │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── apple-touch-icon.png │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ └── manifest.json ├── .env ├── pages │ ├── api │ │ └── hello.js │ ├── _app.js │ ├── profil.js │ ├── index.js │ ├── owner.js │ ├── _document.js │ ├── cart.js │ └── order.js ├── next.config.js ├── components │ ├── layout.js │ ├── hero.js │ ├── footer.js │ ├── products.js │ ├── productCard.js │ ├── order │ │ └── payment.js │ ├── storeCart.js │ ├── appbar.js │ └── header.js ├── services │ ├── product.js │ └── order.js ├── app │ └── store.js ├── .gitignore ├── styles │ ├── hero.module.css │ ├── globals.css │ ├── footer.module.css │ ├── productCard.module.css │ ├── cart.module.css │ ├── header.module.css │ ├── order.module.css │ └── store.cart.module.css ├── reducers │ ├── wallet.js │ └── cart.js ├── package.json ├── constants │ └── abi.js └── README.md ├── Dockerfile ├── express-server ├── .env.example ├── models │ ├── product.js │ └── order.js ├── utils │ ├── config.js │ ├── mongo.js │ └── middleware.js ├── .gitignore ├── package.json ├── routers │ ├── product.js │ └── order.js ├── index.js ├── constants │ └── abi.js └── yarn.lock ├── .github └── workflows │ └── docker-image.yml ├── README.md ├── scripts └── docker-compose.yaml ├── Contract └── Payment.sol └── LICENSE /next-client/.env.development: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_API_URL=http://localhost:4000/api/ -------------------------------------------------------------------------------- /next-client/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /next-client/.env.production: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_API_URL=https://web3payment.herokuapp.com/api/ -------------------------------------------------------------------------------- /next-client/public/logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmBayus/Web3-Shopping-Cart/HEAD/next-client/public/logo.webp -------------------------------------------------------------------------------- /next-client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmBayus/Web3-Shopping-Cart/HEAD/next-client/public/favicon.ico -------------------------------------------------------------------------------- /next-client/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmBayus/Web3-Shopping-Cart/HEAD/next-client/public/favicon-16x16.png -------------------------------------------------------------------------------- /next-client/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmBayus/Web3-Shopping-Cart/HEAD/next-client/public/favicon-32x32.png -------------------------------------------------------------------------------- /next-client/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmBayus/Web3-Shopping-Cart/HEAD/next-client/public/apple-touch-icon.png -------------------------------------------------------------------------------- /next-client/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmBayus/Web3-Shopping-Cart/HEAD/next-client/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /next-client/public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmBayus/Web3-Shopping-Cart/HEAD/next-client/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /next-client/.env: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_RPC_URL=https://bsc-dataseed.binance.org/ 2 | NEXT_PUBLIC_CONTRACT=0x2fF7aDa379712E772c9A8F0eb37C836Ded11006E 3 | NEXT_PUBLIC_CHAIN=56 -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node 2 | 3 | EXPOSE 80 4 | 5 | WORKDIR /usr/src/app 6 | 7 | COPY ./express-server/ . 8 | RUN npm install 9 | 10 | ENTRYPOINT ["npm", "start"] 11 | -------------------------------------------------------------------------------- /next-client/pages/api/hello.js: -------------------------------------------------------------------------------- 1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction 2 | 3 | export default function handler(req, res) { 4 | res.status(200).json({ name: 'John Doe' }) 5 | } 6 | -------------------------------------------------------------------------------- /express-server/.env.example: -------------------------------------------------------------------------------- 1 | PORT=4000 2 | MONGODB_URI=mongodb://localhost:27017/testweb3 3 | SESSION_SECRET=secret 4 | CHAIN_URL=https://bsc-dataseed.binance.org/ 5 | CONTRACT_ADDRESS=0x2fF7aDa379712E772c9A8F0eb37C836Ded11006E -------------------------------------------------------------------------------- /next-client/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: true, 4 | images: { 5 | domains: ["img.freepik.com","picsum.photos"], 6 | }, 7 | }; 8 | 9 | module.exports = nextConfig; 10 | -------------------------------------------------------------------------------- /next-client/components/layout.js: -------------------------------------------------------------------------------- 1 | import Header from './header' 2 | import Footer from './footer' 3 | 4 | export default function Layout({ children }) { 5 | return ( 6 | <> 7 |
8 |
{children}
9 |