In times of crisis, vulnerabilities become especially apparent.
For Singapore, the empty supermarket shelves during the early days of the Covid-19 pandemic were but a symptom of a larger worry for a nation that imports most of its food: food security.
There were at least two panic-buying sprees here in the first quarter of the year.
The first was on Feb 7, after Singapore announced that it would be raising its disease outbreak response to the coronavirus situation by a notch to orange, which is just below the highest level of red.
The second happened after Malaysia announced a nationwide movement control order on March 16 to prevent further spread of Covid-19.
Social media swirled with photographs of shoppers thronging supermarkets, grabbing multiple bags of toilet paper, rice and other essentials. Retailers later imposed purchase restrictions, while politicians urged calm, asking people to buy only what they needed.
Singapore imports food from more than 170 countries and jurisdictions, and has long considered diversification a key pillar of its food security strategy.
But the pandemic has shown that diversification alone may be less effective in the face of global supply shocks, when multiple supply chains are strained as countries go into lockdown, and food-producing countries export less.
As Ms Grace Fu, Minister for Sustainability and the Environment, said in an interview with The Straits Times last month, the momentary panic had alluded to the possibility of a global shortage.
Climate change could have a similar impact on global food supply, with erratic rainfall and extreme weather events affecting agricultural output.
But Singapore has risen to the challenge.
Even though many activities ground to a halt over the past year because of the pandemic, efforts to increase local food production continued.
Take, for instance, the goal Singapore set last year to produce 30 per cent of its own food by 2030, up from less than 10 per cent today. The Government wants farmers to achieve this "30 by 30" target by leveraging technology.
The pandemic has not set back this goal, with efforts sped up to help local farms ramp up production over the next six to 24 months.
In September, the Singapore Food Agency awarded close to $40 million under its 30X30 Express grant to accelerate local food production.
Nine urban farms were offered funding for their ability to incorporate highly productive farming systems that could be constructed and implemented quickly to achieve high production levels.
They include projects such as building additional greenhouses, leveraging technology and automation to reduce manpower, and bringing artificial intelligence (AI) to high-tech farms.
SFA said it had to increase its original $30 million budget for the grant to close to $40 million to support the nine companies' proposals.
For instance, one farm, I.F.F.I, will set up a mega high-tech indoor vegetable farm that depends on AI to monitor the growth of its leafy greens, along with an advanced environmental control system to ensure optimum yield all year round.
The farm will also use an innovative water treatment system that reduces the amount of bacteria in the crops and extends the shelf life of its produce.
Singapore is also using science and technology to further revolutionise food production systems.
Earlier this month, the Republic became the first country in the world to approve the sale of a cell-cultured meat product, bite-size chicken pieces by Californian start-up Eat Just.
Culturing meat involves taking cells from an animal (often done in a way that is harmless to the animal), and then growing the cells in a nutrient broth within a bioreactor.
Eat Just has said that its cultured chicken bites will be manufactured in Singapore, and its chief executive Josh Tetrick had told The Straits Times that it aims to produce enough not just for the domestic market, but also the rest of Asia.
Singapore overcame its lack of natural water resources by innovating and coming up with solutions like Newater, or reclaimed water, and desalination.
Now, it is doing the same with food.
Whether they be high-tech farming methods for eggs, vegetables or food fish, or cultivating meat in bioreactors, these Singapore-made solutions could be exported to feed other cities as well.
But infrastructure is just one element of ensuring food security.
During the panic buying sprees, some shoppers loaded their baskets with frozen food items, only to abandon them near the checkout counters when they found the queues too long.
Kept out of the freezer for too long, many of the perishables had to be thrown away.
So just as the empty supermarket shelves were a symptom of the country's vulnerability to global supply shocks, it also reflected the nation's food waste problem.
Food waste is one of the biggest waste streams in Singapore, making up about half of the average 1.5kg of waste disposed of by each household in Singapore daily.
So while efforts are made to boost infrastructure for local production, mindsets must change too.