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
- 🌐 Live app: https://mayank.store (also always available at https://lastminute-ai-ummt2blwla-el.a.run.app)
▶️ Try instantly: click "Try live demo — no login" on the landing page (full product, sample data, zero setup).- 📄 Project description (Google Doc): https://docs.google.com/document/d/1z5qL-mFQ1diOUQeXJiTSeqDYk5I7xBLT/edit?usp=sharing
| Landing | Dashboard — agentic Gemini chat |
|---|---|
![]() |
![]() |
| Smart Game Plan — ranked action queue | 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)
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.
| 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 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.eventsscope (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-Secretheader. - 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.
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 |
|---|---|
![]() |
![]() |
- 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)
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 8000cd frontend
npm install
npm run dev # http://localhost:5173 (proxies /api to :8000)cd backend && python -m pytest tests/ -qAll 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 |
- Google Cloud Console → APIs & Services → Credentials → OAuth 2.0 Client ID (Web)
- Authorized origin:
http://localhost:5173 - Redirect URI:
http://localhost:8000/api/auth/callback/google
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.
- docs/TECH_GUIDE.md — architecture & deployment reference
- docs/LEARNING_GUIDE.md — how everything works, explained
- docs/SUBMISSION.md — project description with UML diagrams
- LastMinute_AI_Finale_v2.pdf — final presentation deck
MIT © 2026 Mayank Gupta






