Inspiration

In 2020, a former Australian prime minister posted a photo of his boarding pass on Instagram. A hacker used the booking reference on it to log into his airline booking and found his passport number and phone number. The hacker's point stuck with me: if someone famous can do this without noticing, anyone can.

That's the thing about oversharing. It's rarely one big mistake. It's a building number in one photo, "6am run" in a caption, the same park every Tuesday. Each post looks harmless. Together they tell a stranger where you live and when you're out. Nobody checks for this before posting, because there's no quick way to. So I built one.

What it does

Prevue is where you write your post. Before anything goes live, it checks three layers, shows you how a stranger would connect the dots, and fixes the problems in one click.

  • In the photo: building numbers, street signs, home addresses on packages, boarding passes and their barcodes, bank cards, hotel room numbers, and faces of other people.
  • Hidden in the file: GPS coordinates and the exact time the photo was taken. Wolfram turns the coordinates into a real place ("that's Greenwich Village") and the sunrise time that day.
  • In your habits: the caption ("6am", "my building", "right now") compared with your past posts, to catch routines like "same park, around 6am, on Tuesdays."

You get a risk score from 0 to 100, a plain-English warning, and a step-by-step "how a stranger would find you" trail. When you hit Post on something risky, Prevue stops you and offers Fix & post: it blurs what matters, strips the hidden location data, and rewrites the caption so it keeps the vibe but drops the details. The demo post goes from 79 to 0.

There's also a Fast / Agent switch: Fast runs instantly with plain code, Agent uses an AI agent to plan the checks. A My footprint page (looking across all your recent posts for places you repeat and the hours you're usually out) is built into the backend, but it needs a connected Instagram account, so it isn't part of this demo yet.

How I built it

I built Prevue solo. The frontend is a React app made in Lovable. The backend is Python with FastAPI, written with help from Claude and Cursor, running on my laptop behind a Cloudflare tunnel.

The checks are mostly plain code, on purpose:

  • RapidOCR reads text in the photo, and rules sort it: building numbers, street names, addresses, passenger names, booking codes, card numbers, room numbers. App text like "Follow" and "Reply" is ignored.
  • OpenCV detects faces and barcodes/QR codes, and does the blurring.
  • Pillow reads and strips the hidden GPS and time data.
  • Rules catch risky captions and compare with past posts to find routines.

The agent is built with LangChain deepagents on Gemini. A planner writes a short plan, then hands the work to two sub-agents: a photo investigator (hidden data, text, faces, and Gemini's vision for landmarks and storefronts) and a routine analyst (caption and past posts). Each one calls the checks above as tools. Then the planner gets the score and writes the warning.

Wolfram Cloud MCP turns GPS coordinates into a neighborhood and the sunrise time for that day. Prevue only sends Wolfram the coordinates and date, never the photo.

The score never comes from the AI. It comes from fixed weights per risk type, so the same post always gets the same score and every point can be explained. AI finds the clues; rules score them.

Instagram: the backend uses the official Instagram API to read recent posts and publish the safe version (development mode, for an account I control). In the demo, Prevue runs in demo mode and downloads the safe photo instead.

Challenges I ran into

  • Too much noise. My first version flagged every bit of text in a screenshot. A lone "3" became a building number and a seat number became a license plate. I rewrote the rules to ignore app text, group numbers that belong to a boarding pass or card, and merge background text into one quiet finding.
  • Missing the real danger. When I tested the actual 2020 boarding pass photo, Prevue boxed random words but didn't understand it was a boarding pass, and it left the barcode readable. I added document detection (passenger names, booking codes, flight numbers, routes, dates) and barcode/QR detection.
  • Rules only know what you teach them. That's what pushed me to add the agent: plain code is reliable but can't notice something new, while the AI look can.
  • Instagram's API. Personal accounts lost API access in 2024, so I switched to the official API for Creator accounts in development mode, which works without app review for an account you control.
  • Agent timeouts. The agent sometimes hung on free-tier rate limits with silent retries. I added a 60-second limit, removed the hidden retries, and made it fall back to Fast mode with a note, so the app never gets stuck.
  • Wolfram's answers. The first lookups timed out, the replies came wrapped in Out[1]=, and sunrise times came back in the server's time zone instead of the photo's. I split the questions, ran them in parallel, cleaned the replies, and asked for local time.
  • Setup on Windows. An old Python version, a library that pulled in the wrong OpenCV version, and a Mac-only time format all broke things along the way.

Accomplishments that I'm proud of

  • It works end to end on a real backend: upload, check, Fix & post, score drops to 0.
  • It catches the kind of post that caused a real security incident: a boarding pass and its barcode.
  • Seven built-in demos, each showing a different risk (home, boarding pass, package label, posting live, hotel room, bank card, and a safe sunset), all answered instantly.
  • A real deepagent with a planner and two sub-agents, running on Gemini, that falls back gracefully instead of breaking.
  • The "how a stranger would find you" trail, which turns a list of findings into a story people actually feel.
  • I built all of it solo in one weekend.

What I learned

  • Let AI find, let rules decide. Using AI to spot clues and fixed rules to score them gave me flexible detection and a score that's consistent and explainable.
  • The danger is in the combination. A street sign alone is minor. A street sign plus "6am" plus three past posts from the same spot is a routine.
  • Test with real examples early. My rules looked fine on my own test images and fell apart on a real screenshot.
  • Always have a fallback. Every outside service (Gemini, Wolfram, Instagram) can be slow or down. Building Prevue to still work without them is what made the demo reliable.

What's next for Prevue

  • Connect Instagram for real: turn on live posting and My footprint with a connected account (the backend for both is already built).
  • Open it to everyone: go through Meta's app review so anyone can connect their own Instagram, then add more platforms.
  • Run on the phone: move the photo checks onto the device so photos never leave it.
  • Stories and video: check frames from short videos and stories, not just photos.
  • Profile clean-up: use My footprint to find old posts that give too much away, and fix or archive them.
  • Built into the post button: offer the check as a feature social apps can add right before "Share."

*Source for the 2020 case: 1News

Built With

Share this project:

Updates

Submission history