Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Calendyours

A calendar-first AI planning workspace. Paste a project description and Calendyours generates a task plan, then schedules every task around your existing commitments — automatically.


What's built

Area Status
Sign-up / sign-in (Supabase Auth) ✅
Onboarding wizard (timezone, working hours, recurring commitments) ✅
Weekly calendar view with drag-to-reschedule and resize ✅
AI plan generation for work projects ✅
AI plan generation for personal goals (Health & Fitness, Personal Project) ✅
Overdue task redistribution ✅
Settings page (profile, working hours, session length) ✅
Dashboard stats (completed, upcoming, workload, projects) ✅
Loading skeletons + error boundaries on every route ✅
Rate limiting + strict input validation on all API routes ✅
Security headers (CSP-adjacent, HSTS, X-Frame-Options, etc.) ✅

See ROADMAP.md for deferred features (Google Calendar sync, Pomodoro, heatmap, recurring tasks, notifications, file extraction, and more goal categories).


Prerequisites


Quick start (local dev)

1 · Clone and install

git clone https://github.com/your-handle/calendyours.git
cd calendyours
npm install

2 · Set up Supabase

  1. Create a new project at supabase.com.
  2. In the Supabase dashboard, open the SQL editor.
  3. Paste and run the migration files in this order:
File What it does
supabase/migrations/20260607000000_init_schema.sql Core tables, RLS policies, and the new-user trigger
supabase/migrations/20260608000000_grant_authenticated.sql Row-level grants for authenticated role
supabase/migrations/20260608000002_profiles_onboarding.sql Adds onboarding fields to profiles
supabase/migrations/20260608000010_tasks_calendar_fields.sql Adds scheduling columns to tasks
supabase/migrations/20260608000020_storage_buckets.sql Creates the project-files storage bucket
supabase/migrations/20260608000030_profiles_max_session_minutes.sql Adds session-length preference
supabase/migrations/20260609000010_projects_type.sql Adds project_type column (work vs. personal goal)

Tip: Open each file in your editor, copy the contents, paste into the SQL editor, and click Run. The order matters — later files reference columns added by earlier ones.

  1. Under Authentication → Email, decide whether to enable email confirmation. For local dev you can turn it off.

3 · Configure environment variables

cp .env.example .env.local

Open .env.local and fill in:

NEXT_PUBLIC_SUPABASE_URL=https://your-project-ref.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
NEXT_PUBLIC_SITE_URL=http://localhost:3000
ANTHROPIC_API_KEY=sk-ant-...
PLAN_MODEL=claude-haiku-4-5-20251001
PLAN_DAILY_LIMIT=10

Your Supabase URL and anon key are on the Settings → API page.

4 · Start the dev server

npm run dev

Open http://localhost:3000 and sign up.


Deploy to Vercel

1 · Push to GitHub

git remote add origin https://github.com/your-handle/calendyours.git
git push -u origin main

2 · Import into Vercel

  1. Go to vercel.com/new and import your repository.
  2. Vercel auto-detects Next.js — no framework override needed.
  3. Under Environment Variables, add every key from .env.example except the TEST_USER_* ones. For NEXT_PUBLIC_SITE_URL use your Vercel domain, e.g. https://calendyours.vercel.app.
  4. Click Deploy.

3 · Allow the auth redirect URL in Supabase

In Supabase → Authentication → URL Configuration, add your Vercel URL to Redirect URLs:

https://your-app.vercel.app/auth/callback

Running tests

The test scripts require the dev server to be running and the database to be seeded. Start the server first, then in a second terminal:

# AI plan generation (uses _mock mode by default — no API credits needed)
npm run test:work

# Overdue task redistribution
npm run test:redistribution

# Goal plan generation
npm run test:goals

# Calendar drag/drop interactions
npm run seed:calendar   # seed first
npm run test:calendar

# Row-level security (requires TEST_USER_A_* / TEST_USER_B_* env vars)
npm run test:rls

Project structure

src/
├── app/
│   ├── api/                  # Route handlers (generate-plan, goals, redistribute)
│   ├── app/                  # Authenticated app shell
│   │   ├── dashboard/        # Stats overview
│   │   ├── calendar/         # FullCalendar view
│   │   ├── work/new/         # Work project wizard
│   │   ├── goals/new/        # Goal wizard
│   │   ├── settings/         # Profile & working-hours editor
│   │   ├── error.tsx         # App-shell error boundary
│   │   └── layout.tsx        # Auth guard + sidebar
│   ├── auth/                 # Login, signup, OAuth callback
│   └── onboarding/           # First-run setup wizard
├── components/
│   ├── calendar/             # CalendarView, TaskPopover, RedistributeBanner
│   ├── forms/                # WorkDraftForm, GoalDraftForm, SettingsForm
│   ├── layout/               # AppSidebar, MobileNav, PageShell
│   └── ui/                   # Button, Card, Input, Label, Skeleton, Badge
└── lib/
    ├── schemas/              # Zod schemas (plan, API request bodies)
    ├── supabase/             # Browser + server Supabase clients
    ├── rate-limit.ts         # Sliding-window rate limiter
    ├── scheduler.ts          # Greedy bin-packing task scheduler
    └── database.types.ts     # Generated Supabase types

Tech stack

Layer Technology
Framework Next.js 14 (App Router, server components, server actions)
Database / Auth Supabase (PostgreSQL + GoTrue + Storage)
AI Anthropic Claude (claude-haiku-4-5-20251001 default)
Calendar FullCalendar 6
Styling Tailwind CSS + Geist font
State Zustand (shell), TanStack Query (server state)
Forms / validation React Hook Form + Zod
File uploads react-dropzone

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages