Countdown Events
Display upcoming special events on your home screen with AI-generated whimsical messages. Perfect for birthdays, holidays, vacations, and other family milestones.
Table of Contents
- TOC
Overview
The Countdown feature allows you to:
- Mark special todos as “countdown events”
- Display the earliest upcoming countdown prominently on the home screen
- See AI-generated whimsical messages that change daily
- View days remaining in a beautiful gradient widget
- Quickly navigate to your todo lists by clicking the widget
Creating a Countdown Event
From Todo Lists Page
- Navigate to Todo Lists page
- Create a new todo or edit an existing one
- Set a due date for the event
- Check the “Mark as Countdown Event” checkbox
- Save the todo
The countdown will now appear on the home screen if it’s the earliest upcoming countdown event with a future due date.
Requirements
- The todo must have a due date set
- The due date must be today or in the future
- The todo must not be completed
- The isCountdown field must be set to true
Home Screen Display
Widget Appearance
The countdown widget features:
- Gradient Background - Beautiful purple-to-pink gradient
- Event Name - Large, bold display of the event title
- Days Remaining - Huge number showing countdown
- Shows “TODAY” if the event is today
- Shows number of days for future events
- AI Message - Whimsical, family-friendly message (if Gemini API is configured)
Visibility
The countdown widget is displayed when:
- The countdown feature is enabled in Settings
- At least one countdown event exists
- The earliest countdown has a due date today or in the future
To toggle the widget:
- Go to Settings → Home Screen
- Toggle “Countdown” under Visible Widgets
AI-Generated Messages
Gemini Integration (Optional)
Countdown messages can be generated using Google Gemini 1.5 Flash (free tier):
- Creative Messages - Whimsical, family-friendly messages
- Context-Aware - Different messages for “today”, “tomorrow”, and future dates
- Daily Refresh - Messages regenerate every 24 hours
- Automatic Caching - Reduces API calls
Setup Gemini API (Optional)
- Visit Google AI Studio
- Create a free API key
- Add to your
.envfile:NUXT_GEMINI_API_KEY=your_api_key_here - Restart Skylite UX
Fallback Messages
If Gemini is not configured, the system uses simple fallback messages:
- Today: “Today is the day! [Event] is here!”
- Tomorrow: “Only 1 day until [Event]!”
- Future: “Only X days until [Event]!”
Message Caching
How It Works
- Messages are cached for 24 hours after generation
- Cached messages are stored in the database with the todo
- Widget refreshes use cached messages when available
- New messages generate automatically after 24 hours
Benefits
- Reduces API calls to Gemini (respects free tier limits)
- Faster page loads (no API waiting time)
- Still provides daily variety
Manual Refresh
To force a new message generation:
- Wait 24 hours for automatic refresh
- Or update the todo (which clears the cache)
Widget Refresh Interval
The countdown widget refreshes based on your Home Screen settings:
- Go to Settings → Home Screen
- Adjust Data Refresh Interval (default: 6 hours)
- The countdown widget will refresh at this interval
Note: Even with frequent refreshes, AI messages only regenerate once per 24 hours to reduce API usage.
Multiple Countdowns
Priority Display
If you have multiple countdown events:
- Only the earliest upcoming event is displayed on the home screen
- Events are automatically sorted by due date
- Completed events are excluded
- Past events are excluded
Managing Multiple Events
- Create as many countdown todos as you like
- All active countdowns are tracked
- The widget automatically updates when dates change
- Completing a countdown reveals the next one
Examples
Birthday Countdown
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Title: "Emma's 10th Birthday"
Due Date: March 15, 2026
isCountdown: ✓ Yes
Home Display:
┌─────────────────────────────┐
│ Emma's 10th Birthday │
│ │
│ 42 │
│ days to go │
│ │
│ "The party planning can │
│ officially begin! 🎉" │
└─────────────────────────────┘
Vacation Countdown
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Title: "Disney World Trip"
Due Date: July 20, 2026
isCountdown: ✓ Yes
Home Display (when tomorrow):
┌─────────────────────────────┐
│ Disney World Trip │
│ │
│ 1 │
│ day to go │
│ │
│ "Pack those bags and get │
│ ready for magic! ✨" │
└─────────────────────────────┘
Event Day
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Title: "First Day of School"
Due Date: Today
isCountdown: ✓ Yes
Home Display:
┌─────────────────────────────┐
│ First Day of School │
│ │
│ TODAY │
│ │
│ │
│ "Rise and shine! Today's │
│ the big day! 📚" │
└─────────────────────────────┘
Technical Details
Database Fields
Each todo has three countdown-specific fields:
isCountdown(Boolean) - Marks the todo as a countdown eventcountdownMessage(String, nullable) - Cached AI-generated messagemessageGeneratedAt(DateTime, nullable) - When the message was last generated
API Endpoints
- GET
/api/todos/countdowns- Fetch all active countdown events - POST
/api/ai/generate-countdown-message- Generate a new AI message
Performance
- Messages cached in database for 24 hours
- Widget refreshes use cached data when available
- Minimal API calls to Gemini (1 per event per day maximum)
Troubleshooting
Widget Not Showing
Check:
- Is the countdown feature enabled in Settings?
- Do you have at least one countdown todo?
- Does the countdown have a due date set?
- Is the due date today or in the future?
- Is the todo marked as not completed?
No AI Messages
Check:
- Is
NUXT_GEMINI_API_KEYset in your.envfile? - Is the API key valid? Test at Google AI Studio
- Check server logs for API errors
Fallback: The system automatically uses fallback messages if Gemini is unavailable.
Message Not Updating
- Messages refresh every 24 hours
- Check the current time vs.
messageGeneratedAtin the database - Force refresh by updating the todo
Best Practices
Event Selection
- Use countdowns for special occasions only
- Limit to 3-5 active countdowns to avoid clutter
- Complete past countdowns to keep the list clean
Event Names
- Keep names concise and clear
- Use specific names: “Emma’s Birthday” vs. “Birthday”
- Avoid special characters that might confuse the AI
Due Dates
- Set the due date to the day of the event, not the day before
- Use consistent time zones
- Verify dates before marking as countdown
API Usage
- One free Gemini API key per Google account
- Free tier includes generous daily limits
- Messages cache for 24 hours to respect limits
- Fallback messages work without API key
Privacy & Security
- Gemini API calls are made from your server, not the client
- Event names are sent to Google’s API for message generation
- No personal information is shared beyond event names
- Messages are stored locally in your database
- API key is stored server-side only (never exposed to clients)
Future Enhancements
Potential improvements for future versions:
- Display multiple countdowns (top 3)
- Custom user-written messages (override AI)
- Countdown categories (birthdays, holidays, etc.)
- Countdown history/archive
- Family sharing of specific countdowns
- Push notifications at milestones (1 week, 1 day, etc.)
- Alternative AI models (Claude, ChatGPT)
- Customizable message styles and tones