https://github.com/cedarcopilot/cedar-goal-tracker
https://github.com/cedarcopilot/cedar-goal-tracker
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cedarcopilot/cedar-goal-tracker
- Owner: CedarCopilot
- Created: 2025-08-07T13:13:45.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-07T13:16:06.000Z (10 months ago)
- Last Synced: 2025-08-07T15:17:03.286Z (10 months ago)
- Language: TypeScript
- Size: 249 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cedar Daily Goal Tracker
This repo is a **Next .js + Cedar-OS** demo that lets you set and track daily goals on an interactive React-Flow canvas.
## Features
1. **One node per day**
• Displays goal, completion status (green/red), summary, todos.
• Nodes are laid out chronologically and grouped by month; consecutive days are linked with animated edges.
2. **AI Assistant (Cedar)**
• Chat with the assistant to create or update goals using natural language.
• Only one setter is needed: `updateGoal` – pass an `id` plus a partial object to create or modify a node.
• Uses context and `@`-mentions (`@2025-08-07`) so the agent knows current nodes and selections.
3. **Voice Input / Output**
• Upload or record audio → Whisper transcription → agent → TTS reply.
• Endpoints: `/voice` (JSON) and `/voice/stream` (SSE).
4. **Persistence (Supabase)**
• Goals are saved in the `daily_goals` table (see SQL below).
• CRUD functions live in `daily-goals/supabase.ts`; all node changes are persisted automatically.
5. **Backend (Mastra)**
• `dailyGoalAgent` handles all requests, instructed to always emit an `updateGoal` action.
• Workflows validate actions with a Zod schema that accepts arbitrary args.
## SQL
```sql
create table public.daily_goals (
id text primary key, -- yyyy-mm-dd
date date not null,
goal text not null,
completed boolean not null default false,
summary text,
todos jsonb not null default '[]',
created_at timestamptz default now()
);
```
## Running Locally
```bash
pnpm install
# env vars: NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, OPENAI_API_KEY
pnpm dev
```
Navigate to `http://localhost:3000` — drag nodes, chat with Cedar, or record a voice command!