Hacker Newsnew | past | comments | ask | show | jobs | submit | okbel's commentslogin

Hi!!! `vercel/examples` maintainer here. We have some with Svelte and plain edge examples, but more importantly, what would you like to see?


okbel, thanks for the reply. I am interested in translating a Cloudflare Worker (and I know that's the tech underneath Vercel Edge Functions, as leerob indicated last year) that, on my site on Cloudflare Pages, manipulates headers for assets-caching and a Content Security Policy. This is framework-agnostic — I've used it with Hugo, Eleventy, and Astro. Thus, any headers-related examples which *don't* start with `import { NextResponse } from 'next/server'` would be very helpful. :-D Again, thanks, and congratulations on today's launch to GA.


Would an example with a custom CSP be useful ?


guibibeau, that would help, too (although I presume it still would come under the subject of HTTP headers). In short: *any* examples that *don't* require any part of Next.js --- or any other specific framework --- would be what a number of us have wanted since last fall's announcement. Thanks!


The title looks pretty misleading IMO. Next.js Commerce can be found here (https://nextjs.org/commerce) and it's not related at all to this repo shared here.

Some notes:

- This looks like a SPA - And it's a really bad pattern for e-commerce.

- There are a lot of issues with Web Vitals. TTFB is blocking user interaction.

- Looks like SEO (due to SPA) is not being correctly populated?

- It's using Redux (Why??)

- Uses React Classes (Why???)

I'd recommend taking a look at https://nextjs.org/commerce where you can check all recommended patterns from Next.js 10 and more to deploy a successful e-commerce site.

Next.js Commerce supports:

- i18n Internationalization

- Lazy and eagerly loading Images with the Image Component

- Responsive by default

- UI Components

- SEO Ready

- Easily Customizable with TailwindCSS - Themes!

- Data Hooks - to fetch data from your headless e-comm of preference. (BigCommerce support by default)

- Site Speed due to Incremental Static Regeneration and blocking rendering/fallback when needed.

- Auth

and if you deploy with Vercel you have Analytics to stay on track - REAL Web Vitals are key for successful e-commerces.

This means you can easily clone this and run your own store with good practices: e.g https://chicos-commerce.vercel.app/ - Also built with Next.js Commerce.


Why are SPAs bad for e-commerce if they change the URLs? Also I thought Next.js is a SPA framework.


We thought about using next js ecomm for all the reasons you listed but decided not to because it’s not ready for production use yet. Check out the GitHub repo, there are still a ton of bugs and issues to iron out before you can consider running it for a real store.


So sorry to hear that! I'll take a look at it. Thanks for the feedback


Absolutely. Thanks for the feedback, drchiu. I'm @okbel, actively working on Next.js Commerce. Right now the codebase is tightly coupled with BigCommerce, but in the near future (following days) we plan to add multiple data providers. I'm about to edit docs/bigcommerce.md to clearify usage. Thank you!


Hi @okbel, nice work so far! This project could be huge, and hit the target that vue storefront/deity/others have not quite cracked yet.

I'm working on a node/typescript/graphql headless commerce framework (vendure.io) and I'd love to help on an integration if at all possible.

Pros of integrating with vendure: users can stand up a fully-functional local server in 1 npx command; no SaaS account needed; low friction for JS devs used to npm work flows & idioms.


Wonderful, contact me as soon as we finish this one. https://github.com/vercel/commerce/issues/2

Let's do it!


Hey as a happy user of vendure was gonna come here and ask for this.

Please do it guys! I don't mind helping out!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: