Inspiration
Cancer is one of the most preventable diseases when caught early — yet millions of Canadians have no clear roadmap for what screenings they need, when to get them, or who to see first. Cancer Care Ontario publishes world-class clinical guidelines, but they're buried in dense PDFs that most people never find. We wanted to bridge that gap: take authoritative Canadian clinical data and make it instantly accessible to any person, in plain language, personalized to them.
What it does
Preventyx is an AI-powered cancer prevention platform built for Canadians. You log in, select one of 14 cancer types, and answer a short set of AI-generated risk assessment questions. The platform then searches Cancer Care Ontario's clinical pathway documents using vector search (RAG) and generates a fully personalized care plan — complete with a monthly screening calendar, step-by-step action items in the correct clinical order, prerequisite locking (so you can't skip a GP referral before booking a specialist), and an AI advisor for follow-up questions. A built-in Health Tracker lets you mark steps complete and log feedback after each appointment.
How we built it
We built Preventyx as a full-stack TypeScript monorepo using pnpm workspaces. The frontend is React + Vite with Tailwind CSS and Framer Motion. The backend is an Express API server. The database is PostgreSQL with Drizzle ORM.
The core intelligence runs in two AI calls per user session. First, we search a Pinecone vector index of Cancer Care Ontario documents and use GPT-5.2 to generate personalized Yes/No intake questions specific to the selected cancer type. Second, we run a second Pinecone search with the full risk context and use RAG to generate a structured JSON care plan — with correct CCO screening intervals, ordered steps, prerequisite event IDs, and clinical references baked in. Authentication is handled entirely through Replit Auth (OpenID Connect), so no passwords are collected.
Challenges we ran into
Getting the AI to respect real clinical screening intervals was the hardest part. LLMs default to generating plausible-sounding dates clustered close together. We had to encode every CCO interval directly into the system prompt alongside the retrieved documents — mammogram every 2 years, HPV test every 5 years, FIT kit every 2 years — and add explicit rules against scheduling events less than 4 weeks apart.
We also had to teach the model to distinguish between Ontario's four organized screening programs (breast, cervical, colorectal, lung) and the remaining ten cancer types that have no population screening program — those require a completely different plan structure starting with a GP referral.
A third challenge was the prerequisite logic: it had to work not just in the database but visually in the UI, with locked steps, clear warning messages, and a step counter — so users understand why something is unavailable, not just that it is.
Accomplishments that we're proud of
We're proud that every care plan Preventyx generates is traceable back to a real Cancer Care Ontario document — the clinical reference is shown on each step card. We're also proud of the prerequisite locking system: it's the first time we've seen a consumer health app enforce clinical ordering logic in a way that's also genuinely intuitive to use. And getting a full RAG pipeline — Pinecone search → GPT-5.2 generation → structured JSON → PostgreSQL → calendar UI — working end to end in a single seamless chat interaction felt like a real milestone.
What we learned
RAG quality depends on prompt discipline, not just retrieval quality. We learned that retrieved documents alone aren't enough — the model needs the actual rules spelled out in the system prompt to reliably follow them. We also learned that combining two auth systems (Replit Auth + a custom username/password flow) creates genuine user confusion, and the right call is always to pick one and commit. Simplicity in auth is a feature.
What's next for PreventYX
A permanent deployed URL with always-on availability Age-aware plan adjustments based on the user's profile Push notification reminders when a scheduled screening date is approaching Automatic ingestion of new Cancer Care Ontario guideline updates into the Pinecone index Expansion to other provincial guidelines (BC Cancer, Alberta Health Services)
Built With
- agenticai
- node.js
- openai
- pinecone
- postgresql
Log in or sign up for Devpost to join the conversation.