<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Inusha Gunasekara]]></title><description><![CDATA[Inusha Gunasekara]]></description><link>https://inusha-gunasekara.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Nov 2026 18:23:33 GMT</lastBuildDate><atom:link href="https://inusha-gunasekara.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to Build a Cyberpunk Style Terminal Portfolio with Next.js]]></title><description><![CDATA[Create an interactive cyberpunk-style terminal portfolio using Next.js with reduced latency and costs, emulating a live AI experience]]></description><link>https://inusha-gunasekara.hashnode.dev/how-to-build-a-cyberpunk-style-terminal-portfolio-with-nextjs</link><guid isPermaLink="true">https://inusha-gunasekara.hashnode.dev/how-to-build-a-cyberpunk-style-terminal-portfolio-with-nextjs</guid><category><![CDATA[Next.js]]></category><category><![CDATA[Google]]></category><category><![CDATA[webdev]]></category><category><![CDATA[portfolio]]></category><dc:creator><![CDATA[Inusha Thathsara]]></dc:creator><pubDate>Sat, 17 Jan 2026 16:12:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1768665024470/f944c961-4731-46f0-8d62-9053bc85b191.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I didn't want a normal portfolio. I wanted a <strong>Digital Twin</strong>.</p>
<p>I conceptualized <strong>"System 1"</strong> (kinda boring name though. I'm planning to change that later)—a cyberpunk style terminal interface that represents my skills, projects, and personality as code.</p>
<p>The goal? A site that feels alive. A site that types back to you.</p>
<p>👉 <a target="_blank" href="https://inusha-portfolio-326006174526.us-central1.run.app/"><strong>See the Live Terminal (and try to crash it) here</strong></a> (Note: Use a laptop or a PC for the full experience.)</p>
<p>Initially, I wired the terminal directly to the <strong>Gemini 2.5 Flash API</strong>. It was amazing. You could ask, <em>"Who is Inusha?"</em>, <em>"Does Inusha have a girlfriend?"</em> or anything and the AI generates a unique, context-aware answer every time (with some humor of course).</p>
<p>But then I did the math.</p>
<ul>
<li><p><strong>Latency:</strong> API calls took ~400ms-800ms. In the world of "instant" static sites, that felt sluggish.</p>
</li>
<li><p><strong>The "Reddit Hug of Death":</strong> If my post went viral, thousands of concurrent requests would hit the API. My bank account would be in risk because triggering extreme pay-as-you-go billing tokens.</p>
</li>
</ul>
<p>I realized that for a public-facing portfolio, <strong>Reliability &gt; Novelty.</strong></p>
<p>I made a tough call. I ripped out the live AI brain and replaced it with a <strong>Deterministic Simulation Engine</strong>.</p>
<p>Instead of asking Google for an answer, my server now consults a local, optimized knowledge graph. Then, using a custom stream handler, it "types" the response back to the client character-by-character, mimicking the exact visual feel of an LLM generation.</p>
<p><strong>The Result:</strong></p>
<ul>
<li><p><strong>Latency:</strong> Dropped to <strong>&lt;5ms</strong>.</p>
</li>
<li><p><strong>Cost:</strong> <strong>$0</strong></p>
</li>
<li><p><strong>Vibe:</strong> Still feels 100% cyberpunk.</p>
</li>
</ul>
<p>I also added a little "gamification" to reward curious developers. If you have root access (or just know the "sudo "command), you can trigger a system-wide crash and a "reboot".</p>
<p>Type: "sudo delete" Then: "confirm"</p>
<p><em>(I won't spoil what happens next. You have to try it.)</em></p>
<h2 id="heading-read-i-built-a-cyberpunk-terminal-portfolio-with-nextjs-amp-antigravityhttpsdevtoinushathathsarai-built-a-cyberpunk-terminal-portfolio-with-nextjs-antigravity-and-gemini-ai-5457"><a target="_blank" href="https://dev.to/inushathathsara/i-built-a-cyberpunk-terminal-portfolio-with-nextjs-antigravity-and-gemini-ai-5457">Read: I Built a Cyberpunk Terminal Portfolio with Next.js &amp; Antigravity</a></h2>
<p><em>(And if you like the project, a ❤️ on the</em> <a target="_blank" href="http://Dev.to"><em>Dev.to</em></a> <em>post helps me in the challenge!)</em></p>
]]></content:encoded></item><item><title><![CDATA[The Features I Killed to Ship "The 80%" in 4 Weeks]]></title><description><![CDATA[Learn how feature cuts helped launch "The 80%" in four weeks, enhancing project simplicity, performance, and security]]></description><link>https://inusha-gunasekara.hashnode.dev/the-features-i-killed-to-ship-the-80-in-4-weeks</link><guid isPermaLink="true">https://inusha-gunasekara.hashnode.dev/the-features-i-killed-to-ship-the-80-in-4-weeks</guid><category><![CDATA[overengineering]]></category><category><![CDATA[offline first]]></category><category><![CDATA[problem solving skills]]></category><category><![CDATA[Flutter]]></category><category><![CDATA[Mobile Development]]></category><category><![CDATA[app development]]></category><dc:creator><![CDATA[Inusha Thathsara]]></dc:creator><pubDate>Mon, 12 Jan 2026 14:36:10 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1768228008231/716a7814-40f3-4829-8d0e-65a616ac6abf.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I almost fell into a trap believing that "more features" equals a "better product." When I started building <strong>The 80%</strong>, an assistant tool which helps students to keep track of their attendance, medicals and GPA. I had a strict four-week deadline to ship a production-ready attendance tracker. I quickly realized that if I tried to build everything I <em>wanted</em>, I would never ship what the user <em>needed</em>. Then I remembered what Elon Musk said, <strong>"The Best Part is No Part."</strong> I didn't just cut features to save time; I cut them to save the architecture from unnecessary complexity.</p>
<p>Here are the five worth-mentioning features I killed in <strong>The 80%</strong>.</p>
<h3 id="heading-1-the-backup-server-trap">1. The Backup Server Trap</h3>
<p>I wasted the first few days being obsessed with 100% uptime. I wanted to build a secondary failover server just in case Firebase went down. I realized I was solving an imaginary problem. Firebase has 99.99% uptime, while the probability of my users having poor campus Wi-Fi is high. The real risk wasn't Google servers failing. It was the connection dropping between the classroom and the cloud. I abandoned the backup server entirely and embraced an <strong>Offline-First Architecture</strong> using Hive. By treating the user's device as the primary data source, the app works perfectly regardless of server status, I learned that I shouldn't build complex distributed systems when a local database solves the actual problem.</p>
<h3 id="heading-2-the-medical-cloud-storage-nightmare">2. The Medical Cloud Storage Nightmare</h3>
<p>I planned to add a feature allowing students to upload photos of their medical certificates to the cloud so they would never lose them. But as I designed it, two major problems appeared: the extreme cost of storing images for thousands of users on the Firebase Free Tier, and the liability of holding <strong>Personally Identifiable Information (PII)</strong>. If I held medical records, I was responsible for protecting them from data breaches. As a student developer, I didn't want the risk of a data breach hanging over my head. To solve this, I built the <strong>"The Local Wallet."</strong> within the app itself. Instead of uploading files, the app simply saves the images in the device's local sandbox and stores a link to the file path. The data stays 100% on the user's phone, resulting in zero cloud costs and zero privacy liability. I learned that the most secure data is the data you never collect.</p>
<h3 id="heading-3-the-automated-email-fantasy">3. The "Automated Email" Fantasy</h3>
<p>I wanted to build a productivity hack where the app would automatically send official emails from the student's university account using SMTP or OAuth. It sounded like a great productivity hack until I looked at the technical reality. University firewalls and Multi-Factor Authentication (MFA) makes this feature hard to implement. Making it work I had two bad choices.</p>
<ol>
<li><p><strong>Requesting Credentials from the User:</strong> Asking users for their university passwords which leads to a a massive security violation that looks exactly like phishing. or</p>
</li>
<li><p><strong>Enterprise Verification:</strong> I would have to navigate the university's bureaucracy to get official OAuth approval. I avoided this method in order to reduce the complexity of the app. I killed this automation entirely and stuck with the traditional email flow. The app automatically opens the default email app, then the user can send the drafted email with the medical report. I learned two major lessons here. First one is "Trust is harder to build than a feature." And as developers we shouldn't compromise security for a "cool" automation.</p>
</li>
</ol>
<h3 id="heading-4-all-university-supported-grading-system">4. All University Supported Grading System</h3>
<p>I had a plan to create a database containing the grading scales for all major universities all around the world to automate the GPA calculation process. But I quickly realized that this needs constant maintainability, which I don't have time to do as a undergraduate. It would require weeks of manual data entry and maintenance, and if a university changed their grading policy, my app would be instantly outdated. It simply wasn't worth the effort for my app. Instead, I built a feature that allows the user to configure their <strong>own grading scale</strong>. This taught me that when shipping, flexibility is often better than hard-coded perfection.</p>
<h3 id="heading-5-sync-custom-profile-picture-across-devices">5. Sync Custom Profile Picture Across Devices</h3>
<p>I wanted users to be able to pick a photo from their gallery and have that custom profile picture sync across all their devices via Firebase. This led me to the "Cost" problem again. I would need a paid Firebase plan to store these custom images, or I would have to bloat the database by storing base64 strings, which requires unnecessary processing power and time. I compromised by removing the ability to upload custom photos and instead provided a set of high-quality, pre-defined 3D avatars. I only sync the <strong>Avatar ID</strong> (a simple integer) across devices, keeping the data transfer minimal. This was a valuable lesson in distinguishing between what is <em>needed</em> (identifying users) versus what is <em>wanted</em> (full customizability).</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>It is easy to add features. It is hard to remove them. By killing these features, I didn't just save time; I built a product that is faster, cheaper to run, and more secure. I learned that my job isn't to build the most complex version of an idea, but to ship the version that actually works. <strong>The 80%</strong> proved to me that sometimes, the best code is the code you delete.</p>
<h3 id="heading-explore-the-project">🔗 Explore the Project</h3>
<ul>
<li><p><strong>📂 GitHub Repository:</strong> <a target="_blank" href="https://github.com/inusha-thathsara/attendance-tracker-demo/tree/main">View the demo code and releases</a></p>
</li>
<li><p><strong>📝 Project Documentation:</strong> <a target="_blank" href="https://hill-grenadilla-8a4.notion.site/The-80-Attendance-Strategy-for-Undergrads-2d4d8852a123808c900cd5c78f7de104?pvs=74">Read the Notion Docs</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[How I Built a Flutter + Gemini AI App to "Hack" My University Attendance (Open Source)]]></title><description><![CDATA[A Flutter app utilizing Gemini AI to optimize university attendance. Open source solution tackles complex attendance tracking challenges for students]]></description><link>https://inusha-gunasekara.hashnode.dev/how-i-built-a-flutter-gemini-ai-app-to-hack-my-university-attendance-open-source</link><guid isPermaLink="true">https://inusha-gunasekara.hashnode.dev/how-i-built-a-flutter-gemini-ai-app-to-hack-my-university-attendance-open-source</guid><category><![CDATA[Flutter]]></category><category><![CDATA[Firebase]]></category><category><![CDATA[gemini]]></category><category><![CDATA[APIs]]></category><category><![CDATA[Open Source]]></category><category><![CDATA[education]]></category><category><![CDATA[Dart]]></category><category><![CDATA[university]]></category><dc:creator><![CDATA[Inusha Thathsara]]></dc:creator><pubDate>Sat, 03 Jan 2026 17:56:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1767462823655/4411e236-8607-4e51-b19d-aae23023e68f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-the-problem-the-80-anxiety">The Problem: The "80% Anxiety"</h2>
<p>If you are an engineering student (like me at the University of Moratuwa), you know the terror of the <strong>80% Rule</strong>.</p>
<p>It’s simple math: Attend 80% of classes or get banned from the exam.</p>
<p>But in reality, it’s a nightmare.</p>
<ul>
<li><p>"If I skip today's lecture, does my percentage drop to 79.9%?"</p>
</li>
<li><p>"Did the lecturer count that medical leave?"</p>
</li>
<li><p>"Can I afford to sleep in tomorrow?"</p>
</li>
</ul>
<p>I found myself doing complex algebra at 2 AM just to decide if I could skip a morning lecture. I needed a tool that didn't just "track" habits, but actually <strong>strategized</strong> for me.</p>
<p>So, I built <a target="_blank" href="https://github.com/inusha-thathsara/attendance-tracker-demo/tree/main"><strong>The 80 Percent</strong></a>.</p>
<p>Here is how I engineered the fullstack software using <strong>Flutter</strong>, <strong>Google Gemini AI</strong>, and a heavily optimized <strong>Firebase</strong> backend, all while staying on the Free Tier.</p>
<hr />
<h2 id="heading-1-the-strategy-engine-safe-to-skip-logic">1. The Strategy Engine: "Safe to Skip" Logic</h2>
<p>Most habit trackers just say <em>"You are at 75%."</em> That’s useless information. I needed actionable advice.</p>
<p>I wrote a custom algorithm that looks at the <strong>future</strong> remaining sessions of the semester to calculate a "Safety Margin."</p>
<h3 id="heading-the-buffer-formula">The "Buffer" Formula</h3>
<p>If you are above your target, how many classes can you miss before you hit the danger zone?</p>
<p>I implemented this formula in Dart:</p>
<p>Dart</p>
<pre><code class="lang-plaintext">// The Magic Formula
int calculateSafeSkips(int present, int total, double target) {
  // Formula: Floor( (Present / Target) - Total )
  int skips = ((present / target) - total).floor();
  return skips &lt; 0 ? 0 : skips;
}
</code></pre>
<ul>
<li><p><strong>Scenario:</strong> You attended 18/20 classes. Target is 80%.</p>
</li>
<li><p><strong>Result:</strong> You can safely skip <strong>2</strong> more classes.</p>
</li>
<li><p><strong>Why it matters:</strong> It stops students from panic-attending classes they don't need to, preventing burnout.</p>
</li>
</ul>
<h3 id="heading-the-recovery-formula">The "Recovery" Formula</h3>
<p>If you are <em>failing</em>, how many classes must you attend in a row to survive?</p>
<p>Dart</p>
<pre><code class="lang-plaintext">// The Recovery Formula
int calculateRecovery(int present, int total, double target) {
   // Formula: Ceil( (Target * Total - Present) / (1 - Target) )
   return ((target * total - present) / (1 - target)).ceil();
}
</code></pre>
<p>This was critical because a student at 70% needs to know <em>exactly</em> when they will be safe again.</p>
<hr />
<h3 id="heading-2-the-ai-challenge-parsing-timetables-with-gemini-25">2. The AI Challenge: Parsing Timetables with Gemini 2.5</h3>
<p>The biggest friction in any student app is <strong>Setup</strong>. Nobody wants to manually type in 15 modules and timeslots.</p>
<p>I wanted a feature where a user could upload their official PDF/image timetable, and the app would set itself up instantly.</p>
<h3 id="heading-why-gemini-25-flash">Why Gemini 2.5 Flash?</h3>
<p>I chose Google's <strong>Gemini 2.5 Flash</strong> because:</p>
<ol>
<li><p><strong>Speed &amp; Cost:</strong> It is the current standard for high-speed, low-cost inference, perfect for a free student app.</p>
</li>
<li><p><strong>Multimodal Intelligence:</strong> It accepts PDF/Image inputs directly.</p>
</li>
<li><p><strong>Zero-Shot Capability:</strong> Unlike older models that needed endless examples, 2.5 Flash is smart enough to extract complex grid data with just a single, well-structured system instruction.</p>
</li>
</ol>
<h3 id="heading-the-implementation">The Implementation</h3>
<p>Instead of wasting tokens on "few-shot" examples, I used a <strong>System Instruction</strong> approach. I defined the exact JSON schema in the prompt and let the model do the heavy lifting.</p>
<p>Dart</p>
<pre><code class="lang-plaintext">// Actual Code from the App
final model = GenerativeModel(
  model: 'gemini-2.5-flash', 
  apiKey: apiKey
);

