<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: KaJota-inc</title>
    <description>The latest articles on DEV Community by KaJota-inc (@kajotainc).</description>
    <link>https://dev.to/kajotainc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4008809%2Fb130d1ec-d375-4be7-ac01-b91718d042e0.png</url>
      <title>DEV Community: KaJota-inc</title>
      <link>https://dev.to/kajotainc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kajotainc"/>
    <language>en</language>
    <item>
      <title>Building a passwordless, Gemini-advised dashboard on the "zero stack"</title>
      <dc:creator>KaJota-inc</dc:creator>
      <pubDate>Mon, 29 Jun 2026 23:19:04 +0000</pubDate>
      <link>https://dev.to/kajotainc/building-a-passwordless-gemini-advised-dashboard-on-the-zero-stack-3di2</link>
      <guid>https://dev.to/kajotainc/building-a-passwordless-gemini-advised-dashboard-on-the-zero-stack-3di2</guid>
      <description>&lt;p&gt;&lt;em&gt;I built Kajota Pulse and wrote this article as my entry for the **AWS × Vercel "H0: Hack the Zero Stack"&lt;/em&gt;* hackathon (&lt;strong&gt;#H0Hackathon&lt;/strong&gt;). Live app: &lt;a href="https://kajota-pulse.vercel.app" rel="noopener noreferrer"&gt;kajota-pulse.vercel.app&lt;/a&gt; · Code: &lt;a href="https://github.com/KaJota-inc/kajota-pulse" rel="noopener noreferrer"&gt;github.com/KaJota-inc/kajota-pulse&lt;/a&gt;*&lt;/p&gt;




&lt;h2&gt;
  
  
  The problem nobody builds for
&lt;/h2&gt;

&lt;p&gt;Across African micro-commerce, "co-sellers" buy stock from wholesalers and resell to their network for a markup. There's a whole industry of tools for &lt;em&gt;writing the listing&lt;/em&gt;. There's almost nothing for the question that actually decides whether a co-seller makes money: &lt;strong&gt;what should I stock this week?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So we built &lt;strong&gt;Kajota Pulse&lt;/strong&gt; — a Bloomberg-terminal-style dashboard that watches the marketplace and, in one click, tells a seller what to buy and why. It's the "monitor" pillar of a three-app stack: &lt;strong&gt;Coach&lt;/strong&gt; drafts the listing, &lt;strong&gt;Pulse&lt;/strong&gt; says what to stock, &lt;strong&gt;Mesh&lt;/strong&gt; settles the deal on-chain.&lt;/p&gt;

&lt;p&gt;The hackathon constraint was the fun part: build it on the &lt;strong&gt;zero stack&lt;/strong&gt; — Vercel for compute, an AWS database for state, no servers to manage. Here's what that actually took.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture in one breath
&lt;/h2&gt;

&lt;p&gt;Next.js 16 (App Router) on Vercel → &lt;strong&gt;AWS Aurora Serverless v2 (PostgreSQL)&lt;/strong&gt; for every number on the dashboard → &lt;strong&gt;Gemini 2.5 Flash&lt;/strong&gt; for the advice → &lt;strong&gt;MongoDB Atlas Database Triggers&lt;/strong&gt; streaming the real Kajota catalogue in. Five Postgres tables, two SQL views, two Gemini endpoints, one ingest endpoint. No VPC, no connection pooler, no server.&lt;/p&gt;

&lt;p&gt;The interesting engineering wasn't the UI. It was three things that don't show up in tutorials.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gotcha 1 — Serverless + Aurora forces &lt;em&gt;passwordless&lt;/em&gt; auth (and that's a feature)
&lt;/h2&gt;

&lt;p&gt;We provisioned Aurora Serverless v2 with the new internet-access-gateway networking model so Vercel could reach it without VPC plumbing. Then every password connection failed with &lt;code&gt;PAM authentication failed&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The new model &lt;strong&gt;mandates IAM database authentication&lt;/strong&gt; — and as a bonus, it doesn't support the RDS Data API either. So instead of a stored password, every connection mints a short-lived (15-minute) IAM auth token:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;signer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Signer&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;region&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;credentials&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;pool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Pool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="nx"&gt;host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;database&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;signer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAuthToken&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="c1"&gt;// fresh token at each handshake&lt;/span&gt;
  &lt;span class="na"&gt;ssl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;rejectUnauthorized&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;pg&lt;/code&gt; supports an async &lt;code&gt;password&lt;/code&gt; callback, so this is clean. And the security property is genuinely nice: &lt;strong&gt;there is no long-lived database password anywhere&lt;/strong&gt; — not in Vercel, not in the repo, not in a secret manager.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gotcha 2 — Vercel's Lambda shadows your AWS credentials
&lt;/h2&gt;

&lt;p&gt;This one cost an hour. The IAM signer needs AWS credentials to sign the token. We set &lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt; / &lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt; in Vercel… and it still failed.&lt;/p&gt;

&lt;p&gt;Vercel functions run on Lambda, and &lt;strong&gt;the Lambda runtime injects its &lt;em&gt;own&lt;/em&gt; execution-role &lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt; / &lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt;&lt;/strong&gt;, which shadow yours. The signer was minting tokens with the wrong (no-&lt;code&gt;rds-db:connect&lt;/code&gt;) identity.&lt;/p&gt;

&lt;p&gt;The fix: use custom env names and pass them explicitly to the signer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;signerCredentials&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;accessKeyId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PULSE_AWS_ACCESS_KEY_ID&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;secretAccessKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PULSE_AWS_SECRET_ACCESS_KEY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;accessKeyId&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;secretAccessKey&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;accessKeyId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;secretAccessKey&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A dedicated IAM user with &lt;em&gt;only&lt;/em&gt; &lt;code&gt;rds-db:connect&lt;/code&gt; on the cluster's dbuser resource, surfaced under &lt;code&gt;PULSE_AWS_*&lt;/code&gt;, and the shadowing problem disappears.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gotcha 3 — Real change-streams are messier than seed data
&lt;/h2&gt;

&lt;p&gt;The dashboard is only as good as its data, so we wired &lt;strong&gt;three MongoDB Atlas Database Triggers&lt;/strong&gt; on the real Kajota collections (&lt;code&gt;products&lt;/code&gt;, &lt;code&gt;cosell_products&lt;/code&gt;, &lt;code&gt;orders&lt;/code&gt;). Each trigger POSTs its change event to &lt;code&gt;/api/ingest&lt;/code&gt;, which upserts into Aurora. Hooking this to &lt;em&gt;production&lt;/em&gt; data immediately surfaced three bugs that a seed file would never reveal:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Extended JSON.&lt;/strong&gt; Atlas serializes change events as EJSON, so a Mongo &lt;code&gt;_id&lt;/code&gt; arrives as &lt;code&gt;{"$oid":"…"}&lt;/code&gt; and a price as &lt;code&gt;{"$numberInt":"9500"}&lt;/code&gt; — not as a string and a number. Without decoders you get &lt;code&gt;id="[object Object]"&lt;/code&gt; and &lt;code&gt;price=NaN&lt;/code&gt; in your database. Two small helpers (&lt;code&gt;ejsonId&lt;/code&gt;, &lt;code&gt;ejsonNum&lt;/code&gt;) fixed it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collection naming.&lt;/strong&gt; The real collection is &lt;code&gt;cosell_products&lt;/code&gt; (underscore), but our router matched &lt;code&gt;cosellproducts&lt;/code&gt;. Events silently fell through as "ignored." Now the router normalizes names.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Foreign keys vs. event ordering.&lt;/strong&gt; Change-stream events arrive &lt;em&gt;out of order&lt;/em&gt; — a co-sell listing can land before the product it references. Our FK constraints silently dropped those rows. The fix is counterintuitive but correct for event-streamed ingestion: &lt;strong&gt;drop the FKs&lt;/strong&gt; and treat each table as an independent projection.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these reproduce against fixtures. They only appear when real production writes hit your pipeline — which is exactly why we wired it to live data instead of demoing on a seed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The feature that makes it an advisor, not a dashboard
&lt;/h2&gt;

&lt;p&gt;A dashboard shows you numbers and makes you do the synthesis. We wanted Pulse to &lt;em&gt;answer the question&lt;/em&gt;. So &lt;code&gt;/api/recommend&lt;/code&gt; pulls the live signals — trending demand, category margins, competitor stock-outs, price position — and hands them to Gemini 2.5 Flash with a &lt;strong&gt;structured-output schema&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Organic Shea Butter&lt;/strong&gt; → &lt;em&gt;Stock 10–15 units before the weekend.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;"+27 favorites, sits in the high-margin Beauty category (18%), and a competitor just ran out of a similar cream."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Two details that matter for a demo that can't break:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structured JSON output&lt;/strong&gt; (&lt;code&gt;responseMimeType: "application/json"&lt;/code&gt; + a &lt;code&gt;responseSchema&lt;/code&gt;) means we render a clean ranked list, not parse prose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A deterministic fallback.&lt;/strong&gt; If Gemini is ever unavailable, a heuristic ranking (demand × margin × opportunity) runs instead, so the card is never empty in front of a judge — or a customer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What "zero stack" actually bought us
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No servers.&lt;/strong&gt; Vercel functions for the API, Aurora for state. Nothing to patch or scale.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scale to zero.&lt;/strong&gt; Aurora Serverless v2 idles to zero ACUs; the cold-start (~8s) is the only tax, and it's easy to pre-warm.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One-command verification.&lt;/strong&gt; &lt;code&gt;node scripts/verify-live.mjs&lt;/code&gt; checks the live landing page, the Aurora badge, both Gemini endpoints, the ingest auth gate, and a real IAM-authenticated row count — 5/5. Anyone can run it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;The new Aurora networking model &lt;em&gt;forces&lt;/em&gt; passwordless IAM auth. Lean into it — it's a better security posture than a stored password, and once you handle the Lambda credential-shadowing quirk, it's a few lines.&lt;/li&gt;
&lt;li&gt;If you want to know whether your data pipeline works, point it at &lt;em&gt;real&lt;/em&gt; data, not a seed. The three ingestion bugs we found were all invisible until production writes hit them.&lt;/li&gt;
&lt;li&gt;For an LLM feature in a live demo, use structured output and always ship a deterministic fallback. "Never empty" beats "usually impressive."&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Live:&lt;/strong&gt; &lt;a href="https://kajota-pulse.vercel.app" rel="noopener noreferrer"&gt;kajota-pulse.vercel.app&lt;/a&gt; · &lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/KaJota-inc/kajota-pulse" rel="noopener noreferrer"&gt;github.com/KaJota-inc/kajota-pulse&lt;/a&gt; · Built on Next.js 16 (Vercel) + Aurora Serverless v2 + Gemini 2.5 Flash.&lt;/p&gt;




&lt;h3&gt;
  
  
  Adapting this post
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dev.to / Hashnode / Medium:&lt;/strong&gt; publish as-is (add a cover image — the demo GIF works).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn:&lt;/strong&gt; lead with "The new Aurora model won't let you use a password — here's why that's a good thing," then the three gotchas, then the link.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;X/Bluesky thread:&lt;/strong&gt; one gotcha per post (passwordless IAM → Lambda shadowing → EJSON/FK), close with the live link + GIF.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>hackathon</category>
      <category>aws</category>
      <category>vercel</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
