# An e-commerce platform built from scratch in California

> As director of technology at a US e-commerce startup, I built its platform from the ground up and led teams in Australia and India: checkout, discounts, refunds, US sales tax and APIs that scale.

- Client: A US e-commerce startup based in California (E-commerce)
- Role: Director of Technology, Nicolas Dao
- Status: Delivered. Before Cloudless Labs
- Capabilities: E-commerce, Technical leadership, API design, Event-driven architecture
- Web page: https://cloudlesslabs.com/work/ecommerce-from-scratch/

## Outcomes

- An e-commerce platform built from scratch, from the first line of code.
- Engineering teams led across Australia, the United States and India.
- The hard parts of commerce solved for real: discounts, refunds, US sales tax and nexus, and APIs that scale.

## The situation

Before Cloudless Labs, I was director of technology at a US e-commerce startup, building its platform from nothing. A startup moves fast, but commerce is unforgiving: every bug is someone's money, and every rule has an exception.

## What I built

The platform itself, from scratch, and the teams that built it with me, in Australia and India, with regular trips to the States. Along the way, I went deep into the parts of e-commerce that look simple from the outside and aren't:

- **Discounts and refunds.** Stacked promotions, partial refunds, refunds of discounted orders: each has to reconcile to the cent, every time.
- **US sales tax and nexus.** Which states can tax you depends on where you have presence, how much you sell there and how many orders you ship, and every state has its own rules and rates. It's a maze, and getting it wrong is expensive.
- **APIs that scale.** Traffic that spikes on a campaign, and order flows that must never lose a payment, which is where I learned event-driven architecture the hard way.

This is also where I left the Microsoft stack for Node.js, open source and AWS, a move I explain in [why I ended up on AWS](https://cloudlesslabs.com/stack/guides/which-cloud/index.md).

## Why it matters to you

If you sell online, the edge cases are the business. I've built them myself, from the database up, and know where they hide.

## Built with

- [Node.js (plain JavaScript)](https://cloudlesslabs.com/stack/nodejs-javascript/index.md): My default in The Stack
- Payments
- US sales tax
- Web APIs

## Related

- [Why I ended up on AWS](https://cloudlesslabs.com/stack/guides/which-cloud/index.md): the decision guide behind it
- [Real-time ingestion for a national farm-sensor network](https://cloudlesslabs.com/work/realtime-iot/index.md): a related project
- [Every project](https://cloudlesslabs.com/work/index.md)
- [How we work](https://cloudlesslabs.com/about/how-we-work/index.md)
- [Map of every Markdown file on cloudlesslabs.com, with what each one answers](https://ask.cloudlesslabs.com)
