The Brexit debate has revealed in a brutal light the UK's existential crisis: what is it to be a modern nation-state in a neo-liberal global system? Is the UK's path a return to 19th-century Disraelian "Splendid Isolation", or as one of 28 European allies in lockstep, together singing "Alle Menschen werden Brüder"? Perhaps technology can provide an alternative path, befitting a 21st-century state?

There is a role model, albeit small, with unenviable weather, that provides some hints as to what concepts of nationhood could look like in the 21st century. Earlier this week, the smallest of the three Baltic states, Estonia, played host to the bizarre spectacle of a British prince, The Duke of York, hosting an entrepreneurial start-up competition (hard to imagine a less-qualified person than the hereditary heir to a millennial-old institution).

More in keeping with its e-Stonia billing, it is also hosting Nato's International Conference on Cyber Conflict which will tease apart traditional concepts of power and how they apply to cyberspace.

Estonia, through geographic misfortune, has been under Danish, German, Polish, Swedish and, most infamously, Soviet, occupation through its long, but faltering, history. But it is this geopolitical uncertainty that has given Estonia a unique view on what it is to be a nation. It is in the process of developing a concept of nationhood that goes beyond the precepts of the 1648 Peace of Westphalia, which established today's modern nation-states. The country is starting to question what actually is a nation in an online world?

Estonia's technological prowess

The tiny country (its 1.3 million population puts it just ahead of Birmingham's 1.1 million) technologically punches far above its weight. The birthplace of Skype (although headquartered in London and run by a Swede and a Dane, it was actually built by four Estonian engineers), it has produced a string of start-ups, including FinTech darling and reputed "Unicorn", TransferWise.

But it is in the public sphere that the country has made strides that other nations can only dream of. Every citizen is issued a smart card and reader, which can be used to access government services everywhere. One of the first things the government did was to make it legal to sign documents using this card. That unlocked the full potential of electronic services.

Using their smart card 95% of Estonian taxpayers file their taxes online (a process which takes less than five minutes), one in four votes electronically in elections (and the country threw open the software it uses so it could be used by anyone), and all of them can access their medical records. The card is used to encrypt emails.

Leading the line with coding

Estonia was the first country to introduce coding for children. Former education minister Jaak Aaviksoo dismissed the idea that five-year-olds would be expected to learn Java. "No, of course not," he said. "But eight year olds ..."

Britain Estonia technology
Children at a school in Tallinn are introduced to code and web development Reuters

Cabinet meetings have long been digital. e-Cabinet, as the system is known, cuts the average length of the weekly cabinet meeting from four-five hours to just 30-90 minutes.

Then perhaps the most telling manifestation of its commitment to a digital future, the ultimate realisation of a state, was the land registry — the record of who owns every square centimetre of sovereign territory — going fully electronic. There are no paper records.

And, with a wary eye on history, the entire electronic records of the state, are backed up every night and stored in Estonia's diplomatic missions around the world. The state of Estonia exists as a string of database records.

Smart moves to smart cards

Its boldest move to date has been its e-residency scheme. Anyone, paying a fee of €50 (£30, $57), can get a smart card with 2048-bit public key encryption to access some of those services. e-residents cannot vote, but they can create companies and use bank accounts in Estonia, conduct business, and can electronically sign legally binding documents. Recent changes in EU law mean that within the next few years Estonian e-residents will be able to conduct business across Europe. Currently, because of money-laundering regulations, e-residents do need to come to Estonia to open a bank account. However, changes to the country's Money Laundering and Terrorist Financing Prevention Act mean banks will be able to satisfy the requirements remotely, obviating the need for a trip.

One of the people behind the e-residency programme, Siim Sikkut, ICT policy adviser, Government Office of Estonia, Strategy Unit, explained the idea. "Digitally we can make our nation and country last perhaps even at darkest times of history, should they come again," he told me in an earlier interview.

Britain Estonia technology
Students attend a cyber defence class Reuters

So far, some 10,000 people have taken up the programme and as of May 2016, 631 new companies have been formed by e-residents. "We'd be happy if in three years' time we'd have 10,000 new companies by e-residents operating [digitally] from or through Estonia," he said. Since Estonia has roughly 80,000 companies today that would represent a significant increase.

Does Estonia provide a model for other states to follow?

Sikkut says the e-residency programme is changing the concept of what it is to be an Estonian. "Citizenship is not the most defining feature of us anymore — rather, community feeling is. What we are keen to explore is to see how we can expand the community of Estonia really to be global through being digital — to make us larger in the world than we otherwise would be."

So how has Estonia managed to do this? Its bow-tie wearing president, Toomas Hendrik Ilves, explained it with characteristic directness to The Wall Street Journal: "Be occupied by the Soviet Union for 50 years, and then it is a lot easier to do a lot of stuff."