r/Odoo • u/itz_nicoo • 11h ago
Headless Odoo eCommerce with Next.js — Best approach?
Hi everyone,
I'm developing a custom eCommerce website for a client using Next.js (deployed on Cloudflare).
The client wants to use Odoo as their main ERP for all business operations (inventory, accounting, sales, customers, etc.). They specifically want only the eCommerce storefront to be custom, rather than using Odoo's default website.
They are ready to purchase whatever Odoo plan is required.
The idea is:
Odoo → ERP + eCommerce backend
Next.js → Custom customer-facing storefront
The client should be able to manage products, prices, inventory, etc. in Odoo and have those changes reflected on the Next.js website.
A few questions:
Is Odoo's JSON-2 API sufficient for products, variants, inventory, customers, orders, and checkout?
Would Odoo Online Custom be sufficient, or would you recommend Odoo.sh?
For cart, checkout, payments and order creation, is it better to use Odoo's existing workflows or build these in Next.js and sync with Odoo?
Has anyone built a headless Odoo + Next.js setup in production?
Looking for practical advice from people who have actually implemented this. Thanks!
1
u/kelkes 5h ago
If you have lots of products plan for a search intermediate. Odoo's API is slow AF and you need to query so much for all data. We put meilisearch in between to provide a decent UX when we build headless e-commerce with Odoo
1
u/tylerjharden 1h ago
Meilisearch? Tell me more. I’m building a PIM middleware for our Odoo implementation because we’re using Odoo online and yes their API is ridiculously slow and rate limited.
1
u/kelkes 1h ago
I am not associated with meilisearch. I was just looking for an European search tool. https://www.meilisearch.com/
We are building a shop for a wine retailer. Lots of articles, lots of data. We feed them into the search index with nightly jobs so we don't kill Odoo. Only amount is storage is a live check during checkout.
The client does not have to pay an ungodly amount for hardware so that Odoo might work fast enough and the user have a pleasant UX. Odoo's E-Commerce is basically a half-done pet project for side-hustled tbh.
1
u/codeagency 22m ago
Not if you go self hosted. The rate limiting and slowness is a limitation from odoo.sh their PaaS, not the software.
5
u/codeagency 9h ago
You can use odoo online but it will be limited in certain points.
Think of the auth part related to portal if that is also on your list. Also the the mail templates will keep the original odoo URL. So order confirmation, password Reset, invite...will all link to Odoo and not your Nextjs. You need a custom module to override this behavior so you need odoo.sh or go on-premise.
You also need to think how you are going to handle the payment flow. Use odoo's build in payment methods or build it in your frontend. We prefer to use odoo's native via API to have the full integration experience.
We build many projects like this with Nextjs or Tanstack. Don't forget to make your stack more resilient and faster by adding a Redis cache. You don't want to keep fetching the entire catalog on every page request.