You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
9.2 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/* 아리 — 라이프 케어 데이터
건강·웰니스 / 금융·소비 / 지식·학습(제2의 뇌)
아리가 데이터를 읽고 분석·코칭·리마인더를 미리 준비해 둔다. */
(function () {
/* ===================== 연결된 데이터 소스 ===================== */
const sources = {
health: [
{ id: "apple", name: "Apple Health", kind: "건강 앱", tone: "coral", on: true, last: "방금 동기화" },
{ id: "watch", name: "Apple Watch", kind: "웨어러블", tone: "violet", on: true, last: "1분 전" },
{ id: "fit", name: "Google Fit", kind: "활동 추적", tone: "green", on: false, last: "연결 안 됨" },
],
finance: [
{ id: "woori", name: "우리카드", kind: "신용/체크", tone: "blue", on: true, last: "오늘 09:12" },
{ id: "toss", name: "토스", kind: "계좌 통합", tone: "coral", on: true, last: "오늘 08:40" },
{ id: "kakao", name: "카카오뱅크", kind: "입출금", tone: "amber", on: true, last: "어제" },
{ id: "kb", name: "KB증권", kind: "투자", tone: "green", on: false, last: "연결 안 됨" },
],
knowledge: [
{ id: "notion", name: "Notion", kind: "메모·문서", tone: "violet", on: true, last: "오늘" },
{ id: "web", name: "웹 클리퍼", kind: "아티클 스크랩", tone: "blue", on: true, last: "2시간 전" },
{ id: "readwise", name: "Readwise", kind: "하이라이트", tone: "coral", on: true, last: "어제" },
],
};
/* ===================== 건강 & 웰니스 ===================== */
const health = {
rings: [
{ label: "걸음", val: "7,240", unit: "보", goal: "10,000보", pct: 72, icon: "steps", tone: "coral" },
{ label: "운동", val: "38", unit: "분", goal: "45분", pct: 84, icon: "flame", tone: "blue" },
{ label: "수면", val: "7h 12m", unit: "", goal: "7h 30m", pct: 90, icon: "moon", tone: "violet" },
],
vitals: [
{ label: "안정 심박", val: "62", unit: "bpm", trend: "down", note: "지난주 3", tone: "coral" },
{ label: "평균 스트레스", val: "보통", unit: "", trend: "flat", note: "오후에 상승", tone: "amber" },
{ label: "주간 운동", val: "3 / 4", unit: "회", trend: "up", note: "목표 근접", tone: "blue" },
],
sleep: {
total: "7시간 12분",
score: 86,
stages: [
{ label: "깊은 수면", pct: 22, tone: "violet" },
{ label: "렘 수면", pct: 24, tone: "blue" },
{ label: "얕은 수면", pct: 48, tone: "coral" },
{ label: "깸", pct: 6, tone: "muted" },
],
week: [72, 65, 88, 60, 90, 78, 86],
note: "수요일과 어젯밤은 잘 주무셨어요. 하지만 평일 취침 시각이 들쭉날쭉해요 — 자정 전 취침을 목표로 잡아볼까요?",
},
coach:
"이번 주 활동량은 <b>지난주보다 12% 늘었어요</b>. 다만 어제 물 섭취가 권장량의 절반에 그쳤고, 오후 3시 이후 앉아 있는 시간이 길었어요. 가벼운 산책과 수분 보충 리마인더를 오후에 넣어둘게요.",
habits: [
{ id: "water", title: "물 마시기", goal: "하루 8잔", done: 5, total: 8, streak: 4, icon: "water", tone: "blue", at: "오후 3:00 리마인더" },
{ id: "stretch", title: "스트레칭", goal: "오후 휴식 5분", done: 1, total: 2, streak: 9, icon: "stretch", tone: "coral", at: "오후 3:30 리마인더" },
{ id: "vitamin", title: "비타민 D", goal: "아침 1정", done: 1, total: 1, streak: 21, icon: "pill", tone: "amber", at: "오전 8:00 완료" },
{ id: "meditate", title: "명상", goal: "취침 전 10분", done: 0, total: 1, streak: 2, icon: "feather", tone: "violet", at: "오후 10:30 예정" },
],
};
/* ===================== 금융 & 소비 ===================== */
const finance = {
budget: { spent: 1284000, limit: 2000000, pct: 64, deltaPct: -8, daysLeft: 23 },
cats: [
{ name: "식비", amt: 412000, pct: 32, icon: "food", tone: "coral", over: false },
{ name: "쇼핑", amt: 298000, pct: 23, icon: "bag", tone: "violet", over: true },
{ name: "교통", amt: 164000, pct: 13, icon: "car", tone: "blue", over: false },
{ name: "카페·간식", amt: 138000, pct: 11, icon: "coffee", tone: "amber", over: false },
{ name: "구독", amt: 92000, pct: 7, icon: "repeat", tone: "green", over: false },
{ name: "문화·여가", amt: 180000, pct: 14, icon: "ticket", tone: "blue", over: false },
],
subs: [
{ name: "Netflix", date: "6월 9일", inDays: 2, amt: 17000, icon: "play", tone: "coral", note: "프리미엄" },
{ name: "Spotify", date: "6월 9일", inDays: 2, amt: 10900, icon: "music", tone: "green", note: "개인" },
{ name: "ChatGPT Plus", date: "6월 12일", inDays: 5, amt: 29000, icon: "spark", tone: "violet", note: "월 구독" },
{ name: "쿠팡 와우", date: "6월 15일", inDays: 8, amt: 7890, icon: "bag", tone: "blue", note: "멤버십" },
{ name: "유튜브 프리미엄", date: "6월 22일", inDays: 15, amt: 14900, icon: "play", tone: "coral", note: "가족 요금제" },
],
coach:
"이번 달은 <b>지난달보다 8% 적게</b> 쓰고 계세요. 다만 <b>쇼핑</b>이 예산의 23%로 평소보다 빠르게 늘고 있어요. 또 <b>이틀 뒤 Netflix·Spotify 결제</b>가 같은 날 빠져나가요 — 최근 두 달간 안 본 Netflix는 일시정지를 추천드려요.",
insights: [
{ kind: "alert", icon: "alert", title: "쇼핑 예산 초과 임박", body: "이번 달 쇼핑 29.8만 원, 한도의 99%예요. 남은 23일을 위해 한도를 올리거나 알림을 받을까요?" },
{ kind: "save", icon: "repeat", title: "잠자는 구독 발견", body: "Netflix를 최근 58일간 시청하지 않았어요. 일시정지 시 월 1.7만 원을 아껴요." },
{ kind: "info", icon: "trending", title: "이달 저축 페이스 양호", body: "현재 추세라면 이번 달 약 26만 원을 남길 수 있어요. 적금에 자동 이체할까요?" },
],
};
/* ===================== 지식 & 학습 (제2의 뇌) ===================== */
const knowledge = {
stats: { items: 1248, thisWeek: 23, collections: 9 },
suggested: ["AI 에이전트 설계에서 배운 것 요약해줘", "이번 주 저장한 글 핵심만", "리텐션 관련 메모 모아줘"],
collections: [
{ name: "프로덕트 전략", count: 84, tone: "blue" },
{ name: "AI · 에이전트", count: 132, tone: "violet" },
{ name: "디자인 시스템", count: 57, tone: "coral" },
{ name: "개인 성장", count: 41, tone: "green" },
],
items: [
{
id: "k1", type: "article", title: "효과적인 AI 에이전트를 설계하는 6가지 패턴",
src: "anthropic.com", time: "2시간 전", tone: "blue", icon: "article",
tags: ["AI·에이전트", "리서치", "설계"],
excerpt: "도구 사용, 계획 수립, 반성(reflection)을 분리하면 에이전트의 신뢰성이 크게 올라간다. 핵심은 작은 단위로 검증 가능한 단계로 쪼개는 것.",
ai: "오케스트레이터-워커 패턴과 평가-최적화 루프가 우리 온보딩 자동화에 바로 적용 가능해 보여요.",
},
{
id: "k2", type: "note", title: "분기 회고 — 리텐션 실험 메모", src: "내 노트", time: "어제",
tone: "coral", icon: "note", tags: ["프로덕트 전략", "업무"],
excerpt: "온보딩 3단계 축소 후 D7 리텐션 +6%p. 다음 분기엔 알림 타이밍 개인화 A/B 테스트 진행.",
ai: "‘분기 전략 미팅’ 안건과 연결돼요. 발표 슬라이드에 이 수치를 넣어드릴까요?",
},
{
id: "k3", type: "idea", title: "아이디어 — 습관 리마인더를 위치 기반으로", src: "빠른 메모", time: "어제",
tone: "violet", icon: "idea", tags: ["아이디어", "개인 성장"],
excerpt: "헬스장 근처를 지나면 운동 리마인더, 집 도착 시 명상 알림. 라이프 케어 모듈과 자연스럽게 이어짐.",
ai: "자동화 규칙으로 만들 수 있어요. ‘위치 도착 → 리마인더’ 레시피를 제안해드릴게요.",
},
{
id: "k4", type: "highlight", title: "‘딥 워크’ — 몰입의 4가지 규칙 하이라이트", src: "Readwise", time: "3일 전",
tone: "amber", icon: "highlight", tags: ["개인 성장", "독서"],
excerpt: "“집중은 근육과 같다. 산만함을 견디는 훈련을 반복할수록 더 깊이 몰입할 수 있다.”",
ai: "주 4회 ‘딥 워크’ 블록을 캘린더에 잡아드릴까요? 오전 시간이 비어 있어요.",
},
{
id: "k5", type: "article", title: "개인 재무를 자동화하는 시스템 만들기", src: "newsletter", time: "5일 전",
tone: "green", icon: "article", tags: ["개인 성장", "금융"],
excerpt: "수입이 들어오면 자동으로 비율에 따라 분배(저축·투자·소비)하는 구조를 한 번 세팅해두면 의지력이 필요 없다.",
ai: "금융 모듈의 ‘저축 자동 이체’ 제안과 맞닿아 있어요. 함께 설정해볼까요?",
},
],
};
window.LifeData = { sources, health, finance, knowledge };
})();