<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sin Ling Tsoi on Medium]]></title>
        <description><![CDATA[Stories by Sin Ling Tsoi on Medium]]></description>
        <link>https://medium.com/@kikitsoi?source=rss-c254b345571b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*BmggVU0sKb1KOQhp</url>
            <title>Stories by Sin Ling Tsoi on Medium</title>
            <link>https://medium.com/@kikitsoi?source=rss-c254b345571b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 16:32:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kikitsoi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[PawPulse: Real-Time Stray Animal Reporting and AI Rescue Matching]]></title>
            <link>https://medium.com/@kikitsoi/pawpulse-real-time-stray-animal-reporting-and-ai-rescue-matching-9b47f7250f5f?source=rss-c254b345571b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b47f7250f5f</guid>
            <category><![CDATA[top50stories]]></category>
            <category><![CDATA[google-cloud]]></category>
            <category><![CDATA[ai-builder-cup]]></category>
            <category><![CDATA[hack2skill]]></category>
            <dc:creator><![CDATA[Sin Ling Tsoi]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 21:48:44 GMT</pubDate>
            <atom:updated>2026-11-27T21:48:44.547Z</atom:updated>
            <content:encoded><![CDATA[<p>2026年11月28日 · Kiki <a href="https://medium.com/u/4f3f4ee0f977">Google Cloud</a> <a href="https://medium.com/u/db028834c033">Hack2skill</a></p><p>A stray animal is hurt on a Hong Kong street. Someone wants to help, but who should they call, and what should the rescuer bring? PawPulse is our answer: a web app that turns one photo report into an AI triage result and a recommended rescue team.</p><p>We are <strong>Ignis-HK</strong>, one of the Top 50 teams of the AI Builder Cup 2026: Tsoi Sin Ling Kiki (Leader), Tang Kai Hin Scott, Ho Shing Hin Jeffy and Chan Kung Fu Jeff. This is the story behind our build.</p><h3>The problem we chose</h3><p>Our track was <strong>Sustainability &amp; Social Impact</strong>, with a civic tech focus on crowdsourced emergency reporting and response coordination.</p><p>Hong Kong has seen growing public debate about stray animals. Unsupervised large dogs have caused fatal attacks on people and smaller animals. At the same time, animal NGOs struggle to operate on limited resources.</p><p>Today, rescue reporting runs on phone calls and social media posts. There is no shared triage and no structured matching. We wanted community resources to be used well and incidents to get an earlier response.</p><h3>Our solution: PawPulse</h3><p>PawPulse closes the loop from report to rescue in four steps:</p><ol><li><strong>Photo report.</strong> A citizen uploads up to 5 photos, adds the location and on-scene tags, passes a captcha and submits.</li><li><strong>AI triage.</strong> Gemini identifies the species and symptoms, grades urgency as P0 (critical), P1 (medical) or P2 (stable), and suggests first-aid steps and a rescue kit.</li><li><strong>Smart matching.</strong> A four-factor weighted ranking (distance, species, 24-hour dispatch and capacity) recommends the top 3 NGOs.</li><li><strong>Closed-loop tracking.</strong> An NGO accepts the case, and everyone can follow its progress.</li></ol><p>Around that core, we built an interactive rescue map, a live city-wide case board, citizen profiles and comments, an NGO workspace and an admin console. The interface works on desktop and mobile, in Traditional Chinese and English.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1TU_H7qa15djcWRI33TaDA.png" /><figcaption>Report Page with 5 simple steps</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*joWgr6XjYXntTrJ3mZGtdg.png" /><figcaption>Map that can check on all the cases and their locations</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LrJZyvi7AlSXdDacx4Aktg.png" /><figcaption>Reported Cases</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8zPwTrcSDYd2nlK-6NB-YQ.png" /><figcaption>NGOs information page</figcaption></figure><h3>Technology stack and Google Cloud tools</h3><p><strong>Google Cloud, Firebase and Google AI</strong></p><ul><li><strong>Gemini API</strong> (Gemini Flash, via the Google Gen AI SDK): multimodal triage and sensitive photo detection</li><li><strong>Cloud Run</strong>: hosts our containerised app with autoscaling</li><li><strong>Cloud Firestore</strong>: case data in a dedicated, non-default database, with Security Rules</li><li><strong>Cloud Storage</strong>: on-scene photos</li><li><strong>Secret Manager</strong>: API keys and the email password, injected at deployment</li><li><strong>Firebase Authentication</strong>: separate access for citizens, NGOs and admins</li><li><strong>Google Maps Platform</strong>: geocoding and address search</li></ul><p><strong>Application</strong></p><ul><li><strong>Frontend:</strong> React 19, TypeScript, Vite 6, Tailwind CSS 4, Leaflet</li><li><strong>Backend:</strong> Node.js 22, Express 4</li><li><strong>Languages and notifications:</strong> i18next (Traditional Chinese and English), SMTP email</li></ul><h3>Technical approach and implementation</h3><p>A mobile-first React app talks to an Express API running in a Node.js 22 container on Cloud Run. Firestore holds cases, Cloud Storage holds photos, and the server calls Gemini and Google Maps Platform.</p><h3>Multimodal triage with structured output</h3><p>The server reads a case’s photos from Cloud Storage and sends them to Gemini in a single request, so evidence from every angle counts. A response schema asks for JSON containing species, visible injuries, urgency level and reason, rescue equipment, first-aid advice, handling precautions and sensitive photo numbers.</p><p>We do not trust model output blindly. The server cleans text fields before saving them and accepts only P0, P1 or P2. The citizen’s description is marked as untrusted input, and the model is told never to follow instructions inside it. If analysis fails, the report still stands at the default P1 level.</p><h3>Explainable NGO matching</h3><p>Matching is a transparent weighted score rather than another model call. Closer NGOs score higher. Handling the reported species adds points. For P0 cases, emergency rescue capability matters. Busy or full organisations are ranked lower. The top 3 are recommended.</p><h3>One case, one rescuer</h3><p>When an NGO accepts a case, the server runs a Firestore transaction. If another team has already taken it, the second request is rejected. This prevents double-claiming, and the reporter is notified by email.</p><h3>Challenges and how we addressed them</h3><h3>1. Keeping spam reports and abuse in check</h3><p>An open reporting form invites automated abuse, and every AI call costs money. We added a four-character image captcha to the report form to stop basic bots. On the server, a sliding-window rate limiter caps requests per IP, including 15 AI analysis requests per minute. Each case can be analysed only once through that endpoint, and a configurable daily AI limit applies per server instance. Firestore Security Rules reject unexpected fields and oversized text.</p><p>A simple captcha is only a first barrier. Stronger bot protection, such as Firebase App Check or reCAPTCHA, is a natural next step.</p><h3>2. Showing graphic photos responsibly</h3><p>Rescuers need to see injuries, but the public should not meet a bloody photo without warning. In the same triage request, Gemini lists which photos are graphic or disturbing. The interface blurs flagged covers and asks viewers to confirm before revealing them.</p><p>We designed it to fail safe. If a photo has not been analysed, cannot be read, or the model gives no usable answer, we treat it as sensitive. The prompt also tells the model to include a photo when unsure.</p><h3>3. Protecting personal data</h3><p>A rescue case must be public, but the reporter’s name, phone number and email must not be. We store contact details in a separate private subcollection, apart from the public case document. Security Rules let only admins and the NGO that accepted the case read them.</p><p>Secrets such as the Gemini key, Maps key and email password live in Secret Manager, not in source code.</p><h3>Potential impact</h3><ul><li><strong>Citizens</strong> get a guided way to report, plus first-aid advice while they wait.</li><li><strong>Rescue teams</strong> see urgency and a suggested equipment list before they set out.</li><li><strong>Small NGOs</strong> can see cases on a shared live board.</li><li><strong>The community</strong> can direct limited resources to urgent cases and follow progress.</li></ul><h3>What’s next</h3><p>In the short term, we want to onboard more regional rescue organisations, add WhatsApp Business notifications, merge duplicate reports and check photo authenticity. Later, we plan native mobile apps, AI-assisted adoption matching and NGO feedback to calibrate triage accuracy. We also need clear data retention and deletion rules under Hong Kong’s Personal Data (Privacy) Ordinance.</p><h3>Try PawPulse</h3><ul><li><a href="https://pawpulse-302435171171.asia-northeast1.run.app/">https://pawpulse-302435171171.asia-northeast1.run.app/</a></li></ul><p><strong>Team Ignis-HK:</strong> Tsoi Sin Ling Kiki (Leader) · Tang Kai Hin Scott · Ho Shing Hin Jeffy · Chan Kung Fu Jeff<br><strong>#Top50Stories #Hack2skill #AIBuilderCup #GoogleCloud</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b47f7250f5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>