├── .gitignore ├── README.md ├── next-env.d.ts ├── next.config.js ├── package.json ├── public ├── favicon.ico ├── images │ ├── banner.jpg │ ├── bg.jpg │ ├── coffee-logo.png │ └── coffee.jpg ├── logo.png └── robots.txt ├── src ├── components │ ├── Card │ │ └── Card.tsx │ ├── Cart │ │ └── Item.tsx │ ├── Forms │ │ ├── CanceledPayment.tsx │ │ ├── Confirm.tsx │ │ ├── Delivery.tsx │ │ ├── SelectRegion.tsx │ │ └── validation │ │ │ ├── delivery.ts │ │ │ └── product.ts │ ├── Layout │ │ └── Layout.tsx │ ├── Loader │ │ └── Spinner.tsx │ ├── NavBar │ │ ├── Links.tsx │ │ ├── NavBar.tsx │ │ └── Search.tsx │ ├── Orders │ │ └── Order.tsx │ └── index.ts ├── context │ └── cart.tsx ├── helpers │ └── validateCart.ts ├── hooks │ └── useLocalStorage.ts ├── middleware │ ├── mongodb.ts │ ├── validate.ts │ └── webpay.ts ├── models │ ├── order.ts │ ├── product.ts │ └── yup │ │ ├── delivery.ts │ │ └── product.ts ├── pages │ ├── 404.tsx │ ├── _app.tsx │ ├── _error.tsx │ ├── about │ │ └── index.tsx │ ├── api │ │ ├── delivery │ │ │ └── index.ts │ │ ├── orders │ │ │ ├── [id].ts │ │ │ └── index.ts │ │ ├── pay │ │ │ └── index.ts │ │ └── products │ │ │ ├── [id].ts │ │ │ └── index.ts │ ├── cart │ │ └── index.tsx │ ├── index.tsx │ ├── orders │ │ └── index.tsx │ ├── pay │ │ ├── index.tsx │ │ └── status.tsx │ └── products │ │ ├── [id].tsx │ │ ├── create.tsx │ │ └── index.tsx ├── styles │ └── global.css └── types │ ├── delivery.ts │ ├── order.ts │ └── types.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/README.md -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/next-env.d.ts -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/next.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/package.json -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/images/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/public/images/banner.jpg -------------------------------------------------------------------------------- /public/images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/public/images/bg.jpg -------------------------------------------------------------------------------- /public/images/coffee-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/public/images/coffee-logo.png -------------------------------------------------------------------------------- /public/images/coffee.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/public/images/coffee.jpg -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/public/logo.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/public/robots.txt -------------------------------------------------------------------------------- /src/components/Card/Card.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/Card/Card.tsx -------------------------------------------------------------------------------- /src/components/Cart/Item.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/Cart/Item.tsx -------------------------------------------------------------------------------- /src/components/Forms/CanceledPayment.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/Forms/CanceledPayment.tsx -------------------------------------------------------------------------------- /src/components/Forms/Confirm.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/Forms/Confirm.tsx -------------------------------------------------------------------------------- /src/components/Forms/Delivery.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/Forms/Delivery.tsx -------------------------------------------------------------------------------- /src/components/Forms/SelectRegion.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/Forms/SelectRegion.tsx -------------------------------------------------------------------------------- /src/components/Forms/validation/delivery.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/Forms/validation/delivery.ts -------------------------------------------------------------------------------- /src/components/Forms/validation/product.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/Forms/validation/product.ts -------------------------------------------------------------------------------- /src/components/Layout/Layout.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/Layout/Layout.tsx -------------------------------------------------------------------------------- /src/components/Loader/Spinner.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/Loader/Spinner.tsx -------------------------------------------------------------------------------- /src/components/NavBar/Links.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/NavBar/Links.tsx -------------------------------------------------------------------------------- /src/components/NavBar/NavBar.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/NavBar/NavBar.tsx -------------------------------------------------------------------------------- /src/components/NavBar/Search.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/NavBar/Search.tsx -------------------------------------------------------------------------------- /src/components/Orders/Order.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/Orders/Order.tsx -------------------------------------------------------------------------------- /src/components/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/components/index.ts -------------------------------------------------------------------------------- /src/context/cart.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/context/cart.tsx -------------------------------------------------------------------------------- /src/helpers/validateCart.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/helpers/validateCart.ts -------------------------------------------------------------------------------- /src/hooks/useLocalStorage.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/hooks/useLocalStorage.ts -------------------------------------------------------------------------------- /src/middleware/mongodb.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/middleware/mongodb.ts -------------------------------------------------------------------------------- /src/middleware/validate.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/middleware/validate.ts -------------------------------------------------------------------------------- /src/middleware/webpay.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/middleware/webpay.ts -------------------------------------------------------------------------------- /src/models/order.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/models/order.ts -------------------------------------------------------------------------------- /src/models/product.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/models/product.ts -------------------------------------------------------------------------------- /src/models/yup/delivery.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/models/yup/delivery.ts -------------------------------------------------------------------------------- /src/models/yup/product.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/models/yup/product.ts -------------------------------------------------------------------------------- /src/pages/404.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/404.tsx -------------------------------------------------------------------------------- /src/pages/_app.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/_app.tsx -------------------------------------------------------------------------------- /src/pages/_error.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/_error.tsx -------------------------------------------------------------------------------- /src/pages/about/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/about/index.tsx -------------------------------------------------------------------------------- /src/pages/api/delivery/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/api/delivery/index.ts -------------------------------------------------------------------------------- /src/pages/api/orders/[id].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/api/orders/[id].ts -------------------------------------------------------------------------------- /src/pages/api/orders/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/api/orders/index.ts -------------------------------------------------------------------------------- /src/pages/api/pay/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/api/pay/index.ts -------------------------------------------------------------------------------- /src/pages/api/products/[id].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/api/products/[id].ts -------------------------------------------------------------------------------- /src/pages/api/products/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/api/products/index.ts -------------------------------------------------------------------------------- /src/pages/cart/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/cart/index.tsx -------------------------------------------------------------------------------- /src/pages/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/index.tsx -------------------------------------------------------------------------------- /src/pages/orders/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/orders/index.tsx -------------------------------------------------------------------------------- /src/pages/pay/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/pay/index.tsx -------------------------------------------------------------------------------- /src/pages/pay/status.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/pay/status.tsx -------------------------------------------------------------------------------- /src/pages/products/[id].tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/products/[id].tsx -------------------------------------------------------------------------------- /src/pages/products/create.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/products/create.tsx -------------------------------------------------------------------------------- /src/pages/products/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/pages/products/index.tsx -------------------------------------------------------------------------------- /src/styles/global.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/styles/global.css -------------------------------------------------------------------------------- /src/types/delivery.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/types/delivery.ts -------------------------------------------------------------------------------- /src/types/order.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/types/order.ts -------------------------------------------------------------------------------- /src/types/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/src/types/types.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-ema/nextjs-store/HEAD/tsconfig.json --------------------------------------------------------------------------------