"use client";
import {
Activity,
BarChart3,
Bell,
Bot,
CalendarDays,
Check,
CheckCircle2,
ChevronDown,
ChevronRight,
Circle,
Clock3,
Command,
FileBarChart,
Flame,
FolderKanban,
GripVertical,
LayoutDashboard,
ListTodo,
Menu,
MoreHorizontal,
NotebookPen,
Pause,
Play,
Plus,
Search,
Settings,
Sparkles,
Target,
TimerReset,
TrendingUp,
X,
type LucideIcon,
} from "lucide-react";
import { useEffect, useMemo, useState } from "react";
type View = "Dashboard" | "Tasks" | "Habits" | "Projects" | "Notes" | "Reports" | "Calendar" | "Analytics" | "Agent Activity" | "Settings";
type Task = { id: number; title: string; project: string; time: string; priority: "Urgent" | "High" | "Normal"; done: boolean; status: "To do" | "In progress" | "Done"; domain: "Personal" | "Work" | "OTS" };
const nav: { label: View; icon: LucideIcon }[] = [
{ label: "Dashboard", icon: LayoutDashboard }, { label: "Tasks", icon: ListTodo },
{ label: "Habits", icon: Flame }, { label: "Projects", icon: FolderKanban },
{ label: "Notes", icon: NotebookPen }, { label: "Reports", icon: FileBarChart },
{ label: "Calendar", icon: CalendarDays }, { label: "Analytics", icon: BarChart3 },
{ label: "Agent Activity", icon: Bot }, { label: "Settings", icon: Settings },
];
const initialTasks: Task[] = [
{ id: 1, title: "Finalize Q3 product brief", project: "Project E", time: "9:00 AM", priority: "Urgent", done: false, status: "In progress", domain: "Work" },
{ id: 2, title: "Review OTS storefront copy", project: "OTS Growth", time: "11:30 AM", priority: "High", done: false, status: "To do", domain: "OTS" },
{ id: 3, title: "30 minute strength session", project: "Personal OS", time: "4:00 PM", priority: "Normal", done: false, status: "To do", domain: "Personal" },
{ id: 4, title: "Map MCP permission model", project: "Project E", time: "Yesterday", priority: "High", done: true, status: "Done", domain: "Work" },
{ id: 5, title: "Archive June campaign assets", project: "OTS Growth", time: "Jul 15", priority: "Normal", done: false, status: "In progress", domain: "OTS" },
{ id: 6, title: "Plan long weekend itinerary", project: "Personal OS", time: "Jul 17", priority: "Normal", done: false, status: "To do", domain: "Personal" },
];
const habits = [
{ id: 1, icon: "↟", name: "Morning walk", streak: 18, color: "mint", done: true },
{ id: 2, icon: "◒", name: "Read 20 pages", streak: 12, color: "blue", done: false },
{ id: 3, icon: "✦", name: "Daily reflection", streak: 7, color: "amber", done: false },
{ id: 4, icon: "⌁", name: "No screens after 10", streak: 4, color: "coral", done: false },
];
const projects = [
{ name: "Project E", domain: "Work", progress: 72, due: "Sep 30", tasks: "18 / 25", color: "#356bff", icon: "E" },
{ name: "OTS Growth", domain: "OTS", progress: 54, due: "Aug 12", tasks: "13 / 24", color: "#ea7658", icon: "O" },
{ name: "Personal OS", domain: "Personal", progress: 81, due: "Ongoing", tasks: "17 / 21", color: "#299667", icon: "P" },
];
const week = [
{ day: "M", value: 58 }, { day: "T", value: 78 }, { day: "W", value: 66 },
{ day: "T", value: 91 }, { day: "F", value: 74 }, { day: "S", value: 42 }, { day: "S", value: 67 },
];
function Logo() {
return
E Project E
;
}
function Progress({ value, color = "var(--green)" }: { value: number; color?: string }) {
return
;
}
function Dashboard({ tasks, onToggleTask, habitDone, onToggleHabit, onNavigate }: { tasks: Task[]; onToggleTask: (id: number) => void; habitDone: Record; onToggleHabit: (id: number) => void; onNavigate: (view: View) => void }) {
const done = tasks.filter(t => t.done).length;
return <>
Focus score
Good momentum. You’re ahead of last week. One focused block will close your highest-impact task.
82 / 100
Start focus session
Tasks complete {done + 11}/ 18 18% this week
Best streak 18 days Morning walk
Focused time 14.5 hrs 2.1h vs last week
Monday, July 13
Today’s plan onNavigate("Tasks")}>All tasks
{tasks.slice(0, 4).map(task =>
onToggleTask(task.id)} aria-label={`${task.done ? "Reopen" : "Complete"} ${task.title}`}>{task.done ? : }
{task.title} {task.project} · {task.time}
{task.priority}
)}
Add a task
{Object.values(habitDone).filter(Boolean).length}/4 done
{habits.map(habit => { const isDone = habitDone[habit.id]; return onToggleHabit(habit.id)}>
{habit.icon} {habit.name} {habit.streak} day streak{isDone && }
})}
76% completion rate
+8% vs last week
{week.map((d, i) =>
{d.day}
)}
Across your life
Active projects onNavigate("Projects")}>View all
{projects.map(p =>
onNavigate("Projects")}>{p.icon} {p.name} {p.tasks} tasks {p.progress}% )}
Agent workspace
Hermes finished a task “Project health brief” is ready to review, with 3 risks and 5 next actions.
onNavigate("Agent Activity")}>Review result
>;
}
function TasksView({ tasks, onToggle }: { tasks: Task[]; onToggle: (id: number) => void }) {
return {(["To do", "In progress", "Done"] as const).map(status =>
{status}{tasks.filter(t => t.status === status).length} {tasks.filter(t => t.status === status).map(task =>
{task.priority}
onToggle(task.id)}>{task.done && } {task.title} {task.project}
)}
Add task)}
;
}
function HabitsView({ habitDone, onToggle }: { habitDone: Record; onToggle: (id: number) => void }) {
return Your rhythm
Consistency is compounding You completed 86% of scheduled habits in the past 30 days.
86 score
{habits.map(h =>
{h.icon}
{h.name} Every day · Personal
{h.streak} day streak
{Array.from({ length: 28 }).map((_, i) => 24 ? "low" : i % 5 === 0 ? "mid" : "high"} key={i} />)}
onToggle(h.id)}>{habitDone[h.id] ? <> Completed today> : <> Mark complete>} )}
;
}
function ProjectsView() {
return Active 3 Paused 1 Archived 6
New project{projects.map((p, index) =>
{p.name} {index === 0 ? "A calm, agent-native system for every commitment." : index === 1 ? "Make the storefront and campaigns work as one growth engine." : "Build routines and systems that create more spacious days."}
{p.progress}% complete{p.tasks} tasks
)}
;
}
function NotesView() {
const notes = ["Project E — product principles", "July operating review", "OTS campaign concepts", "Reading notes: Slow Productivity"];
const [selected, setSelected] = useState(notes[0]);
return # project-e · work · strategy
{selected} A personal operating system should reduce cognitive weight, not become another system to maintain.
North star Project E brings tasks, habits, projects, and knowledge into one calm surface. The model stays flexible; views do the organizing.
Design for the moment a person returns after a chaotic week. The system should make the next step obvious.Working principles 01 Three equal pillars, never one buried inside another.02 Capture quickly, organize progressively.03 External agents operate through explicit permissions. ;
}
function ReportsView() {
const items = [{ icon: BarChart3, title: "Weekly Summary", sub: "Jul 7–13", color: "blue" }, { icon: CalendarDays, title: "Monthly Review", sub: "June 2026", color: "mint" }, { icon: Target, title: "Project Health", sub: "Project E", color: "coral" }, { icon: Flame, title: "Habit Analysis", sub: "Last 30 days", color: "amber" }];
return Reports
Turn activity into perspective. Generate a structured review from your actual work, habits, and time.
Generate report{items.map(({ icon: Icon, ...r }) =>
Ready Open )}
Recent reports View archive {["Project E weekly health", "June time audit", "OTS campaign retrospective"].map((name, i) => {name} {i === 0 ? "Weekly" : i === 1 ? "Time audit" : "Custom"} Jul {13 - i * 4}
)} ;
}
function CalendarView() {
const days = Array.from({ length: 35 }, (_, i) => i - 1);
return Today ‹ ›
July 2026 Month Week Day
{["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"].map(d =>
{d} )}{days.map((d, i) =>
31 ? "muted" : ""}`} key={i}>{d < 1 ? 29 + d : d > 31 ? d - 31 : d} {d === 13 && <>9:00 Product brief 11:30 OTS copy 4:00 Strength >}{d === 15 && Project milestone }{d === 17 && Trip planning }
)}
;
}
function AnalyticsView() {
return Completion rate 76% 8.2%Habit consistency 86% 4.1%Deep work 14.5h 2.1hActive streaks 4 Best: 18 days 12 week view
Productivity trend Tasks Habits
{[35, 47, 42, 58, 54, 69, 63, 77, 72, 88, 80, 92].map((v, i) => {v} )}
Time distribution
Where time went Work 48% OTS 31% Personal 21% ;
}
function AgentView() {
const events = [{ type: "done", icon: Check, title: "Completed “Project health brief”", agent: "Hermes", time: "12 minutes ago", text: "Created a report with 3 risks, 5 actions, and a milestone forecast." }, { type: "working", icon: Activity, title: "Analyzing OTS campaign performance", agent: "Hermes", time: "Started 28 minutes ago", text: "Reviewing 14 tasks and 3 linked notes." }, { type: "created", icon: Plus, title: "Created note “July research synthesis”", agent: "Claude", time: "Yesterday, 4:18 PM", text: "Generated from 8 source notes with backlinks preserved." }];
return
Active agent
Hermes Planning and analysis partner · Full access
Online24 actions8 tasks4 reports
Open workspace Audit trail
Agent activity All agents {events.map(({ icon: Icon, ...event }) => {event.title} {event.text}
{event.agent} · {event.time} Details )} ;
}
function SettingsView() {
return Appearance Domains Keyboard shortcuts Agents & permissions Webhooks Import & export Preferences
Appearance Make Project E feel right for the way you work.
Color mode Use a light or dark interface.
Light Dark System
Accent color Used for actions and progress.
Density Control information spacing.
Compact Comfortable Spacious
Reduced motion Minimize interface animation.
;
}
function CommandPalette({ onClose, onNavigate }: { onClose: () => void; onNavigate: (v: View) => void }) {
const [query, setQuery] = useState("");
const results = nav.filter(n => n.label.toLowerCase().includes(query.toLowerCase()));
return e.stopPropagation()}>
setQuery(e.target.value)} placeholder="Search Project E or run a command…" />esc Jump to
{results.map(({ label, icon: Icon }) =>
{ onNavigate(label); onClose(); }}>{label} ↵ )}
;
}
export default function ProjectEApp() {
const [view, setView] = useState("Dashboard");
const [tasks, setTasks] = useState(initialTasks);
const [habitDone, setHabitDone] = useState>({ 1: true, 2: false, 3: false, 4: false });
const [domain, setDomain] = useState("All domains");
const [commandOpen, setCommandOpen] = useState(false);
const [mobileNav, setMobileNav] = useState(false);
const [timerActive, setTimerActive] = useState(false);
useEffect(() => {
const onKey = (event: KeyboardEvent) => {
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k") { event.preventDefault(); setCommandOpen(true); }
if (event.key === "Escape") { setCommandOpen(false); setMobileNav(false); }
};
window.addEventListener("keydown", onKey); return () => window.removeEventListener("keydown", onKey);
}, []);
const filteredTasks = useMemo(() => domain === "All domains" ? tasks : tasks.filter(t => t.domain === domain), [tasks, domain]);
const toggleTask = (id: number) => setTasks(current => current.map(t => t.id === id ? { ...t, done: !t.done, status: !t.done ? "Done" : "To do" } : t));
const navigate = (next: View) => { setView(next); setMobileNav(false); window.scrollTo({ top: 0, behavior: "smooth" }); };
let content;
if (view === "Dashboard") content = setHabitDone(v => ({ ...v, [id]: !v[id] }))} onNavigate={navigate} />;
else if (view === "Tasks") content = ;
else if (view === "Habits") content = setHabitDone(v => ({ ...v, [id]: !v[id] }))} />;
else if (view === "Projects") content = ;
else if (view === "Notes") content = ;
else if (view === "Reports") content = ;
else if (view === "Calendar") content = ;
else if (view === "Analytics") content = ;
else if (view === "Agent Activity") content = ;
else content = ;
return
Skip to content
setMobileNav(false)} aria-label="Close navigation">
{nav.slice(0, 8).map(({ label, icon: Icon }) => navigate(label)}>{label} {label === "Tasks" && 6 } )}
Workspace
{nav.slice(8).map(({ label, icon: Icon }) =>
navigate(label)}>{label} {label === "Agent Activity" && } )}
setTimerActive(v => !v)}>{timerActive ? : } {timerActive ? "24:32" : "Focus timer"} {timerActive ? "Project E brief" : "Ready when you are"}
ME Matt Personal workspace
{mobileNav &&
setMobileNav(false)} />}
setMobileNav(true)} aria-label="Open navigation"> setCommandOpen(true)}>Search or jump to… K setDomain(e.target.value)} aria-label="Filter by domain">All domains Personal Work OTS setCommandOpen(true)}> Quick add
{view === "Dashboard" ? "Your day, at a glance" : "Project E"}
{view === "Dashboard" ? "Good morning, Matt." : view} {view === "Dashboard" ? "Monday, July 13 · You have 3 priorities and 4 habits today." : view === "Tasks" ? "Move work forward without losing the thread." : view === "Habits" ? "Small actions, visible momentum." : view === "Projects" ? "Every outcome has a home." : view === "Notes" ? "Connect ideas to the work they shape." : view === "Reports" ? "Step back and see what changed." : view === "Calendar" ? "Your commitments, in time." : view === "Analytics" ? "Patterns behind your progress." : view === "Agent Activity" ? "Every agent action, visible and reversible." : "Tune Project E to fit your work."}
{view !== "Dashboard" && view !== "Settings" && New {view === "Agent Activity" ? "agent" : view.replace(/s$/, "").toLowerCase()} } {content}
{commandOpen && setCommandOpen(false)} onNavigate={navigate} />}
;
}