DEV Community

Cover image for We Had 6 Hours, a Dying API, and I'm Ran rm -rf. We Still Won. 🏆
MD. HABIBULLAH SHARIF
MD. HABIBULLAH SHARIF

Posted on

We Had 6 Hours, a Dying API, and I'm Ran rm -rf. We Still Won. 🏆

By Md. Habibullah Sharif — CSE Student, Northern University Bangladesh | Assistant Robotics Secretary, NUBCC


1:47 AM. The terminal blinked.
The folder was gone.
The demo was in 4 hours.

That was the moment I genuinely considered if this was how our hackathon story ended.

It didn't.

This is the real story of how our team — Dreams of X — built NagrikAI, survived three catastrophic failures back-to-back, and walked out of Impact Dhaka 2026 as 2nd Runner-Up among 57 competing teams at BUET.

Not polished. Fully by Allah. Earned.


🧠 Why This Matters Before I Even Start

I need you to feel something before I tell you what we built.

Picture a 50-year-old man sitting on a bamboo floor in a village in Sunamganj — one of the most flood-prone regions on Earth. Three days without electricity. The tube-well is broken. His grandchildren are drinking from a ditch.

He has no smartphone. Can't type. Doesn't know what a "helpline" is. Doesn't speak the English that most tech solutions demand.

But he has a voice. And he has words. And he is desperate.

That man is my grandfather. That story is real.

And the question that haunted me walking into that hackathon was simple and devastating:

What if one spoken sentence in his mother tongue could save his family?

That question became NagrikAI. And everything that follows is what we paid to answer it.



👥 The Team That Shouldn't Have Won

Three CSE students from Northern University Bangladesh. No corporate sponsor. No senior mentor in the room. Just a group chat, a shared laptop charger, and a deadline that didn't care about any of that.

Name Role in Team Role in NUBCC
Mahdin Islam Mukim Team Lead Vice President
Md. Habibullah Sharif (me) Development Asst. Robotics Secretary
Yusuf Abdullah Development Robotics Secretary

We weren't the most experienced team in that room. I can say that with full confidence.

But we were the most specific about what we were trying to fix.

💡 Hackathon tip that nobody tells you early enough: Judges see twenty demos in a row. Specificity cuts through the noise faster than complexity. Don't build for "everyone." Build for one exact person with one exact problem — and name them.


💡 What We Built: NagrikAI

Not a chatbot. Not another dashboard. Not a demo that pretends a real problem doesn't exist.

NagrikAI is a civic voice assistant — built specifically for Bangladesh — that converts spoken Bengali or English into structured, actionable data routed to the right government institution. Automatically.

[User speaks] → [AI transcribes] → [NLP structures intent] → [Routes to authority]
Enter fullscreen mode Exit fullscreen mode

Someone speaks this:

"আমাদের গ্রামে গত তিনদিন ধরে বিদ্যুৎ নেই এবং কলের পানি নষ্ট।"
("Our village has had no electricity for three days and the water tap is broken.")

NagrikAI doesn't ask a follow-up question. It doesn't open a form. It doesn't require the person to know what "department" handles electricity.

It acts. It files a structured report — priority: high, category: infrastructure, location: extracted from speech — and routes it to the right institution.

That's the whole idea. Remove the barrier. Restore the voice.



⚙️ Tech Stack — And Why Each Choice Was a Hackathon Decision

Layer Technology Why We Chose It
Frontend Next.js (App Router) + Tailwind CSS Fast to scaffold, zero config for routing
Voice Capture MediaRecorder Web API Built into the browser — no third-party SDK, no install friction
NLP Engine OpenRouter AI API Flexible model routing; we switched providers mid-hackathon and it saved us
Database SQLite3 No server to spin up, no credentials to manage, works offline
UI/UX Minimalist glass-slate interface Accessibility-first — low-vision, low-literacy users are the target

💡 Hackathon architecture principle: Every tool you choose adds setup time. Ask yourself — can I get this working in under 20 minutes? If not, pick something simpler. Speed of iteration matters more than technical elegance at hour 3.


🔥 The Three Disasters (In Brutal Order)

This is the part people don't write about. They crop it out of the LinkedIn post, the Instagram story, the polished retrospective.

I'm not going to do that. Because if you're reading this before your first hackathon, this is the most useful section in this entire post.


Disaster #1 — The API That Lied to Us

We had our NLP backbone planned. Tested locally. Worked beautifully. Clean JSON outputs, fast response times. We were confident going in.

Then the hackathon started.

Real network. Real load. Real pressure.

Error 429: Too Many Requests
Error 500: Internal Server Error
Error 503: Service Unavailable
Enter fullscreen mode Exit fullscreen mode

Over and over. For two hours.

We sat there watching our core feature collapse in real time while other teams were already building. Every minute we spent debugging the API was a minute not spent building the thing that would win us anything.

We made the call at Hour 2: pivot to OpenRouter.

Ripped out the old integration. Rewrote the entire NLP layer. And prayed the new connection held for the remaining 4 hours.

(It did. Barely.)

💡 What this taught us: Always prepare two API providers before the hackathon starts. Not during. Before. Have your .env keys ready, have a test script that hits both, know your fallback before you ever need it. The 20 minutes you spend on this the night before saves you 2 hours of panic inside the event.


Disaster #2 — The rm That Shouldn't Have Happened

Hour 4. Tired. Hungry. Running a cleanup script to remove some temp build files.

The command ran. The terminal returned. We moved on.

Thirty seconds later: "Hey... where did the components folder go?"

Silence.

It wasn't the temp folder. It was the wrong directory. And it was gone.

I won't say who ran it. That's not the point. The point is that we all felt it — that specific horror that only developers know. When your stomach drops before your brain fully processes what just happened.

We had Git. We recovered most of it. We lost about 45 minutes of work reconstructed from memory and blind frustration.

That left us with 2 hours.

💡 What this taught us: At a hackathon, commit to Git obsessively — every 30 minutes, every feature, every small fix. Set a timer if you have to. And never run a cleanup or deletion command without doing echo or ls on the path first. Exhausted developers make expensive typos.


Disaster #3 — $18 Over Budget, Then rm -rf

Hour 5. The API bill landed.

We'd crossed the free tier. $18 over, before we'd even finished building. The budget we didn't have was now in the negative.

We made a decision in that state — that specific state of exhaustion and low blood sugar and stress — and ran a rm -rf command on what we thought was a safe directory.

It was not safe.

Between the first rm and this one, we had now stress-tested every developer nightmare in a single 6-hour window.

API failure. Data loss. Budget overrun. More data loss.

And then we sat down, took a breath, and kept going.

Because there was nothing else to do.

💡 What this taught us: Set hard API cost limits before the event — most providers let you cap spend at $5 or $10. It takes 2 minutes to configure and removes an entire category of disaster. Also: never run rm -rf when you're tired. Close the terminal. Walk away. Come back.


🎤 The Demo That Changed Everything

When demo time came, NagrikAI worked.

I want you to understand how significant that sentence is. After everything — it worked.

A team member spoke a sentence in Bengali. The audio hit the transcription layer. The NLP extracted the intent. The confirmation card appeared. The civic report was filed.

Clean. Fast. Exactly as designed.

The judges asked questions. We answered every single one. But I think what really moved them wasn't the code — it was the story behind the code.

Why are you building this?

And we told them about the 50-year-old man on the bamboo floor who can't navigate a helpline but knows exactly what he needs. We told them about 170 million people in Bangladesh who deserve technology that speaks their language, not the other way around.

"We weren't building another chatbot. We were building a bridge between a voice and an action."

The judges saw it. And they rewarded it.

💡 The demo lesson most teams miss: Your demo should answer three questions without being asked. Who is this for? What does their life look like before this? What does it look like after? If a judge has to imagine the impact, you've already lost half the room. Make them see it.



