Skip to content

Projects

Doan Ngoc Gioi
← All projects

Sunup: AI schedule assistant

An installable web app where you plan your day by chatting: tell it "Dentist tomorrow at 3pm" and it books the task, catches double-bookings, reminds you 15 minutes before and sends a daily briefing. Built with Next.js, Gemini function calling and Google Cloud, in English and Vietnamese.

About the project

Sunup (first called Tasky AI) replaces task forms with a conversation. You type what you want to do; the assistant works out the task, date and time, checks your schedule for clashes and either saves it or suggests another time. Each task gets a push reminder before it starts, and a morning or evening summary sums up your day.

It is a mobile-first Progressive Web App you can install to your home screen, with a chat and a timeline view, three themes, and full English and Vietnamese. It also handles recurring tasks ("standup every weekday at 9am"), edits and cancellations through chat, a free monthly AI quota, in-app feedback, and a first Google Calendar connection.

I built it in about two weeks as a series of tracked tickets and tagged releases, from v1.0 to a friends beta (v2.1.0-beta1), each one tested against the Firebase emulators, reviewed and deployed through a CI pipeline to Google Cloud Run.

The screenshots show the app running locally with its built-in demo data and scripted assistant replies, not the live AI.

Features

  • Chat scheduling: plain-language requests become tasks; the assistant can also move, cancel and list tasks, and handle recurring series.
  • Conflict detection: overlapping tasks are refused and the assistant suggests a free time you can accept in one tap.
  • Reminders: a web push before each task (lead time is yours to choose), with quiet hours and actions on the notification.
  • Daily briefing: an AI summary of your day at the hour you pick, in chat and as a push.
  • Timeline with a week strip, today's progress, a now line and a sheet of actions per task.
  • Installable PWA with an offline shell, three themes, English and Vietnamese, in-app feedback, and a Google Calendar connection.

Screenshots

Sunup on a phone: chat with a schedule conflict, the day's timeline, and a task's actions
Say it in plain words and the assistant books it, with a 15-minute reminder and Undo
A double-booking is caught before it is saved, with a suggested new time to agree to
Timeline: a week strip, today's digest, a now line, reminders on each task and the evening summary
A task's sheet: mark done, edit the time, delete, or ask the assistant about it
Welcome: natural-language scheduling, conflict detection, smart reminders and a daily briefing
Settings: language, theme, reminder lead time, daily summary time and quiet hours
The Tidepool theme, one of three presets that sync across devices
The whole app in Vietnamese, with 24-hour times

Architecture

  • Frontend: Next.js PWA with Tailwind CSS and next-intl, signing in with Firebase Authentication.
  • Backend: a Node.js HTTP API on Google Cloud Run that verifies Firebase ID tokens and keeps the AI key server-side.
  • AI: Gemini 2.0 Flash on Vertex AI with function calling (create, update and cancel task and series tools); the model's arguments are treated as untrusted and validated before anything is saved.
  • Data: Cloud Firestore, with the conflict check and the write in one transaction, and security rules that keep server-owned fields out of clients' reach.
  • Background work: Cloud Tasks fires each reminder at its time, Cloud Scheduler runs the hourly summary sweep, and Firebase Cloud Messaging delivers the pushes.
  • Delivery: both parts ship as Docker images through GitHub Actions to Cloud Run, with a staging step before production; locally the whole stack runs in Docker Compose on the Firebase emulators.

Challenges & what I learned

  • Making two requests at the same moment unable to double-book: the overlap check and the save run in one Firestore transaction.
  • Reading dates and times correctly in Vietnamese as well as English, checked by a fixed set of Vietnamese expressions run through the real Gemini flow.
  • Keeping times local everywhere: early replies leaked raw UTC times into chat and into the model's prompt.
  • Guarding the assistant against prompt injection through task titles, and against revealing its own prompt and tools.
  • Firing a reminder at an exact minute without a server that is always on, using one Cloud Task per reminder.
  • Function calling turns a chatbot into a reliable app only if every model output is validated like user input.
  • Testing backend logic and security rules against the Firebase emulators catches what mocks miss.
  • Small tagged releases with a written release log made a fast two-week build safe to deploy repeatedly.