Hacker News new | past | comments | ask | show | jobs | submit login
Next.js Commerce store, one-click deploy to Netlify (github.com/chec)
141 points by Pebbleboi on Nov 25, 2020 | hide | past | favorite | 66 comments



Heads up: it looks like the company behind this (Chec) collects and stores a significant amount of data from the usage of the Commerce.js SDK featured here; including customer name, email address, phone number, IP address, device fingerprint and transactions. The privacy policy isn't particularly clear about how this is used, but it's very permissive and vague. It also states that this collection is "mandatory." In my experience this means it will be repackaged as "analytics" and sold for market research and advertising.

Be wary when using eCommerce SDKs, especially in the absence of exact, legalese-free clarification about what "data processing" means. Here is the privacy policy: https://www.iubenda.com/privacy-policy/60591797/full-legal

Keep in mind that if Chec is acquired, the durably stored data will also be transferred per this policy. Beyond the usual callouts like fraud and geolocation, the policy also allows the company to use customer data to "improve its services", with no specificity on what exactly that would entail.


By default stripe.js (one version ago), the default button they included on their getting start page does the same thing, it took us a really long time to implement the custom api that will only submit the credit card number info + amount charged + zip to strip and rest of stuff (customer name, email address, phone number and transactions, etc) to our server.

