Urgent.News

What's breaking now, across thousands of outlets.

AI

Tangkwa Journal: A Soft AI Diary I Built for My Friend in ENT Training

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend What I Built I built Tangkwa Journal for my friend Tangkwa . She’s in a demanding ENT specialist training program. Her days are long, her schedule is messy, and when she’s rushed or stressed she often reaches for something sweet — a cup of sweet matcha, a quick comfort drink — without really tracking how often it…

This is a story about a friend named Tangkwa who is undergoing rigorous ENT specialist training. She often experiences long days, disorganized schedule and, at times, feels stressed or overwhelmed. During such times, she finds herself gravitating towards sugary drinks like matcha, and she doesn't keep track of how frequently this happens. Tangkwa does not wish for another calorie-tracking system; she seeks a more intuitive, supportive companion.

That's why I decided to create Tangkwa Journal, a mobile-first Progressive Web App (PWA) designed to feel like a friend who can log meals and drinks, provide warm replies as a psychologist and even act as a diet mentor. The technology powering this app is Gemma2:2b via Ollama, a lightweight and open-weight model that runs on the server side, ensuring her notes and data remain private and under her control, not in a SaaS application.

Tangkwa Journal incorporates a per-person account system with a username and password, along with an httpOnly session cookie to ensure user privacy. It clearly communicates that the app is a supportive friend, not a clinician, with a dedicated disclaimer in-app. In case the user inputs crisis-like language, the system takes a fixed human-help path and skips model generation.

The development of this app took place in a short span of time during the Hacktoberfest Weekend Challenge. The project began with an open-weight companion loop, where I validated that Gemma could engage in meaningful dialogue. This was achieved through a small Hono API on port 8787, SQLite for storage, and a system prompt to ensure a friendly, supportive response. The app maintains a maximum of 100 words per response and avoids using shame language or providing inaccurate calorie information.

The user interface was designed to be simple and intuitive, allowing Tangkwa to log her meals and drinks with ease. The app features a login/register page, a "Today" screen, a diary entry entry, a log entry for meals and drinks, a history section, a detail page with an AI response, and an about page with a disclaimer. The app is built with Vite, React, and TypeScript, making it a Progressive Web App (PWA) that can work offline, ensuring a seamless user experience even if the model is unavailable.

The choice of using a smaller Gemma2:2b model was intentional. It offers a lightweight solution that can run on modest hardware and provides a quick, friendly response within 1-4 seconds. This approach aligns with Tangkwa's need for a supportive companion during her demanding ENT training schedule. By using open-weight models and self-hosting, I ensured that the app remains privacy-focused, allowing her to use it without concerns about a closed chatbot in the middle managing her data.

Tangkwa Journal is a testament to the power of open innovation, providing a supportive friend for someone who needs it most.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Google Tests AI Data Center In Space

Longtime Slashdot reader Geoffrey.landis shares a report from NPR: Google just put a refrigerator-sized satellite into space, part of a research project the company hopes can pave the way for orbiting…

  • Google tests AI data center in space with refrigerator-sized satellite
  • TPUs run Gemma AI model for 15 minutes, facing heat management challenges
  • Mission launched Oct 1, to run for a year with Planet's support

More from Saturday 3 October →