Gemini 3 Integration Architecture

Awerlain is an execution-first productivity system powered directly by the Gemini API, with Gemini 3 models serving as the core intelligence layer across planning, atomic breakdown, coaching, behavioral analysis, and multimodal capture. The primary runtime engine uses gemini-3-flash-preview for fast, cost-efficient, real-time reasoning. The system runs on real-time interactive loop calls, where Gemini is repeatedly invoked during capture, parsing, breakdown, execution mode, and reflection phases to provide continuous execution guidance instead of one-time answers.

The application uses Structured Outputs (JSON Mode) with responseMimeType: "application/json" to enforce deterministic schema control, producing machine-readable, database-safe task structures and atomic steps without fragile post-processing. Gemini 3’s native reasoning and dynamic thinking level capability are used for dependency-aware planning and zero-shot task decomposition. Prompt design follows Gemini 3 prompting best practices using dense context blocks, role-based system instructions, and controlled verbosity. Gemini also powers behavioral pattern detection and weekly execution reflection from user activity logs.

For advanced planning and conversational coaching, Awerlain uses Gemini 3 Pro through the Gemini chatbot and Antigravity, with adaptive high/low thinking levels and automatic fallback to Gemini 3 Flash under token constraints. The system implements multimodal input normalization for screenshots and voice notes, enabling image and audio task extraction. Visual feedback assets are generated using Gemini 3 media_resolution (“Nano Banana”) for energy-state emoji UI indicators.

Inspiration

The modern productivity landscape is broken. We have more tools than ever—Notion, Trello, Todoist, Calendars—yet we feel more overwhelmed than productive. This is the "Productivity Paradox".

My inspiration came from realizing that the core problem isn't capturing tasks, but the Cognitive Overload of deciding what to do next and the friction of starting. We suffer from "Analysis Paralysis" where we spend more time organizing work than actually doing it. People don't need another list; they need a Decision Engine.

I wanted to build a system that acts like a compassionate but firm executive assistant: one that understands your energy levels, cuts through the noise, and tells you exactly what to focus on right now. A tool that bridges the gap between Intention and Action.

What it does

Awerlain is an AI-powered "Adaptive Productivity System" designed to reduce friction and force execution.

  • Smart Focus Engine: Instead of a static to-do list, Awerlain uses an algorithm to rank tasks based on deadlines, effort, strategic value, and most importantly, your current Energy Level.
  • Atomic Breakdown (AI): Overwhelmed by "Write Thesis"? The system uses Google Gemini 3 to break down massive, scary tasks into small, actionable "Atomic Steps" (e.g., "Open document", "Write title") that take <5 minutes, removing the fear of starting.
  • Momentum Mode: A distraction-free, "Zen-like" interface that focuses you on one single task at a time. It features a "2-Minute Starter" to overcome inertia.
  • Energy-Based Planning: The system adapts to you. Feeling low energy? It suggests shallow work. High energy? It pushes deep work. It aligns tasks with your biological rhythm.
  • Persona Modes: Whether you're a Student, Developer, or Freelancer, Awerlain adjusts its prioritization logic to fit your specific workflow needs (e.g., developers need long blocks of deep work; students need deadline management).

How I built it

I built Awerlain with a focus on speed, interactivity, and a premium "Calm" aesthetic.

  • Core Framework: Next.js 16 (App Router) for a robust, server-side rendered application with React 19.
  • AI Intelligence: Google Gemini 3 API powers the "Brain" of the application. It handles:
    • Semantic understanding of tasks.
    • Intelligent breakdown of complex projects into subtasks.
    • Context-aware coaching and encouragement.
  • Styling: Tailwind CSS v4 for a utility-first, performant design system, coupled with shadcn/ui for accessible, high-quality components. I aimed for a "Steve Jobs-esque" minimalist design.
  • Database: PostgreSQL with Prisma ORM offers type-safe database access and robust data modeling for users, tasks, and energy logs.
  • State Management: Zustand for lightweight, efficient client-side state management, critical for the timer and momentum tracking.
  • Animations: framer-motion / tw-animate-css for buttery smooth transitions that make the app feel "alive".

Challenges I ran into

  • Balancing AI with User Control: I initially struggled with how much the AI should "take over." If it's too automated, users feel loss of agency. If it's too manual, it's just another list. Finding the "Co-pilot" sweet spot—where AI suggests but the user decides—was a key UX challenge.
  • Prompt Engineering for Structure: Getting consistent, structured JSON responses from LLMs for task breakdowns can be tricky. I had to refine my prompts significantly to ensure the "Atomic Steps" were truly actionable and not just vague advice.
  • State Hydration: managing the persistent timer state across page navigations and server/client boundaries in Next.js 16 required careful architectural decisions to prevent the timer from resetting or losing sync.
  • Designing for "Calm": It is paradoxically difficult to design a "simple" interface. Removing clutter while keeping functionality accessible required many iterations of design reduction.

Accomplishments that I'm proud of

  • The "Atomic Breakdown" Feature: Watching a vague, intimidating task like "Build a House" get instantly turned into a checklist of manageable 10-minute tasks by Gemini is magical. It truly solves the "Where do I start?" problem.
  • The "Momentum" Experience: I am proud of the visual feedback loops—the fire icons, the progress rings, the streaks. It gamifies productivity in a healthy, non-intrusive way.
  • The Adaptive Scoring Algorithm: I moved beyond simple "High/Medium/Low" priority. My engine considers Energy Fit—a novel concept that prevents burnout by not suggesting hard tasks when you're tired.
  • A "Premium" Feel: I achieved a design standard that feels professional and distinct from the sea of generic productivity tools.

What I learned

  • Execution > Planning: The most valuable feature isn't the one that helps you plan perfect weeks, but the one that gets you to work for just 2 minutes right now.
  • Context is King: A task's priority is relative. "Check Email" is high priority when tired, but a distraction when energetic. Context-aware apps are the future.
  • AI as a Compass, Not a Captain: AI is best used to reduce decision fatigue (giving options/structure) rather than doing the actual work. It empowers the user to be the pilot.

What's next for Awerlain - Execution First Productivity System

  • Mobile App (React Native): Productivity happens everywhere. A companion app for quick capture and "on-the-go" momentum tracking is my next major milestone.
  • Deeper Integrations: Connecting directly to Google Calendar, Slack, and GitHub to auto-import tasks and block time ("Reality-Based Planning").
  • Advanced "Quantified Self" Insights: Using Gemini to analyze weeks of data to tell you: "You are most productive on Tuesdays at 10 AM" or "You underestimate task duration by 40%."
  • Voice Command Center: Implementing a "Jarvis-like" voice interface for hands-free task capture and daily briefings.

Built With

  • antigravity
  • gemini-3
  • google-studio
  • neon
  • next-js
  • postgresql
  • prisma
  • vercel
Share this project:

Updates