What bothers me about these lowering the bar for new front end developer/designer is that it is free feast for these kind of non compliance :(


I also am very upset how the bar got lower for web developer. It just some how developer becomes a cool thing to do, and people who are not even interested in development jumped on the band wagon it is very annoying for people who truly understand the development and coding process and being doing it before it was cool.


At least in the US, wages have been stagnant for a vast majority of blue collar jobs for decades, while the cost of living, higher education, healthcare, and childcare have risen astronomically. Computer programming pays good money and often requires no higher education to acquire a job (especially when, again, higher ed can put you in debt for literal decades). It's not a mystery why people here want to do it even if they had no interest before. You don't have to be a genius to put 2 and 2 together and figure it out.

Based on living in the US and seeing many reactions similar to yours over time, I would say your "problem" isn't that new people are getting into an industry. Your problem is that you need to get over yourself and grow up. Sorry the normies make it hard for you to think of yourself as an elit3 uberhax0r anymore, but nobody really cares.


I liked where your comment started, but that ending, ewww. I'm not the author you responded to but I read it more like.

I'm tired of these people that dont understand how easy it is to violate personal privacy with digital technology getting into digital technology.


I'm sorry, but that attitude is absurd. Software development is a job. There is nothing wrong with taking a job because of the paycheck. Many of the startups discussed on HN are not doing it for "the art" of software development, they are seeking money. The VCs that drive the startup world are doing it for money. Telling coders that they need to be in it for the craft of coding while everyone else around them is in it for the money... that is simply unreasonable.

I'm happy for you that you love the work so much to even have such a perspective. But it isn't a fair perspective to everyone else.


Development was always cool, no? Why the hate for newcomers, people got to start somewhere, right?


yes. It is ok if someone doesn't know anything and want to learn as a coder/developer. What I find mostly is that new comers are usually just following the trend or the pay. It is quite a turn off. I'm sure the musicians and artists can relate to that. And often the experienced developer end up cleaning up their stuff, then they move on to another track to be manager or something. (that's to answer your question).


Don't gatekeep.


there is no gatekeeping. Everything is online! If you are interested you can learn it. Don't jump on band wagon because of trend or the pay!

software development is NOT for everyone. Either you got or you put in a lot of work and get it. Other wise go do something else.


Why not?, if you are born and raised in a country where the economy isn't great and software development is going to be your way out then following the trend is an excellent way to get hired. Yes, they won't be like me but so what? someday they'll start cleaning up and contributing too. Someone's got to have a chance to get out of the grind.


You are gate keeping by saying that you have to have some intangible special quality to be a "software developer". This is a toxic view that spreads doubt and division inside people.

Programming isn’t special. If someone wants to do it for a job, so be it. Shame on you for trying to gatekeeper what they learn or do.


Sorry, but this opinion is what's wrong with the industry for decades now.

Don't judge people by the reasons they want to become devs.

I wanted to do it out of passion, I do it even in my free time, when I'm bored, but many people don't and that's okay.


Software development IS for everyone. Don't like one, don't hire them. You are exactly gatekeeping, but who said you are what I or others here consider a good developer?


Yeah, this is extremely in violation of the GDPR.


I was looking to build with this until I read this chain of comments. I feel worried about using it and I don't think I should use even simple well built tools if this is the case.


Based on this article, I guess they've determined they're in GDPR compliance and it's the merchants who have to sort that out :)

http://support.commercejs.com/en/articles/1942216-gdpr-with-...

> We collect our merchants’ customers’ name, email, shipping and billing address, payment details, company name, phone number, IP address, information about orders you initiate, information about the Chec powered merchant stores/integrations that you visit and interact with, and information about the device and browser you use.

The FAQ is "what" and "why", but only the "what" is answered.


"they've determined they're in GDPR compliance" Their claim is BS. They are collecting third party data because the customers are the merchants customers not theirs. The data collected is not necessary for business because the customer doesn't have a business relationship with them.


A few years ago I reviewed a platform offer from a corporation you've heard of. They had a similar clause regarding data protection issues - it basically said "all your data is going to be sent to US servers and we're going to do basically whatever we want with it and there's nothing you can do to opt out. It's your responsibility to let your customers know about it".

I told my boss that, while I was not a lawyer, in my opinion we simply could not sign that contract and provide a service without blatantly violating the then-recent GDPR. (We didn't sign it, although I don't know if that played a part.)

Chec seems to be using a similar approach? They're running a B2B service which doesn't provide analytics opt-out, and their B2C users are supposed to tell the customers "hey, we can't offer you an opt-out on data collection because it's required to make the software platform work" (except that you're not required to run your store on Chec specifically, otherwise it would be a trivial method to bypass the GDPR).

Nonetheless, it's inexcusable that the words 'purpose' and 'analytics' do not appear in that blog post. Those are essential aspects of the GDPR, and if you're not explicitly stating that you won't re-sell the collect data to third parties without the owner's consent, I assume you do.


Honestly asking - it they are just a proxy for that info, does it change things?


8.2 MB initial page load and slow as hell (1-2sec) when trying to navigate between pages. It was so slow I thought the site wasn't doing anything.

It looks like rendering a new page is blocked until API requests to both "categories" and "products" endpoints are completed, which is terrible. They should be background requests that aren't render-blocking. Also, these requests fire _every time_ you click a link.

Right now, the user experience is 0/10. Would not recommend.


One of the reasons is that the page is not using next.js 10, which has image optimization built in, for comparison you can check the ecommerce app built in next.js 10 here:

https://demo.vercel.store/


Performance is so much better for this one.


next.js 10 finally has the "home.php" feel. Yeah, yeah, full-circle and everything but I can use typescript to create "home.tsx", come on!


Culprit is large image than necessary as its always the case. Out of 8.4 MB transfered 7.5 are just images. Product images which they are showing in 400x500 viewport has actual size of 2400x3600 (7x). I think NextJS introduces <Image /> component im not sure how much that would have been useful.


Definitely not the images causing it to be slow as suggested in the replies. It's just poorly built. I have a next app that was using the older version with massive images and navigation was near instant.


I think they are commenting about the images specifically.

As you say, the large images and poor navigation are definitely separate issues.


To be fair, the bulk of the page load consists of large unoptimized images. My page load was 9.1 MB of which 8.1 MB were images and 446 kB was react devtools. So that means the rest of the site is about 0.5 MB.


why would a prod build ship 446kB of devtools?

we're clearly discussing radically non-optimized (ie, misconfigured) build, making criticisms of nextjs per se entirely moot.


"It looks like rendering a new page is blocked until API requests to both "categories" and "products" endpoints are completed" This could be the known issue[0] with how Next.js does Server Side Rendering with getServerSideProps(). It calls this on every page transition, even client side. Often resulting in unnecessary loading of initial data.

[0][https://github.com/vercel/next.js/issues/11897]


Damn. If this is a Next.js issue then I'm pretty disappointed that it doesn't work well for such a common use case.

From the looks of that issue there are workarounds in some instances though.


It's not just that the page loads are slow - they give you zero feedback that something is actually happening. Chrome's progress bar never appears, links don't change style, etc.


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.


80% of my time I'm doing modern JavaScript development.

A few years ago, I had a tiny studio where I built and sold small webshops.

I have no idea how I'd convince a small customer how this is any better than WooCommerce slapped on a $5 droplet.


Earlier in my career, I used to listen to people making fun of WordPress and PHP. I used to waste time building things with .net or Django, reinventing the wheel, while a perfectly working solution already existed in PHP.

After a while, I swallowed my pride and started to use them. I am not building the next google, or the next Uber. I'm writing projects on the side for small businesses.

Nothing comes even close to the wordpress, PHP ecosystem. Nothing


Coming from an industry where Wordpress has been beaten, bent, and crammed into use as a multi site publishing domain where much is promised, sometimes half-delivered, and full of security holes, leaky logic (try cross-plug-in dependency hellscapes), and so on....

I’m not a fan. But I’m not a fan for the use case of major publishing platform.

For small businesses, small e-commerce, small blogs or publications it’s great. But for the love of god, I wish people would stop extrapolating that fact to mean it’s good for everything. But now there’s a cottage industry built around selling that very idea to ignorant people for a high fee. Total racket.


I use processwire for simple sites. I write maybe a 100 lines of PHP, slap on a HTML template, some Vue.js here and there... and there you go, your small project is ready. Many people do similar with Wordpress, jQuery, etc. In my case, clients also get a synced staging site so they can even do upgrades on their own (click giant upgrade button, sync if it works, open ticket when not).

If it's going to take more than a week, I directly involve Entity Framework (recently more Dapper than EF but anyway), React/Next.js, Typescript (switched from NHibernate + knockout.js to this stack lately). Most of the pages are rendered on the server. Performance is crazy. Maintainability is great too! They need to call me, or hire one of the many react/.NET devs available if an update/migration is needed, but it's easy to understand as no magic is involved.

We need to understand that these 2 are shockingly separate worlds. So, all these words just to say that I agree with you :) But there is one catch: Sometimes a quickly implemented site organically grows into multi-sites, or into an app that does more than to manage content, that's the point the customer needs to understand these concepts too.

Better to explain to them from the beginning!


You get it!

I see so many major publishers doing just what I've described, too, and it bewilders me. There are still a lot of brilliant people working in publishing, even traditional publishing. See the New York Times digital teams, after all.

But there is a gaping void of high-functioning software for digital publishing that is extensible, and that is easily integrated with existing workflows (InDesign/InCopy as either an endpoint or an entry point—or better yet, two-way) and capable of multichannel publishing out of the box.

And not just in the creative and digital ends. There is a sore lack of labour-reducing software in the print world as well. Flyer creation—tens of thousands of hours a year are burned just moving data from a spreadsheet into templates. (I have similar critiques of Excel here: use it for the data entry, tabling, what have you. But don't try and make your mock-up layout in there and expect that to 1:1 translate to InDesign without any labour. And for the love of god do not promote it as such)

The impasses I've seen are as such: a lot of tech assumes publishing and printing are "dead", people in industries that have tradition baked into workflows are not open to learning a new tool every year to do the same task so it needs to be a substantial improvement/change, and publishing doesn't have the same piles of VC/investor cash behind it that it had in the 90's (much like "tech" does now).

But I digress...


Agreed. I will say, however, I’m a developer on a team that is a good sized (not small) publishing/media company that is built on WordPress multisite. performance is quite good, as well.


I had a startup eCommerce customer and after analyzing requirements and toying with a Shopify + Next.js headless solution (before they had this commerce package), it became evident that WooCommerce was a much better fit. I passed the project to a trusted dev who charged them half what I would have and they shipped happily.

You don’t have to build Wordpress sites as a freelancer if you’re in a good commercial position where you can find other kinds of work, but to your point I agree that one needs to admit when it’s the better solution. And for small businesses, it’s quite often so.


Just a personal gripe looking at the commerce.js site... I don't understand why people build these insanely complex spa sites yet put no effort into browser caching and lazy loading media files with correctly sized placeholders / containers. The merchants page has layout jank on every load due to this.


Next with v10 just recently introduced an Image component which should help with exactly that problem. https://nextjs.org/docs/basic-features/image-optimization

Maybe it's not in this demo yet.


Because they don't know any better.


Why did you choose Netlify over Vercel? Specifically Vercel since they have great DX with the next.js framework.


To be more explicit... Next.js is made by Vercel!

That being said, maybe it's because Vercel already made a Next.js Commerce product: https://nextjs.org/commerce


Wow - I hadn't seen this product before! Thanks for sharing.

I'm currently running a cobbled together "stack" on my solar site https://sunboxlabs.com (Hugo, Paypal, NetlifyCMS, custom JS for coupon and affiliate codes) and have been refusing to move to Shopify.

Maybe I'll give one of these two a shot. 3% on top of the CC processing fees is not too bad. But not great either for a $599 product...


Could you share why you refuse to move to Shopify?


Their framing it as a refusal is interesting. As someone who works for an E-commerce consulting agency, we do a lot of Shopify and WooCommerce work and generally there are valid reasons for each. The biggest reason to stay _away_ from Shopify, is if you want absolute control over everything. If you can jive with their checkout flow (which honestly is great), then there's not too much that their third party add-ons cannot somewhat incorporate.

The other big show-stopper from our experience is multi-lingual support, but tbh that sucks on 95% of ecommerce platforms.


Clicking feedback is very bad, sometimes it's instantaneous, other times it takes a couple of seconds that makes me unsure whether I actually clicked. Product pages loads fast but any other page is a lottery if it's going to load fast or take 2 seconds. Maybe this is a Commerce.js issue.

Is there a way to test the administration pages?


Quick question for anyone using Netlify at work: What's the use case and did you have any issues getting buy-in?


AWS admin UI/UX looks like rocket cockpit. Netlify UI/UX is super simple and clean, with Netlify I am sure about what I am doing. Mastering AWS is complete waste of time and talent. And those AWS specialist jobs only exists because of AWS UX confusing and complex.


The key thing for me was the deployment-per-branch feature, makes testing with internal stakeholders so much easier.


Agree, we also use it at work, it's fast, reliable, free, pretty much works out of the box, has SSL...


Easy for deploying different stages with different build parameters, less of a PITA than the AWS S3 + cloudfront distributions. It's annoying though that we've basically been forced to use their DNS solution since we need custom URLs for branch deploys.

I didn't have any issues with buy-in since we were only a few people at the time and basically got the ok as long as there wasn't any downtime in the transition (which there wasn't).


You no longer need to use their DNS because they can put branch deploys on their own domain now.


Can confirm netlify DNS hosting was never a requirement for branch deploys, using your domain name (staging.you.com) or netlify's (staging--yoursite.netlify.com). This article shows how to configure using other DNS hosting: https://community.netlify.com/t/support-guide-how-to-use-net...


Check out aws amplify sometime if cf+s3 hates you


There was a YC company in the serverless ecommerce space until they were acquired - Moltin - https://www.ycombinator.com/companies/818


I have mixed feelings about this example app but I’ve used Next.js in the past and had a really positive experience. The SSR model they use is top notch and a really compelling reason to adopt, among other things.


If looking for a real headless ecommerce ready for the Jamstack, take a look at Commerce Layer! https://commercelayer.io/


I'd love to try a Vue/Nuxt equivalent of this, if anybody's looking for a side project idea.


Technically all deploys are one click if you disregard the previous X steps that sets up that final click.


[flagged]


There is a url to a demo store in the github about section.


Thanks, impressive




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

Search: