Nepal Government Election Commission Registration System: Failure and Lessons For Digital Transformation

Nepal is in midst of digital transformation. In recent years, the country has made significant progress in adopting digital technologies to improve governance, enhance service delivery, and foster economic growth. Well, we have made a significant improvements in private sectors i.e. e-commerce, banking and health. However, things aren't looking good for the public sectors. The recent disaster in Nepal's Election Commission's voters registration system has highlighted the major weaknesses in the nation's digital infrastructure and governance.

Background

Following the Gen Z Protest in Nepal protest on September 08 & 09, the parliament was dissolved, and new interim government was elected via Discord open voting. Shortly after taking office, the newly formed prime minister Ms. Sushila Karki led government announced that elections would be held in 21 Falgun 2082 (2026 March 5). In preparation for the elections, the election commission decided to implement an online pre-registration system for voters to facilitate the registration process.

This historical move that never happened before in Nepal was aimed at increasing voter participation and making the process more efficient. It not only aimed to reduce the administrative burden on election officials but also to provide a convenient way for citizens to register from the comfort of their homes. However, the implementation of the online pre-registration system faced significant challenges.

What Went Wrong?

The online pre-registration system was launched with much fanfare, but it quickly became apparent that the system was not prepared to handle the volume of users trying to access it. Was it the code? or a server issue? or lack of proper testing? The system crashed multiple times, leaving many citizens frustrated and unable to register. The technical glitches and downtime led to widespread criticism of the election commission's handling of the situation. I myself finally registered after desperately trying for 4 days straight. Most of the time error 500 or 503 was all I could see.

Was it a Code or a Server Issue?

Short answer, Both. Let's start with the code.

The code was simply terrible. Upon inspecting the the client side code, it was clear that the code was poorly written and error handling was almost non-existent. Looking at the client side code, its easy to guess how the server side code must have been. It looked like a intern project that was rushed to production without proper testing or quality assurance. Below is a snippet of the client side code that was publicly accessible via browser developer tools.

Nepal Election Commission Voter Registration System Failure

Let me explain:

  • Logic using string comparisons like 'True' == 'True'. Is this even a JavaScript?
if ('True' == 'True') {}
if ('True' == 'True') {}
  • Repeating conditions that always evaluate to the same result
  • Overwriting text message multiple times in the same block
changeRequestMessage.textContent = ".....";
changeRequestMessage.textContent = ".....";
changeRequestMessage.textContent = "......";
  • Hardcoding strings instead of using dynamic backend values. This is extremely fragile and unsafe.

I was happy to see the comment in the code that said Set up conditional displays, at least someone tried to make it somewhat organized.

Talking about the server, it was clear that the server infrastructure was not capable of handling the traffic. Looking at the network requests in the browser developer tools, it was evident that the server was overwhelmed with requests, leading to timeouts and errors. I suspect database was the bottleneck here. From my prior experience with similar systems, its likely that the database was not optimized for high traffic, leading to slow response times and crashes.

I also noticed that election commission was trying to fetch data from the national identity document (NID) database when user enters their NID number. The NID server itself was returning 500 errors due to high load, which further compounded the issues with the registration system.

What Could Have Been Done Better?

I'll keep it simple considering the limited time and resources available to the election commission:

  • Programming language: I would have used even a JavaScript or PHP Laravel for such a simple form based application. As the application was build using .NET framework, I understand it's one of the best enterprise grade framework available, but it adds unnecessary complexity for such a simple application.
  • Frontend Framework: Using a modern frontend framework like React.js, Vue.js, or Svelte would have improved the user experience and made the code more maintainable.
  • Database Optimization: Proper indexing, query optimization, and caching strategies could have improved database performance.
  • Caching: Implementing caching mechanisms like Redis could have reduced the load on the database and improved response times.
  • Load Balancing: Using load balancers to distribute traffic across multiple servers could have prevented server overloads.
  • Testing: Conducting thorough load testing and stress testing before deployment could have identified potential bottlenecks and issues.
  • Monitoring: Implementing monitoring tools to track server performance and user activity could have helped identify issues in real-time.
  • CDN: Although election registration was mostly done locally, using a Content Delivery Network (CDN) could have improved performance for users accessing the system from different regions.

We can over-engineer anything in tech. Yes, I agree we could have gone with Rust, Go or other modern programming languages for better performance, but considering the time constraints and the need for rapid development, I would have prioritized simplicity and ease of use over performance optimizations. The above suggested simple tech stack would have been sufficient to handle the expected load and provide a better user experience.

Lessons Learned

The failure of Nepal's Election Commission's online voter registration system serves as a severe reminder of the challenges that come with digital transformation. Nepal's digital infrastructure is still in its infancy, and there is a need for significant investment in technology, talent, and governance to ensure that digital services are reliable, secure, and user-friendly. Nepal needs to adapt enterprise grade software development practices including proper testing, code reviews, and quality assurance to ensure that digital services meet the needs of citizens.

The incident also highlights the importance of proper planning and execution when implementing digital services. Rushing to deploy a system without adequate testing and preparation can lead to disastrous consequences, as seen in this case. It is crucial for government agencies to take a strategic approach to digital transformation, focusing on building robust systems that can withstand high traffic and provide a seamless user experience.

Nepal's journey towards digital transformation is still ongoing, and there are many lessons to be learned from the recent failure of the Election Commission's online voter registration system. By investing in technology, talent, and governance, Nepal can build a more resilient digital infrastructure that meets the needs of its citizens and supports the country's development goals.