Inspiration

So, I am a student, and like every other student in the world, my biggest problem is distraction. I open my laptop to study but end up wasting time on some XYZ websites. This problem becomes even bigger when exams are near.

I tried some of the popular website-blocking extensions out there, but none of them would stay on my laptop for more than 2–3 days. Why? Because I used to set blocking rules in excitement, but those rules often backfired when I needed to do something important. Also, I would get bored when websites were blocked.

Meanwhile, I was already learning web development through online resources. So, as a hobby project, I started creating some small website-blocking Chrome extensions myself.

Recently, I heard about Google's #BuildHybridAI hackathon from my friends. I got fascinated when I learned that there is an AI model called Gemini Nano that can run locally on my computer, even without an internet connection. Plus, it's free because it runs on your own computer!

I thought, what if we combined the idea of a website blocker with local AI?

And that's how Focus Guardian – a smart, AI-powered focus companion that understands your browsing context was born.

What it does

You set your goal and start a focus session. Now, whenever you navigate to a website, Focus Guardian matches the page title, URL, etc., with your goal.

It then decides whether the website is related to your goal, neutral, or a distraction. Based on its judgment, the AI can trigger four commands:

  • 0: ALLOW – Websites related to your goal or neutral websites (login/2FA/SSO, docs, code, search, notes, development/payment, utilities).
  • 1: WAIT & WATCH – Websites with mixed or unclear intent (site homepages, search feeds, broad wikis).
  • 2: ASK – When the AI isn't sure.
  • 3: BLOCK – Websites that are clearly harmful to your goal.

If the AI isn't sure, or you feel that it has made the wrong decision, worry not! There's a supreme court: the Guardian AI Chat Window, where you can appeal.

You can explain to the AI in 1–3 lines why a website should be unblocked, and it will unblock it if it is satisfied with your reply.

Even if you're wrong, you can keep negotiating until your urge to get distracted dies.

How I built it

I used Google's Antigravity. Most of my work involved brainstorming features, understanding user requirements, and product designing, while Antigravity handled the coding part.

Challenges I ran into

  1. Reducing AI response time: Refining the system prompt to make the AI respond faster.
  2. Quota limit exceeded: Yes! I faced this challenge quite often because I am a perfectionist. I don't move on to the next part until I am satisfied with the UI changes or style tweaks.
  3. Distractions: Of course, another challenge was getting distracted because Focus Guardian was yet to be built!

Accomplishments that we're proud of

I am proud that I made this extension. Building something in itself feels like an accomplishment.

Now, I will use Focus Guardian myself to help me focus better. I believe many other people will benefit from it too.

What I learned

I learned about:

  • Chrome Prompt API
  • Google OAuth
  • Firebase AI Logic
  • Google Generative AI
  • Vertex AI
  • Turning LLM outputs into deterministic actions
  • Hands-on experience with Antigravity

What's next for Focus Guardian?

I am planning to improve Focus Guardian further and make it available on the Chrome Web Store so that more people can use it.

Built With

  • antigravity
  • chrome
  • chrome-prompt-api
  • chrome-side-panel-api
  • cloud-firestore
  • cloudflare-workers
  • dodo-payments
  • esbuild
  • express.js
  • firebase
  • firebase-ai-logic
  • firebase-app-check
  • firebase-auth
  • gemini-api
  • gemini-nano
  • google-oauth
  • indexeddb
  • javascript
  • manifest-v3
  • node.js
  • react
  • tailwind-css
  • typescript
  • vertex-ai
  • vite
Share this project:

Updates

Submission history