🏆 The Result

2nd Runner-Up. 57 teams. Impact Dhaka 2026.

Organized by Cognisor AI at BUET ECE Building under the theme "AI for Urban Transformation" — Bangladesh's first international AI hackathon.

Beyond the trophy: the top 3 teams receive opportunities to engage with Japan's tech startup ecosystem, including platforms like Sushi Tech Tokyo 2026.

Three students from Northern University Bangladesh. On an international platform. Competing against teams from across the country.

I still can't fully believe it.


📰 It Made the News

This wasn't just a win for us — it was picked up nationally:


🧩 What I Actually Learned

Not the LinkedIn version. The real version — organized so it's actually useful to you.

⚡ Before the hackathon:

  • Prepare two API providers. Test both. Have both .env keys ready.
  • Set API spend limits on every account. $5–$10 cap. Takes 2 minutes. Prevents disasters.
  • Agree on your Git commit rhythm with your team before the clock starts. Every 30 minutes, minimum.

🔧 During the hackathon:

  • SQLite is criminally underrated for MVPs. Zero config, offline-capable, fast. Stop overthinking the database.
  • MediaRecorder Web API gives you browser-native audio capture with no third-party SDK. Use it.
  • When something breaks badly at hour 3, the pivot decision needs to be fast. Don't debug a sinking ship for more than 30 minutes. Cut and move.

🎯 For your pitch and demo:

  • Name your user. Not "users in rural areas." Give them a face, an age, a specific problem. Judges remember people, not demographics.
  • Show the before and after — not just the product. What does your user's life look like without this? What changes with it?
  • Answer "why you?" before they ask it. Your personal connection to the problem is not a soft detail. It is your strongest differentiator.

🧭 On purpose:

  • Technology built for marginalized communities — not just about them — is where real impact lives.
  • If your product requires the user to adapt to it, you've already failed the people who need it most.
  • A clear "why" is not decoration on top of your idea. It is the idea.

🔗 The Project

NagrikAI — Civic Voice Assistant for Bangladesh
Stack: Next.js · Tailwind · OpenRouter · SQLite3 · MediaRecorder API
Built in: 6 hours
Status: MVP (Competition Build)
Enter fullscreen mode Exit fullscreen mode

🐙 GitHub: NagrikAI-Voice — Impact Dhaka 2026

⚠️ This repository contains proprietary competition code. Shared for reference and learning. Cloning for commercial use without explicit permission is not permitted.


💬 A Note to Every Developer Who's Been in That Moment

You know the moment I mean.

The one where the terminal just... tells you something is gone. Where the API returns something that makes no sense. Where you look at the clock and the math doesn't add up anymore.

Where a quiet, horrible voice in your head says: "Maybe this isn't for you."

I've been there. We were all there that night.

And I want to say something that I mean completely:

That moment is not the end of your story. It's the middle.

The best builders I know aren't the ones who never fail. They're the ones who've been humbled, panicked, and still showed up to the demo.

Every rm -rf that didn't kill you made you more careful.
Every API that failed made you architect better.
Every budget overrun made you wiser about cost.

This stuff is the education. Not the degree.

Ship what matters. Build for real people. Keep going when it gets dark.

That's the whole lesson.


🤝 Connect With Me

I write about AI, civic tech, and building things that matter for communities that are often invisible to the tech industry. If that resonates with you — let's talk.

Platform Link
🌐 Website habibullah.dev
🐙 GitHub github.com/md8-habibullah
✍️ Dev.to dev.to/md8_habibullah
💼 LinkedIn linkedin.com/in/md-habibullahs
🐦 Twitter / X x.com/md8_habibullah
📘 Facebook facebook.com/md8.habibullah
📸 Instagram instagram.com/md8.habibullah

Built with love and an unreasonable amount of pressure.
Habibullah 🇧🇩

Top comments (0)