Kinora

Built for Hack the Change 2026, Prompt 1: "How can we leverage technology to promote health, social connection, and well-being in our communities?"

Kinora focuses on the well-being of single parents in Calgary. It also covers social connection, through neighbourhood circles, parent hangouts and a community board, and health, by putting crisis help first.

Inspiration

Single parents are a big group that is often overlooked. According to Statistics Canada:

  • Alberta had an estimated 206,891 one-parent families on July 1, 2025 (Table 17-10-0061-01).
  • In the 2021 Census, 77.2% of one-parent families in Canada were led by women, and about 2.6 million children (25% of children in census families) lived in a one-parent family (StatsCAN Plus: The diversity of families in Canada).
  • Our stats page also shows about 52,170 one-parent families and 80,495 children in them in Calgary. We still need to confirm the exact table and year for these Calgary figures.

Finding childcare, money, food or housing help usually means searching many websites and checking eligibility one by one, often with very little time to spare. We wanted to make that one conversation instead.

What it does

The parent's journey:

  1. Describe your situation. The parent writes in their own words and can add a postal code, distance, category, child's age, cost, and whether to include parent hangouts.
  2. Personalized, ranked matches on a map. Results are ranked by category, distance, cost, child age and urgency. They appear as a list next to a Mapbox map.
  3. A step-by-step support plan. The plan has 3–6 steps, and each one has a reason and a concrete first step. It is written in the parent's language when they write in one of the supported languages. It always says "may be eligible", never "is eligible".
  4. Crisis help first. A crisis button is in the header on every page. If the text contains crisis words, a callout with 911 first, then the matching helplines, appears above everything else.
  5. Community and circles. Parents can ask questions and reply on a moderated community board. Neighbourhood circles show anonymous counts of parents by postal area and how many are open to meet, and the page also lists hangout posts and peer groups.
  6. Save the plan. Signed-in parents (Auth0) can save the plan they see, save resources, and keep a simple task checklist.

The plan page also has household tools: a budget calculator, an electricity usage estimator, a savings calculator and an energy-assistance section.

How we built it

Stack: Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS v4, Supabase Postgres + PostGIS with Drizzle ORM, Auth0, Google Gemini, Mapbox GL, and Vitest with PGlite for tests.

Personalization pipeline (POST /api/search):

  1. Crisis check: a keyword match that runs before any AI call.
  2. User context: onboarding answers, or saved preferences if the parent is signed in.
  3. Gemini intent: redacted text is turned into structured needs as Zod-validated JSON.
  4. PostGIS ranking: one SQL query, then scoring (category 0.4, distance 0.25, cost 0.2, age 0.15). If there are fewer than 3 results, it relaxes radius, then budget, then category, but never age.
  5. Grounded Gemini plan: built only from the retrieved records.

Guarantees, enforced in code:

  • Gemini only sees the top retrieved records (at most 10), without contact details or locations.
  • Plan steps that cite unknown resource IDs are dropped. Phone numbers, emails and URLs are stripped from Gemini's text, so contact details always come from the database.
  • Emails, phones, postal codes, addresses and self-introduced names are redacted before Gemini sees anything.
  • The parent's raw text is never stored, logged or put in a URL. It travels through sessionStorage and a POST.
  • Everything works without AI. If Gemini is off, slow, rate-limited or returns bad JSON, a keyword fallback and a template plan take over, within a time budget of about 10 seconds.
  • Neighbourhood circles have a privacy floor: areas with fewer than 5 parents show only "Fewer than 5 parents", and an age band is shown only when at least 3 parents share it.

We used Claude and Claude Code to help write, refactor and test code throughout the project.

Challenges we ran into

  • Two competing database schemas. Mid-hackathon, the personalization work and the team schema had different shapes. We moved seeding and retrieval onto the team schema.
  • A restructure that disconnected the pipeline. After the app was reorganized, /plan was no longer calling the personalization pipeline, so we had to wire it back in.
  • Gemini rate limits. We skip Gemini on very short input, keep its thinking minimal, and built keyword and template fallbacks so the page never breaks.
  • Keeping AI output grounded. We validate against an ID allow-list, strip contact info, and rewrite eligibility wording.
  • Privacy details. We kept the parent's text out of URLs, and we added count thresholds so small areas can't reveal individual parents.
  • Next.js 16 Suspense and prerendering. We had to move URL and data reads into Suspense boundaries and avoid Date.now() during prerender (the "outdated" check uses a fixed reference date).
  • Windows and OneDrive file locks. These caused trouble with installs and builds on some machines.

Accomplishments that we're proud of

  • 147 tests passing across 20 test files (Vitest). They cover crisis detection, PII sanitizing, intent extraction, plan grounding, ranking, circle privacy, request guards and the household calculators.
  • The full personalization pipeline is wired into the live /plan page, with fallbacks at every step.
  • Plans are written in the parent's language, with 14 language codes supported in the schema.
  • Crisis routing always runs first, uses static, human-written contacts, and is never generated by AI.
  • A moderation queue blocks community posts that contain emails, phone numbers or street addresses.

What we learned

  • Grounding matters more than prompting. The safest AI features are the ones where code decides what the model is allowed to say.
  • Designing a fallback for every AI step made the whole app sturdier, not just the AI parts.
  • Privacy is many small decisions, like what goes in a URL, what gets logged, and how small a count can be before it identifies someone.

What's next for Kinora

Being honest about the data: all resource data in the demo is sample data. The organizations and families come from a seed script that generates fictional names in fictional neighbourhoods, and the CSV rows are marked PLACEHOLDER with example.invalid links. The real, sourced parts are the Statistics Canada figures and the crisis line names. The crisis phone numbers still need final team confirmation.

Next steps:

  • Replace the sample data with about 40–60 verified Calgary resources, each with an official source link, geocoded and dated.
  • Finish the verification workflow. Last-checked dates, "may be outdated" badges and the report-wrong-info form exist today. An admin screen to review those reports does not.
  • Expand language support and translate the interface itself, not just the plan.
  • Add events and recurring parent meetups to the circles.
  • Possibly add official Google Places ratings, with proper attribution.

Built With

Share this project:

Updates

Submission history