Inspiration

We can't lock in. When we say we lock in, we really mean open Youtube, Instagram, and Discord. Friends keep us accountable by making sure we're working together, so we mimic that. What if you don't have friends? That's where AI comes in. In P2P2+AI, the AI keeps you accountable. We took strong inspiration from Strava for its social flexing, and ScreenZen for its simple method of distraction blocking.

What it does

Upon starting a study session, an AI repeatedly checks your screen to make sure you're in full focus. If you're distracted, a fullscreen blocker stops you and puts you back on track. After the session ends, an aesthetic card is generated with various visualizations of your study session's characteristics. This is great for showing off on social media. The cards are stored on a personal and public log on the app for you to look at your past sessions (this could also become a social media platform to share cards with friends in the future!)

How we built it

Desktop App (Tauri v2)

The app is built as a native desktop application using Tauri v2, which wraps a Next.js 16 + React 19 + TypeScript frontend in a lightweight Rust shell (src-tauri/). System-level capabilities, including screen capture, are handled via the tauri-plugin-screenshots-api.

Frontend (Next.js + Tailwind)

The UI uses the App Router architecture and is styled with Tailwind CSS v4. It is organized into modular components including navigation, sidebars, a live feed, and session summary views. The interface is designed as a real-time dashboard for monitoring focus sessions.

AI Pipeline (LangChain + Groq)

Screenshots are periodically captured and sent to a backend route (/api/gemini) that uses LangChain + Groq (Llama 4 Scout 17B). The model analyzes screen activity in context of the user’s stated goal and classifies behavior as productive, supportive, neutral, or distracted. Outputs are validated using Zod for structured consistency.

Runtime Flow

Desktop app launches a Next.js WebView User starts a session with a defined task Screenshots are periodically captured via Tauri Images are sent to the AI classification API Results stream back into the UI in real time Sessions are visualized in a feed and summary dashboard Distraction triggers a focused “get back to work” screen

Challenges we ran into

Using Tauri to cross-platform our Next.js application to be a desktop app Classifying a stream of screenshots with Langchain to determine if you're distracted

Accomplishments that we're proud of

We're proud to have a fully functional AI application running efficiently to monitor and block all distractions. We're proud to have a functioning social platform to share and brag your high-productivity study sessions.

What we learned

Tech stack matters.

What's next for p2p2

We want to integrate work sessions with friends.

Built With

Share this project:

Updates

Submission history