final prompt = """
You are an intelligent assistant that extracts university timetable data.
**GOAL**: Extract timetable metadata, modules, and classes into structured JSON.
**SCHEMA**:
{
  "modules": [{"code":String, "name":String...}],
  "classes": [{"day":String, "time":String, "location":String...}]
}
""";

final response = await model.generateContent([
  Content.text(prompt),
  Content.data('image/png', timetableImageBytes)
]);
</code></pre>
<p>The app parses the JSON response and batch-writes the classes to the local database. This "Zero-Shot" approach keeps the request payload small and fast.</p>
<hr />
<h2 id="heading-3-the-architecture-surviving-the-firebase-free-tier">3. The Architecture: Surviving the Firebase Free Tier</h2>
<p>As a student, I have $0 budget.</p>
<p>Firebase is great, but the Firestore limits (50,000 reads/day) are a trap. If I have 500 users and they open the app 10 times a day, fetching 10 records each... that’s 50,000 reads. Quota exceeded on Day 1.</p>
<h3 id="heading-my-offline-first-solution">My "Offline-First" Solution</h3>
<p>I designed the app to be <strong>Offline-First</strong> using a Repository Pattern.</p>
<ol>
<li><p><strong>Local Caching:</strong> When a user opens the app, it loads data from the local cache <em>instantly</em>.</p>
</li>
<li><p><strong>Lazy Syncing:</strong> It only writes to Firestore when the user explicitly changes something (Marking Attendance).</p>
</li>
<li><p><strong>No Images in DB:</strong> I initially wanted to sync profile pictures, but storing images requires the "Blaze" (Paid) plan or Base64 hacks that bloat document size. I cut this feature to ensure the app stays 100% free and fast.</p>
</li>
</ol>
<p>This architecture means I can scale to thousands of users without paying a cent.</p>
<hr />
<h2 id="heading-4-the-result-a-production-ready-beta">4. The Result: A Production-Ready Beta</h2>
<p>"The 80%" isn't just a calculator; it's a full-stack academic tool.</p>
<ul>
<li><p><strong>Tech Stack:</strong> Flutter, Firebase Auth/Firestore, Provider, Gemini API.</p>
</li>
<li><p><strong>Status:</strong> Open Source &amp; Beta Live.</p>
</li>
</ul>
<p>Building this taught me that <strong>Engineering is about tradeoffs.</strong> I had to trade fancy features (cloud images) for stability (free tier limits), and I had to trade simple logic for complex math to make the app actually useful.</p>
<h3 id="heading-try-it-out">Try it out</h3>
<p>I’m looking for feedback from fellow developers and students.</p>
<p>Check out the ecosystem:</p>
<p>👉 <a target="_blank" href="https://hill-grenadilla-8a4.notion.site/The-80-Attendance-Strategy-for-Undergrads-2d4d8852a123808c900cd5c78f7de104?pvs=74">Notion Documentation</a></p>
<p>👉 <a target="_blank" href="https://github.com/inusha-thathsara/attendance-tracker-demo/tree/main">Demo code and APK file</a></p>
<p><em>(Star the repo if you think the project is cool! ⭐)</em></p>
]]></content:encoded></item></channel></rss>