├── .nvmrc ├── .prettierignore ├── app ├── favicon.ico ├── api │ ├── auth │ │ └── [...nextauth] │ │ │ └── route.ts │ └── revalidate │ │ └── route.ts ├── opengraph-image.tsx ├── (checkout) │ ├── success │ │ └── page.tsx │ └── checkout │ │ ├── payment │ │ └── page.tsx │ │ ├── information │ │ └── page.tsx │ │ ├── shipping │ │ └── page.tsx │ │ └── layout.tsx ├── robots.ts ├── next-auth-provider.tsx ├── (customer) │ └── customer │ │ ├── login │ │ └── page.tsx │ │ ├── register │ │ └── page.tsx │ │ ├── forget-password │ │ └── page.tsx │ │ └── layout.tsx ├── [page] │ ├── opengraph-image.tsx │ ├── layout.tsx │ └── page.tsx ├── search │ ├── loading.tsx │ ├── [collection] │ │ ├── opengraph-image.tsx │ │ └── page.tsx │ ├── layout.tsx │ └── page.tsx ├── context │ └── store.tsx ├── error.tsx ├── page.tsx ├── layout.tsx ├── globals.css ├── sitemap.ts └── product │ └── [handle] │ └── page.tsx ├── fonts └── Inter-Bold.ttf ├── public └── icons │ ├── user.png │ └── placeholder.png ├── .husky ├── commit-msg ├── pre-commit └── pre-push ├── components ├── customer │ ├── index.tsx │ ├── open-auth.tsx │ ├── heade.tsx │ ├── login │ │ ├── loading-button.tsx │ │ ├── forget-password.tsx │ │ ├── registration-form.tsx │ │ └── login-form.tsx │ ├── lib │ │ └── action.ts │ └── modal.tsx ├── cart │ ├── index.tsx │ ├── close-cart.tsx │ ├── open-cart.tsx │ ├── delete-item-button.tsx │ ├── actions.ts │ ├── edit-item-quantity-button.tsx │ ├── add-to-cart.tsx │ └── modal.tsx ├── icons │ ├── right-arrow.tsx │ ├── seprator.tsx │ ├── logo.tsx │ ├── hide-eye.tsx │ ├── wallet-logo.tsx │ ├── visible-eye.tsx │ ├── show-eye.tsx │ ├── github.tsx │ └── shopping-cart.tsx ├── grid │ ├── index.tsx │ ├── tile.tsx │ └── three-items.tsx ├── loading-dots.tsx ├── layout │ ├── footer-placeholder.tsx │ ├── search │ │ ├── collections.tsx │ │ ├── collection-placeholder.tsx │ │ └── filter │ │ │ ├── index.tsx │ │ │ ├── dropdown.tsx │ │ │ └── item.tsx │ ├── product-grid-items.tsx │ ├── footer-menu.tsx │ ├── navbar │ │ ├── search.tsx │ │ ├── index.tsx │ │ └── mobile-menu.tsx │ └── footer.tsx ├── price.tsx ├── logo-square.tsx ├── checkout │ ├── place-holder.tsx │ ├── cart │ │ ├── event-button.tsx │ │ ├── proceed-to-checkout.tsx │ │ ├── cart.tsx │ │ └── cart-item-accordian.tsx │ ├── loading.tsx │ ├── success │ │ └── success.tsx │ ├── next-breadcrumb.tsx │ ├── region-drop-down.tsx │ ├── action.ts │ ├── shipping │ │ └── index.tsx │ ├── information │ │ └── checkout-form.tsx │ └── payment │ │ └── index.tsx ├── prose.tsx ├── opengraph-image.tsx ├── label.tsx ├── product │ ├── product-description.tsx │ ├── Thumbnail.tsx │ ├── gallery.tsx │ └── variant-selector.tsx ├── form-ui │ ├── input.tsx │ ├── textarea.tsx │ ├── select-box.tsx │ └── password-input.tsx ├── carousel.tsx └── pagination.tsx ├── postcss.config.mjs ├── .env.example ├── changelog.txt ├── .eslintrc.cjs ├── .gitignore ├── tsconfig.json ├── middleware.ts ├── lib ├── type-guards.ts ├── constants.ts └── utils.ts ├── next.config.ts ├── license.md ├── commitlint.config.js ├── package.json ├── auth.ts └── README.md /.nvmrc: -------------------------------------------------------------------------------- 1 | 18 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | .next 3 | pnpm-lock.yaml 4 | -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webkul/odoo-react-nextjs-commerce/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /fonts/Inter-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webkul/odoo-react-nextjs-commerce/HEAD/fonts/Inter-Bold.ttf -------------------------------------------------------------------------------- /public/icons/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webkul/odoo-react-nextjs-commerce/HEAD/public/icons/user.png -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no -- commitlint --edit 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npm run format 5 | npm run lint 6 | -------------------------------------------------------------------------------- /app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- 1 | import { handler } from 'auth'; 2 | export { handler as GET, handler as POST }; 3 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | # git pull origin develop 5 | npm run build 6 | -------------------------------------------------------------------------------- /public/icons/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webkul/odoo-react-nextjs-commerce/HEAD/public/icons/placeholder.png -------------------------------------------------------------------------------- /components/customer/index.tsx: -------------------------------------------------------------------------------- 1 | import CredentialModal from './modal'; 2 | 3 | export default function UserAccount() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | export default { 3 | plugins: { 4 | "@tailwindcss/postcss": {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /app/opengraph-image.tsx: -------------------------------------------------------------------------------- 1 | import OpengraphImage from "components/opengraph-image"; 2 | 3 | export default async function Image() { 4 | return await OpengraphImage(); 5 | } 6 | -------------------------------------------------------------------------------- /app/(checkout)/success/page.tsx: -------------------------------------------------------------------------------- 1 | import OrderPage from 'components/checkout/success/success'; 2 | 3 | const SuccessPage = () => { 4 | return ; 5 | }; 6 | 7 | export default SuccessPage; 8 | -------------------------------------------------------------------------------- /app/api/revalidate/route.ts: -------------------------------------------------------------------------------- 1 | import { revalidate } from 'lib/odoo'; 2 | import { NextRequest, NextResponse } from 'next/server'; 3 | 4 | export async function POST(req: NextRequest): Promise { 5 | return revalidate(req); 6 | } 7 | -------------------------------------------------------------------------------- /app/robots.ts: -------------------------------------------------------------------------------- 1 | import { baseUrl } from "~lib/utils"; 2 | 3 | export default function robots() { 4 | return { 5 | rules: [ 6 | { 7 | userAgent: "*", 8 | }, 9 | ], 10 | sitemap: `${baseUrl}/sitemap.xml`, 11 | host: baseUrl, 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /app/next-auth-provider.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { SessionProvider } from 'next-auth/react'; 4 | import { ReactNode } from 'react'; 5 | 6 | export default function NextAuthProvider({ children }: { children: ReactNode }) { 7 | return {children}; 8 | } 9 | -------------------------------------------------------------------------------- /app/(customer)/customer/login/page.tsx: -------------------------------------------------------------------------------- 1 | import { LoginForm } from "components/customer/login/login-form"; 2 | 3 | export const metadata = { 4 | title: "Search", 5 | description: "Search for products in the store.", 6 | }; 7 | 8 | export default async function LoginPage() { 9 | return ; 10 | } 11 | -------------------------------------------------------------------------------- /app/(customer)/customer/register/page.tsx: -------------------------------------------------------------------------------- 1 | import RegistrationForm from "components/customer/login/registration-form"; 2 | 3 | export const metadata = { 4 | title: "Registration Form", 5 | description: "Customer registration page", 6 | }; 7 | 8 | export default async function Register() { 9 | return ; 10 | } 11 | -------------------------------------------------------------------------------- /app/(customer)/customer/forget-password/page.tsx: -------------------------------------------------------------------------------- 1 | import { ForgetPasswordForm } from "components/customer/login/forget-password"; 2 | 3 | export const metadata = { 4 | title: "Search", 5 | description: "Search for products in the store.", 6 | }; 7 | export default function ForgetPasswordPage() { 8 | return ; 9 | } 10 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | COMPANY_NAME="Vercel Inc." 2 | TWITTER_CREATOR="@vercel" 3 | TWITTER_SITE="https://nextjs.org/commerce" 4 | SITE_NAME="Odoo Commerce" 5 | ODOO_REVALIDATION_SECRET="" 6 | ODOO_STOREFRONT_ACCESS_TOKEN='Odoo Access Token' 7 | ODOO_STORE_DOMAIN="[your-odoo-store-subdomain].myshopify.com" 8 | ODOO_API_VERSION='Version' 9 | NEXTAUTH_SECRET=iP5nl4i/KzVQEZWGtcvabzEeq+jPV+lalUN1TwXGYqU= -------------------------------------------------------------------------------- /app/[page]/opengraph-image.tsx: -------------------------------------------------------------------------------- 1 | import OpengraphImage from "components/opengraph-image"; 2 | import { getPage } from "lib/odoo"; 3 | 4 | export default async function Image({ params }: { params: { page: string } }) { 5 | const page = await getPage({ identifier: params.page }); 6 | const title = page.title || page.metaKeywords; 7 | 8 | return await OpengraphImage({ title }); 9 | } 10 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | Legend 2 | 3 | + Features 4 | - Bugs 5 | 6 | -------------------------------- Version 1.0.0 ------------------------------------- 7 | + Setup the next commerce theme from the Odoo APi's Like Homepage, Product, CMS Page, Menus and category. 8 | + Complete the guest checkout. 9 | + Upgraded Tailwind To Version 4 10 | + Upgraded Next.Js and Related Packages To Latest Version -------------------------------------------------------------------------------- /components/cart/index.tsx: -------------------------------------------------------------------------------- 1 | import { getCart } from "lib/odoo"; 2 | import { cookies } from "next/headers"; 3 | import CartModal from "./modal"; 4 | 5 | export default async function Cart() { 6 | const cartId = (await cookies()).get("cartId")?.value; 7 | let cart; 8 | 9 | if (cartId) { 10 | cart = await getCart(); 11 | } 12 | 13 | return ; 14 | } 15 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ["next", "prettier"], 3 | rules: { 4 | "no-unused-vars": [ 5 | "error", 6 | { 7 | args: "after-used", 8 | caughtErrors: "none", 9 | ignoreRestSiblings: true, 10 | vars: "all", 11 | }, 12 | ], 13 | "prefer-const": "error", 14 | "react-hooks/exhaustive-deps": "error", 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /app/(customer)/customer/layout.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from 'react'; 2 | import CustomerHeader from '~components/customer/heade'; 3 | 4 | export default async function AuthLayout({ children }: { children: ReactNode }) { 5 | return ( 6 |
7 | 8 |
{children}
9 |
10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /app/search/loading.tsx: -------------------------------------------------------------------------------- 1 | import Grid from 'components/grid'; 2 | 3 | export default function Loading() { 4 | return ( 5 | 6 | {Array(12) 7 | .fill(0) 8 | .map((_, index) => { 9 | return ( 10 | 11 | ); 12 | })} 13 | 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /app/search/[collection]/opengraph-image.tsx: -------------------------------------------------------------------------------- 1 | import OpengraphImage from "components/opengraph-image"; 2 | import { getCollection } from "lib/odoo"; 3 | 4 | export default async function Image({ 5 | params, 6 | }: { 7 | params: { collection: string }; 8 | }) { 9 | const collection = await getCollection(params.collection); 10 | const title = collection?.name || collection?.title; 11 | 12 | return await OpengraphImage({ title }); 13 | } 14 | -------------------------------------------------------------------------------- /app/[page]/layout.tsx: -------------------------------------------------------------------------------- 1 | import Footer from 'components/layout/footer'; 2 | import Navbar from 'components/layout/navbar'; 3 | 4 | export default function Layout({ children }: { children: React.ReactNode }) { 5 | return ( 6 | <> 7 | 8 |
9 |
{children}
10 |
11 |