- Kısa ve uzun vadeli hedeflerinizi belirleyin ve ilerlemenizi izleyin.
-
+
+ {/* Top Header */}
+
+
+ Personal / Strategic Goals
+
+
-
- Hedef yönetim modülü yakında eklenecek.
+
+ {/* AI Goal Strategist */}
+
+
+
+
+
+
+
+ AI Goal Strategist
+
+
+ You are falling behind on your Half-Marathon goal. Your running habit completion has dropped to 30% this month. AI suggests breaking the next milestone ("Maintain 15K weekly volume") into smaller, manageable 3K chunks to rebuild momentum.
+
+
+
+
+ Refactor Milestones
+
+
+ {/* Goals List */}
+
+ {goals.map((goal) => (
+
+
+ {/* Left Side: Overview & Progress */}
+
+
+
+
{goal.title}
+
+ {goal.status}
+
+
+
+ {goal.category}
+ Due: {goal.dueDate}
+
+
+
+ {/* Big Progress Bar */}
+
+
+ Overall Progress
+ {goal.progress}%
+
+
+
+ {/* Inner highlight for 3D effect */}
+
+
+
+
+
+
+ {/* Right Side: Milestones */}
+
+
+
Milestones
+
+
+
+ {goal.milestones.map((ms, idx) => (
+
+ {ms.done ? (
+
+ ) : (
+
+ )}
+
+ {ms.name}
+
+
+ ))}
+
+
+
+ Add Milestone
+
+
+
+
+ ))}
+
+
);
}
diff --git a/app/(dashboard)/habits/page.tsx b/app/(dashboard)/habits/page.tsx
index 08894fc..984c017 100644
--- a/app/(dashboard)/habits/page.tsx
+++ b/app/(dashboard)/habits/page.tsx
@@ -1,17 +1,188 @@
+"use client";
+
+import { Plus, Filter, Brain, Check, X, Flame, Target, Trophy, TrendingUp } from "lucide-react";
+import { Area, AreaChart, ResponsiveContainer, XAxis, Tooltip } from "recharts";
+
+// Mock Data
+const habits = [
+ {
+ id: 1,
+ name: "Morning Meditation",
+ category: "Mindfulness",
+ streak: 12,
+ goal: "Daily",
+ color: "#6C5BB0", // Primary
+ status: [true, true, true, false, true, true, false],
+ trend: [40, 45, 30, 60, 50, 70, 85]
+ },
+ {
+ id: 2,
+ name: "Read 20 Pages",
+ category: "Learning",
+ streak: 4,
+ goal: "Daily",
+ color: "#10b981", // Emerald
+ status: [false, true, true, true, true, false, false],
+ trend: [20, 40, 50, 40, 60, 80, 75]
+ },
+ {
+ id: 3,
+ name: "Gym Workout",
+ category: "Health",
+ streak: 2,
+ goal: "4x Week",
+ color: "#f97316", // Orange
+ status: [true, false, true, false, true, false, false],
+ trend: [50, 55, 45, 65, 60, 75, 90]
+ },
+ {
+ id: 4,
+ name: "No Sugar",
+ category: "Diet",
+ streak: 0,
+ goal: "Daily",
+ color: "#ef4444", // Red
+ status: [true, true, false, false, false, false, false],
+ trend: [80, 70, 60, 40, 30, 20, 10]
+ }
+];
+
+const days = ["M", "T", "W", "T", "F", "S", "S"];
+
export default function HabitsPage() {
return (
-
-
-
-
Alışkanlıklar
-
- Günlük alışkanlıklarınızı takip edin ve zinciri kırmayın.
-
+
+
+ {/* Top Header */}
+
+
+ Personal / Habits Tracker
+
+
-
- Alışkanlık takip modülü yakında eklenecek.
+
+ {/* AI Habit Optimizer */}
+
+
+
+
+
+
+
+ AI Habit Optimizer
+
+
+ I noticed a pattern: You often break your "No Sugar" streak on Thursdays. This correlates with high-stress days marked in your Journal. AI suggests scheduling a stress-relief activity (like a walk) around 3 PM on Thursdays to curb cravings.
+
+
+
+
+ Add Routine Intervention
+
+
+ {/* KPI Row */}
+
+
+
+
Perfect Days This Month
+
8
+
+
+
+
+
+
Longest Active Streak
+
12 days
+
+
+
+
+
+
Overall Completion Rate
+
68%
+
+
+
+
+
+ {/* Habit Grid */}
+
+ {habits.map((habit) => (
+
+
+ {/* Top Info */}
+
+
+
{habit.name}
+
+ {habit.category}
+
+ {habit.goal}
+
+
+
+
+
Current Streak
+
0 ? habit.color : '#8F89A5' }}>
+ {habit.streak}
+
+
+
+
+ {/* Weekly Checkboxes */}
+
+ {days.map((day, idx) => (
+
+ {day}
+
+ {habit.status[idx] ? : }
+
+
+ ))}
+
+
+ {/* Micro Chart (Background styling) */}
+
+
+ 30-Day Trend
+
+
+ ({ name: i, value: val }))}>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ))}
+
+
);
}
diff --git a/app/(dashboard)/journal/page.tsx b/app/(dashboard)/journal/page.tsx
index 822c997..085530b 100644
--- a/app/(dashboard)/journal/page.tsx
+++ b/app/(dashboard)/journal/page.tsx
@@ -1,245 +1,151 @@
"use client";
-import { useState } from "react";
-import { useLiveQuery } from "dexie-react-hooks";
-import { v4 as uuidv4 } from "uuid";
+import { Plus, Search, Filter, Brain, PenTool, Calendar, AlignLeft, Tag, Lock, Sparkles, Image as ImageIcon } from "lucide-react";
-import { analyzeJournalWithLocalAI } from "@/lib/ai";
-import { db } from "@/lib/db";
-import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { Textarea } from "@/components/ui/textarea";
-
-const moods = [
- { id: "happy", label: "Mutlu", emoji: "😊" },
- { id: "neutral", label: "Nötr", emoji: "😐" },
- { id: "sad", label: "Üzgün", emoji: "😔" },
- { id: "angry", label: "Sinirli", emoji: "😠" },
+// Mock Data
+const journalEntries = [
+ {
+ id: 1,
+ title: "Breakthrough in System Design",
+ preview: "Today we finally cracked the database architecture. By moving to a distributed model...",
+ date: "Today, 10:45 AM",
+ tags: ["Work", "Idea", "Win"],
+ sentiment: "Positive"
+ },
+ {
+ id: 2,
+ title: "Feeling a bit overwhelmed",
+ preview: "The Q3 deadlines are approaching fast. I need to make sure I'm prioritizing...",
+ date: "Yesterday",
+ tags: ["Mental Health", "Vent"],
+ sentiment: "Anxious"
+ },
+ {
+ id: 3,
+ title: "Morning Routine Reflection",
+ preview: "Woke up at 6 AM. Did 20 minutes of meditation. It really sets the tone for...",
+ date: "May 06, 2026",
+ tags: ["Habits", "Morning"],
+ sentiment: "Calm"
+ }
];
export default function JournalPage() {
- const [content, setContent] = useState("");
- const [mood, setMood] = useState("happy");
- const [energy, setEnergy] = useState("3");
- const [isSubmitting, setIsSubmitting] = useState(false);
-
- // Dexie.js üzerinden günlükleri tarih sırasına göre çekiyoruz (en yeni en üstte).
- const journals = useLiveQuery(() =>
- db.journals.orderBy("date").reverse().toArray(),
- );
-
- const handleSubmit = async (event: React.FormEvent) => {
- event.preventDefault();
- if (!content.trim()) return;
-
- setIsSubmitting(true);
-
- const now = new Date().toISOString();
- const entryId = uuidv4();
- const currentContent = content;
-
- try {
- // Veriyi önce kaydet, AI analizini daha sonra arka planda tamamla.
- await db.journals.add({
- id: entryId,
- date: now.split("T")[0],
- mood,
- energy: parseInt(energy, 10),
- content: currentContent,
- created_at: now,
- updated_at: now,
- });
-
- setContent("");
- setEnergy("3");
- setMood("happy");
-
- try {
- const aiResult = await analyzeJournalWithLocalAI(currentContent);
- if (aiResult) {
- await db.journals.update(entryId, {
- ai_tags: aiResult.ai_tags,
- ai_sentiment_score: aiResult.ai_sentiment_score,
- ai_summary: aiResult.ai_summary,
- });
-
- if (aiResult.suggested_tasks?.length) {
- for (const taskTitle of aiResult.suggested_tasks) {
- await db.tasks.add({
- id: uuidv4(),
- journal_id: entryId,
- title: `AI Önerisi: ${taskTitle}`,
- status: "todo",
- ai_generated: true,
- date: now.split("T")[0],
- created_at: now,
- });
- }
- }
- }
- } catch (aiError) {
- console.error("Arka plan AI analizi hatası:", aiError);
- }
- } catch (error) {
- console.error("Günlük kaydedilemedi:", error);
- } finally {
- setIsSubmitting(false);
- }
- };
-
- const handleDelete = async (id: string) => {
- if (confirm("Bu günlüğü silmek istediğinden emin misin?")) {
- await db.journals.delete(id);
- }
- };
-
return (
-
-
-
Günlük
-
- Zihnini boşalt, hislerini kaydet. Verilerin sadece cihazında kalır.
-
+
+
+ {/* Top Header */}
+
+
+ Personal / Daily Journal
+
+
+
+
+
+
+
+
+ NEW ENTRY
+
+
-
-
- Yeni Kayıt
- Bugün nasıl hissediyorsun?
-
-
-