Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LastMinute AI — Your Deadline Co-Pilot

CI License: MIT Live AI: Google Gemini 2.0 Flash

An autonomous, AI-powered productivity agent that connects to your Google Calendar, finds what's on fire, and proactively builds and executes your plan — before it's too late.

Built for the BlockseBlock National Hackathon 2026 — PS1: The Last-Minute Life Saver


Screenshots

Landing Dashboard — agentic Gemini chat
Landing page Dashboard with AI agent
Smart Game Plan — ranked action queue Features
Game Plan Features

Features

  • Plan My Day — Google Gemini reads your calendar and auto-blocks focus time on your real Google Calendar (runs proactively, once per day, no click needed)
  • Agentic AI chat — Google Gemini with function calling (5 real tools: create events, prioritise tasks, find free slots, set reminders, fetch deadlines)
  • Brain Dump — paste a chaotic paragraph; Gemini extracts, dates, estimates, and prioritises every task
  • Gemini Vision (Scan) — upload a photo of a syllabus/timetable; deadlines become tasks
  • Smart Game Plan — a ranked, time-bucketed action queue (Eisenhower priority matrix) that tells you exactly what to do next
  • Goals & Habits — set a goal and Gemini breaks it into milestones; build daily habits with a GitHub-style streak calendar
  • Live Google Calendar sync with countdowns and urgency colours
  • Escalating alerts at 24h / 2h / 1h / 30 min before each deadline — browser push (Cloud Scheduler-driven) plus Google Calendar email reminders
  • Mission Control status bar that pulses red within 2 hours of a deadline
  • Focus Timer (Pomodoro / Deep Work / Sprint) with sessions saved to Firestore
  • Productivity score from completion rate, focus sessions, and calendar load
  • Settings & User Guide pages, guided tour, resizable + collapsible sidebar, dark / light mode, and Demo Mode (no login)

Architecture

Architecture — Google Cloud Run execution environment and external Google services

Your browser runs a React SPA served by a single FastAPI container on Google Cloud Run. That backend uses Gemini to think, the Calendar API to read/write your schedule, Firestore to remember everything, and Web Push for alerts. Google OAuth signs you in, Secret Manager guards keys, and Cloud Scheduler triggers autonomous actions. Full walkthrough in docs/TECH_GUIDE.md.


Tech Stack

Layer Technology
AI Engine Google Gemini 2.0 Flash (function calling + vision)
Calendar Google Calendar API v3 (least-privilege calendar.events scope)
Auth Google OAuth 2.0
Database Google Firebase Firestore
Scheduling Google Cloud Scheduler
Secrets Google Secret Manager
Backend Python 3.11 · FastAPI · Uvicorn
Frontend React 18 · Vite · Tailwind CSS · Framer Motion · TanStack Query
Deployment Google Cloud Run (containerised, asia-south1) · Cloudflare Worker (custom domain)
Notifications Web Push API + VAPID

Google Technologies Used

  • Google Gemini 2.0 Flash — the core AI engine: agentic chat (function calling), the autonomous daily planner, the brain-dump extractor, the goal-milestone generator, and the Vision document scanner.
  • Google Calendar API — two-way integration: reads events and creates events/focus blocks. Uses the least-privilege calendar.events scope (no access to other calendars, settings, or sharing).
  • Google Cloud Run — serverless container hosting the live production app.
  • Google Cloud Scheduler — drives autonomous behaviour (reminder checks and planning), authenticated with a fail-closed X-Cron-Secret header.
  • Firebase Firestore — persistent store for sessions, tasks, conversations, reminders, goals, habits, focus sessions.
  • Google Secret Manager — secure storage of the Firebase service-account key.
  • Google OAuth 2.0 — secure sign-in and scoped Calendar access; no passwords stored.

Running in Production

Live on Google Cloud Run (region asia-south1, scale-to-zero, revision-based deploys via Cloud Build), with the custom domain mayank.store served through a free Cloudflare Worker reverse proxy.

Cloud Run — request metrics (last week) Cloud Run — deployed source
Cloud Run observability metrics Cloud Run deployed source view

Local Setup

Prerequisites

  • Python 3.11+, Node.js 18+
  • Google Cloud project with Calendar API enabled
  • Firebase project with Firestore enabled
  • Gemini API key from Google AI Studio (https://aistudio.google.com/apikey)

Backend

cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env   # fill in the variables below
uvicorn main:app --reload --port 8000

Frontend

cd frontend
npm install
npm run dev   # http://localhost:5173 (proxies /api to :8000)

Tests

cd backend && python -m pytest tests/ -q

Environment Variables

All secrets live in backend/.env (never committed — see .gitignore); in production they are injected as Cloud Run env vars / Secret Manager secrets.

Variable Purpose
GEMINI_API_KEY Google Gemini — the AI engine
ANTHROPIC_API_KEY Optional fallback AI engine
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET Google OAuth 2.0 client
GOOGLE_REDIRECT_URI OAuth callback (dev default: http://localhost:8000/api/auth/callback/google)
FIREBASE_PROJECT_ID / FIREBASE_CLIENT_EMAIL / FIREBASE_PRIVATE_KEY Firestore service account
VAPID_PUBLIC_KEY / VAPID_PRIVATE_KEY / VAPID_CLAIMS_EMAIL Web Push notifications
CRON_SECRET Shared secret for Cloud Scheduler endpoints (fail-closed)
FRONTEND_URL Public app URL used for OAuth fallback

OAuth Setup

  1. Google Cloud Console → APIs & Services → Credentials → OAuth 2.0 Client ID (Web)
  2. Authorized origin: http://localhost:5173
  3. Redirect URI: http://localhost:8000/api/auth/callback/google

Deployment

One command: .\deploy.ps1 (builds the frontend, bundles it into the backend, and deploys via Cloud Build to Cloud Run asia-south1 — reads backend/.env, no secrets hardcoded). The custom domain (mayank.store) is served through a free Cloudflare Worker reverse proxy (infra/cloudflare-worker.js), since Cloud Run domain mapping isn't available in asia-south1. Full architecture and deployment walkthrough in docs/TECH_GUIDE.md.


Documentation


License

MIT © 2026 Mayank Gupta

About

Built for the BlockseBlock National Hackathon 2026 — PS1: The Last-Minute Life Saver

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages