Diodra sells bamboo electric bikes to customers across Europe and North America. They wanted a functional e-commerce site without the complexity of maintaining a backend.
diodra.com - Homepage
What Made This Hard
No backend, but still needed real e-commerce functionality. The client didn't want to manage servers, databases, or admin panels. Product inventory, pricing, and availability had to live in the frontend. Any updates would mean code changes rather than editing an admin panel.
Stripe usually needs a server. Payment processing typically requires server-side code to handle secure transactions. I needed to implement checkout flows using only client-side tools.
How I Built It
I kept the stack simple: vanilla HTML, CSS, and JavaScript with Gulp as the build tool. No framework overhead for what's essentially a product catalog.
Product data lives as JavaScript objects directly in the codebase. Each bike model has properties for name, price, specifications, images, and availability. When the client needs to update products, they modify these objects and redeploy.
For payments, I used Stripe's client-side Checkout API. When users proceed to checkout, the app creates a Stripe session with product details and redirects to Stripe's hosted checkout page. Payment security is handled without any backend infrastructure.
The cart uses browser localStorage to persist items across page navigation. Users can add bikes and accessories, adjust quantities, and come back later without losing their selections.