Building software that supports government or municipal projects is a job reserved exclusively for people who enjoy solving unnecessarily complex problems. If requiring 30 signatures to rename a function doesn’t get you, navigating data integrity and endless legislation will.
Fortunately, people like the DAT AI team exist. This Pakistani startup, founded two years ago by three in-field monitoring and data specialists, is wielding Elixir and Fly.io infra to genuinely impressive results.
Field Data Collection Is Hard
DAT AI Systems’ flagship product is a field operations solution for Lahore Waste Management Company (LWMC), the largest public sector employer in Pakistan. This solution was originally adopted for Lahore city, and has now been rolled out to Lahore Division, which includes Lahore, Sheikhupura, Nankana Sahib and Kasur. The system tracks activity and identifies anomalous behaviours in a staff pool of over 4,000 employees.
The team sidestepped the challenge of limited tech literacy among infield users by using WhatsApp as its frontend on the ground. Meanwhile, managerial staff have access to a comprehensive back office solution, providing analytics and automated reporting.
Architected for Scale and Simplicity
The architectural challenges that DAT AI had to overcome are just as daunting as the problems the product solves. Because speed, concurrency and stability are so important, the platform is built entirely on Elixir. Everything runs serverless, with Neon for the database, Upstash for Redis, CloudAMQP for queues, and Retool for dashboards.
This tooling allows Ahsan Nabi Dar, DAT AI’s one-man technical team, to punch way above his weight class. But keeping latency in check across these services is a challenge. At least it would have been if Ahsan hadn’t already been using Fly.io infra for half a decade before building DAT AI.
Focusing on a low-latency experience for all users, Ahsan served Retool business users from Los Angeles (LAX), WhatsApp API users out of Secaucus (EWR), while the main application lived in Dallas (DFW). In the end, he pulled it all together with a consolidated deployment in Chicago (ORD), achieving acceptable cross-region latency.
Scaling to Zero, Scaling to Millions
DAT AI leans hard on Fly.io’s scale-to-zero functionality. Field operations in Pakistan run in three shifts, with thousands of workers clocking in and out. On Sundays, the whole system can scale down to an infrastructural skeleton crew, keeping costs low. Likewise, when traffic demands it, DAT AI can scale up instantly and automatically. No hardware commitments, no over-provisioning. A game-changer for public sector projects with unpredictable workloads.
Small Team, Big Impact
If the impact that DAT AI Systems’ flagship solution has had on the lives of Pakistani workers is anything to go by, expect big things from this team. One of the key issues at LWMC was supervisors misusing janitorial staff for personal tasks instead of assigned fieldwork. DAT AI Systems’ solution provides the kind of real-time transparency that translates into accountability. Staff exploitation in LWMC’s operations has been massively reduced since its deployment.
Meanwhile, the Government of Punjab Solar Project is using DAT AI Systems’ solution to track and manage a massive 8,000 tube well solarization initiative, driving self-sufficiency for 8,000 farmers across Punjab province. In that project, DAT AI is helping 40 contractors to navigate complex bureaucratic workflows involving multiple approval stages and numerous stakeholders. The system streamlines document management with automated image resizing and processing, stakeholder integration (contractors, tech partners, regulators, and finance departments) and payment tracking.
Ready for Scale
DAT AI Systems’ tiny team is already supporting some of Pakistan’s largest public sector operations, thanks in no small part to their clever architectural decisions. It’s inspiring to see Ahsan Nabi and his team using Fly.io to its full potential.