It all started with a bowl of millet porridge.

On the morning of April 6, 2010, in a sparsely decorated office in Beijing, 13 men showed up for their first day of work at a new start-up. Xiaomi, which means millet (a type of cereal) in Chinese, was led by entrepreneur Lei Jun. Just six years earlier, he sold his online book retailer to Amazon for US$75 million.

The small team ate some porridge to mark the occasion, then got straight to work.

Less than a decade later, Xiaomi is the world’s 4th largest smartphone maker -- just behind Samsung, Apple and Huawei. The company now has some 18,000 employees.

What happened in those early days and the years leading up to Xiaomi’s multi-billion dollar IPO last week is the subject of Yi Tuan Huo (A Ball of Fire) -- the company’s internal documentary that was released publicly this week.

Lei Jun (center, in black jacket) with his founding team on their first day at Xiaomi. (Picture: Xiaomi/Tencent Video)

The 31-minute film includes rarely-seen footage from Xiaomi’s start-up days, including its first smartphone prototype. It was so fragile that picking it up would have messed up the internal hardware. The engineers were forced to bend their backs and stick their ears to the table every time they wanted to answer a call.

Xiaomi’s first prototype phone couldn’t be lifted from the table. (Picture: Xiaomi/Tencent Video)

The documentary also follows Xiaomi’s meteoric rise and subsequent struggles, painting Lei as an idealist who insists on treating customers as friends and offering them products with exceptional value for money -- even as critics said his business model was unsustainable. In 2016, Xiaomi lost its crown as China’s top smartphone vendor.

One of the most memorable moments was when Lei, standing in front of his troops, recalled a dramatic conversation he had with a highly-qualified job candidate holding an “impeccable resume”. According to Lei, the unnamed person boasted about being able to “sell straw like it was gold” -- an attitude that Lei said was contradictory to Xiaomi’s values.

“I don’t need someone who will lie to customers,” he said. “If you find out one day your friend has been selling straw to you at the price of gold, are you still friends?”

Lei Jun on stage rallying his smartphone employees in July 2016. The words on the screen read, “The situation is tough.” (Picture: Xiaomi/Tencent Video)

Lei insists his company is forging a unique path, having said repeatedly that he doesn’t want to be known as China’s Steve Jobs. The film includes a snippet from a CNN interview where Lei stressed that Xiaomi is different from Apple.

But it's worth remembering that this is an internal documentary... and Xiaomi's insistence that they don't resemble Apple doesn't quite match their history of producing products that look just like iPhones and MacBooks.

The documentary shows lighter moments, like when Lei took to the stage during an annual staff gala in 2014, dressed up as Caishen -- the Chinese god of wealth.

Lei (center, in red) follows the tradition of many Chinese billionaires who like to put on extravagant shows during office parties. (Picture: Xiaomi/Tencent Video)

And there are scenes that remind us of how far Xiaomi has come: Just compare their office in 2012 versus the sprawling headquarters you see today.

Lei (left, in white shirt) and his team celebrate the sale of 4 million handsets within nine months in 2012. (Picture: Xiaomi/Tencent Video)
Xiaomi’s office today, with sleek white walls, polished floors, high ceilings, and plenty of iMacs. (Picture: Xiaomi/Tencent Video)

If you have Adobe Flash, you can watch the film here (in Chinese).