Hey Dad uses a combination of a local Express server and Google's Gemini 3.1 Pro API to provide its core functionality.
The AI logic is handled in src/services/gemini.ts.
- Purpose: Generates a conversational response from "Dad".
- Parameters:
message(string): User's input.history(array): Previous chat messages for context.language('en' | 'id'): Preferred language.profile(UserProfile): User's interests, goals, and challenges.
- Output: A string containing the AI's response, prefixed with an
[EMOTION: <emotion>]tag.
- Purpose: Generates a timely greeting and advice based on current context.
- Parameters:
timeOfDay(string): Current time period (morning, afternoon, etc.).recentActivity(string): Summary of user's recent goals or journal entries.
- Output: A short, proactive advice string.
- Purpose: Breaks a large goal into 3-5 actionable steps.
- Output: A JSON array of step objects.
The backend server is defined in server.ts.
- Purpose: Health check for the server.
- Response:
{ "status": "ok" }
- Purpose: (Optional) Returns the OAuth authorization URL for external integrations.
The application uses SQLite for persistence, managed via better-sqlite3.
interests: string (comma-separated)goals: string (comma-separated)challenges: string (comma-separated)personality: 'mentor' | 'playful' | 'wise elder'favorite_jokes: string
id: integer (primary key)title: stringcategory: stringpriority: integersteps: string (JSON-serialized array)
id: integer (primary key)content: stringdate: ISO 8601 stringcategory: string
id: integer (primary key)title: stringcontent: stringdate: ISO 8601 stringcategory: string
Questions? Reach out via Telegram or email khudri@binadarma.ac.id.