diff --git a/app/(dashboard)/finance/page.tsx b/app/(dashboard)/finance/page.tsx new file mode 100644 index 0000000..8280893 --- /dev/null +++ b/app/(dashboard)/finance/page.tsx @@ -0,0 +1,255 @@ +"use client"; + +import { Search, Filter, Brain, ArrowUpRight, ArrowDownRight, DollarSign, Activity, PieChart, Download, Wallet, Plus } from "lucide-react"; +import { + Bar, + BarChart, + CartesianGrid, + ResponsiveContainer, + Tooltip, + XAxis, + YAxis, + Area, + AreaChart, + Pie, + PieChart as RechartsPieChart, + Cell +} from "recharts"; + +// Mock Data +const cashFlowData = [ + { month: "Jan", in: 45000, out: 28000 }, + { month: "Feb", in: 52000, out: 31000 }, + { month: "Mar", in: 48000, out: 29000 }, + { month: "Apr", in: 61000, out: 34000 }, + { month: "May", in: 59000, out: 42000 }, + { month: "Jun", in: 75000, out: 38000 }, +]; + +const expensesData = [ + { name: "Payroll", value: 45000, color: "#6C5BB0" }, + { name: "Software/SaaS", value: 12000, color: "#54468B" }, + { name: "Marketing", value: 18000, color: "#3B3161" }, + { name: "Office/Rent", value: 8000, color: "#221C38" }, +]; + +const recentTransactions = [ + { id: 1, desc: "Stripe Payout", category: "Revenue", amount: "+$12,450.00", date: "Today", status: "Completed" }, + { id: 2, desc: "Amazon Web Services", category: "Software", amount: "-$3,240.50", date: "Yesterday", status: "Completed" }, + { id: 3, desc: "Google Ads", category: "Marketing", amount: "-$4,500.00", date: "May 15", status: "Pending" }, + { id: 4, desc: "WeWork Remote", category: "Office", amount: "-$1,200.00", date: "May 12", status: "Completed" }, +]; + +export default function FinancePage() { + return ( +
+ + {/* Top Header */} +
+

+ Management / Finance +

+
+ + +
+
+ + {/* AI Financial Analyst */} +
+
+
+ +
+
+

+ AI Financial Analyst +

+

+ I detected an anomaly: Software/SaaS expenses increased by 22% compared to last month. Specifically, AWS costs spiked. AI recommends auditing idle EC2 instances to save approximately $850/mo. +

+
+
+ +
+ + {/* KPI Row */} +
+ +
+

+ Total Revenue (MTD) +

+
+ $124,500 + + 8.4% + +
+
+ +
+

+ Monthly Burn Rate +

+
+ $42,300 + + 2.1% + +
+
+ +
+

+ Cash Runway +

+
+ 14.2 + + Months + +
+
+ +
+

+ AI Profitability Score +

+
+ 94/100 + + Optimal + +
+
+ +
+ + {/* Charts & Tables */} +
+ + {/* Cash Flow Chart */} +
+
+
+

Cash Flow Overview

+

Revenue vs Expenses over the last 6 months.

+
+
+
Inflow
+
Outflow
+
+
+
+ + + + + `$${val/1000}k`} /> + + + + + +
+
+ + {/* Expenses Pie & Recent Transactions */} +
+ +
+

Expenses Breakdown

+
+ + + + {expensesData.map((entry, index) => ( + + ))} + + + + +
+ Total + $83k +
+
+
+ {expensesData.map((item, idx) => ( +
+
+
+ {item.name} +
+ ${(item.value / 1000).toFixed(1)}k +
+ ))} +
+
+ +
+ +
+ + {/* AI Categorized Transactions */} +
+
+

Recent Transactions

+ Auto-Categorized by AI +
+
+
Description
+
Category
+
Date
+
Amount
+
Status
+
+ +
+ {recentTransactions.map((tx) => ( +
+
{tx.desc}
+
{tx.category}
+
{tx.date}
+
+ {tx.amount} +
+
+ + {tx.status} + +
+
+ ))} +
+
+ +
+ ); +} diff --git a/app/(dashboard)/goals/page.tsx b/app/(dashboard)/goals/page.tsx index 729d253..ce5c9d0 100644 --- a/app/(dashboard)/goals/page.tsx +++ b/app/(dashboard)/goals/page.tsx @@ -1,17 +1,165 @@ +"use client"; + +import { Plus, Brain, Target, Compass, Award, MoreHorizontal, CircleDashed, CheckCircle2 } from "lucide-react"; + +// Mock Data +const goals = [ + { + id: 1, + title: "Launch SaaS Product MVP", + category: "Career & Business", + progress: 75, + dueDate: "Q3 2026", + status: "On Track", + color: "#6C5BB0", // Primary + milestones: [ + { name: "Finalize Designs", done: true }, + { name: "Backend Architecture", done: true }, + { name: "Frontend Development", done: true }, + { name: "Beta Testing", done: false }, + { name: "Public Launch", done: false }, + ] + }, + { + id: 2, + title: "Run a Half-Marathon", + category: "Health & Fitness", + progress: 40, + dueDate: "Oct 12, 2026", + status: "Behind", + color: "#10b981", // Emerald + milestones: [ + { name: "Run 5K Without Stopping", done: true }, + { name: "Run 10K", done: true }, + { name: "Maintain 15K weekly volume", done: false }, + { name: "Complete 18K long run", done: false }, + ] + }, + { + id: 3, + title: "Read 24 Books", + category: "Personal Growth", + progress: 50, + dueDate: "Dec 31, 2026", + status: "Ahead", + color: "#f97316", // Orange + milestones: [ + { name: "Read 6 Books (Q1)", done: true }, + { name: "Read 12 Books (Q2)", done: true }, + { name: "Read 18 Books (Q3)", done: false }, + ] + } +]; + export default function GoalsPage() { return ( -
-
-
-

Hedefler

-

- 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. +

+
+
+
+ + {/* 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} + +
+ ))} +
+ + +
+ +
+ ))} +
+
); } 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. +

+
+
+
+ + {/* 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} + +
+ ))} +
+ + {/* 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 +

+
+
+ + +
+ +
- - - Yeni Kayıt - Bugün nasıl hissediyorsun? - - -
-
-
- -
- {moods.map((currentMood) => ( - - ))} -
-
+ {/* Main Layout */} +
+ + {/* Left Panel: Entry List & AI */} +
+ + {/* AI Sentiment Analysis */} +
+

+ AI Reflection Insight +

+

+ Over the last 14 days, your entries tagged with "Work" show a 30% increase in stress vocabulary. However, entries after Morning Meditation are consistently highly positive. +

+ +
-
- - setEnergy(event.target.value)} - className="w-full" - /> -
+ {/* Entries List */} +
+
+ Recent Entries +
- -
- -