FamFusion Daily AI Alerts: Defensive Publication
Title: FamFusion Daily AI Alerts โ Architecture & Prompt Framework
Abstract (250 words max):
FamFusionโs Daily AI Alerts system delivers hyper-personalized morning briefings to individuals about their own goals and activities, and structured notes about family, friends, and work contacts. Utilizing a flexible onboarding data modelโincluding profile preferences, family demographics, and network sectionsโthe cloud pipeline orchestrates scheduled triggers, dynamic prompt construction (via ChatGPT API), and branded HTML email templating. This publication documents the end-to-end design to establish prior art, while omitting proprietary tuning parameters and internal credentials.
1. Background & Motivation
- Problem Statement: Users need a single, conversational-style daily digest that covers: personal motivational tips, local suggestions, and segmented notes about family, friends, and work relationships. Existing solutions lack multi-tier personalization and conversational layout.
- Existing Solutions: Static newsletters, calendar reminders, or single-source alerts do not integrate both personal goals and social network context in a chat-like email.
2. System Overview
- Architecture Diagram: (to be inserted) user device โถ Firestore โถ Cloud Scheduler โถ dailyDigest Cloud Function โถ OpenAI Chat API โถ Email Service โถ User Inbox.
- Key Components:
- Firestore Collections:
- userProfiles (stores onboarding data: name, location, dob, political stance, dietaryPrefs, travelPrefs, kidAges, etc.)
- dailyAlertsSettings (enables Email/SMS, scheduled time, timezone, networkSections)
- networkSections (subcollections under settings grouping UIDs into Family, Friends, Work)
- Cloud Scheduler: Cron jobs per timezone firing at usersโ preferred hour (e.g. 0 8 * * * in America/New_York).
- dailyDigest Function: Node.js function that:
- Queries active users for current hour.
- Fetches each userโs profile and all UIDs in Family, Friends, Work sections.
- Builds a structured prompt, segmented by Personal, Family, Friends, and Work tasks or suggestions.
- Calls ChatGPT (gpt-3.5-turbo) with that prompt.
- Extracts response.choices[0].message.content and merges into HTML template.
- Sends the email via SMTP/API from [email protected].
- Email Templating: Branded HTML with header bar, section headings, blockquote elements, and footer link to settings.
- Firestore Collections:
3. Data Model & Prompt Framework
- User Profile Schema Example:
{
"uid": "user123",
"name": "Daily Digest User",
"location": "New York, NY",
"dob": "1985-04-15",
"political": "Independent",
"musicPrefs": ["Rock","Jazz"],
"dietaryPrefs": ["Vegan","Mediterranean"],
"travelPrefs": ["Paris","Tokyo"],
"kidAges": [5, 8],
"goalsText": "Improve fitness and learn Spanish"
} - Network Sections:
{
"Family": ["uid2","uid3"],
"Friends": ["uid4","uid5"],
"Work": ["uid6"]
} - **Prompt Template Structure:
- The system constructs segmented prompts for Personal, Network Sections, and Combined Digest.
- Details omitted for confidentiality.
- Collaborative Digests Across Profiles
- Pairing Logic: If a user shares their dailyAlertsSettings.networkSections with another user (via email invitation), the function loads both profiles and merges their data.
- Combined Prompt Template: โWe have two users, {{name1}} and {{name2}}, with profiles: Location1: {{location1}}, Prefs1: {{musicPrefs1}}, Goals1: {{goalsText1}}; Location2: {{location2}}, Prefs2: {{musicPrefs2}}, Goals2: {{goalsText2}}.
- Suggest one activity they can take turns recommending to each other (e.g. dinner spots, local events).
- Provide health and wellness tips relevant to both their ages and goals.
- For any children in either profile, suggest a constructive way to communicate (e.g., replacing negative phrasing: โinstead of calling them a liar, try sayingโฆโ).
- In a work context, include joint project reminders or collaboration ideas.
- For friends section, recommend a social outing (restaurant, concert, sporting event) they both would enjoy. Format as a combined daily digest email with clear subheadings: โJoint Activity Recommendationโ, โWellness Tipsโ, โFamily Communication Tipsโ, โCollaboration Remindersโ, and โFriends Outingโ.โ
5. Email Template Snippets
<div style="max-width:600px;margin:0 auto;font-family:Arial,sans-serif;">
<div style="background:#0066cc;color:#fff;padding:16px;border-top-left-radius:8px;border-top-right-radius:8px;">
<h1 style="margin:0;font-size:24px;text-align:center;">Your Daily Alerts</h1>
</div>
<div style="padding:16px;">
<h2>Welcome to Your Daily Digest</h2>
<p>Good morning, {{name}}! Here's how you can make the most of your day in {{location}}.</p>
<h3>Local Art & DIY Event</h3>
<p>Don't miss the Community Art Center showcase today...</p>
<h3>Personal Goals</h3>
<p>{{motivationalQuote}}</p>
<h3>Family</h3>
<ul>
<li>Encourage your 5-year-old to try the new painting kit...</li>
</ul>
<h3>Friends</h3>
<ul>
<li>Check in with Alex about their upcoming marathon training...</li>
</ul>
<h3>Work</h3>
<ul>
<li>Remember to send the status update to your team lead...</li>
</ul>
</div>
<div style="font-size:12px;color:#888;text-align:center;padding:8px;">
Youโre receiving this because you subscribed to Daily Alerts. <a href="{{settingsUrl}}">Manage your settings</a>
</div>
</div> 5. Example Daily Alert Flow
- Scheduler fires at userโs 08:00 local time.
- dailyDigest queries Firestore for users matching current hour.
- For each user: loads profile + network sections.
- Constructs segmented prompts.
- Invokes ChatGPT API and awaits the formatted response.
- Injects response into HTML template.
- Sends via email provider.
6. TradeโSecret Boundaries
- Omitted: Internal promptโtuning temperature values, API keys, advanced ranking algorithms, and proprietary scoring logic.
7. Shared Chat Feature (Brief Mention)
FamFusion also supports a shared chat module (sharedThreads collection) where a user can invite others into a realโtime GPTโbacked conversation. Its core schema and invitation flow are documented separately and not covered here.
Publication Date: 2025โ06โ29
This document is publicly posted to establish prior art for FamFusionโs Daily AI Alerts system.