Skip to content

yasminjd/sync2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ™ Smart Cycle Calendar

An AI-powered menstrual cycle tracking and task scheduling application that uses AWS Bedrock Agent to optimize your productivity based on your cycle phases. The system leverages advanced AI to predict cycle phases and intelligently schedule tasks during optimal times for maximum efficiency and well-being.

๐Ÿง  How It Works

The Core Concept

The Smart Cycle Calendar combines menstrual cycle science with AI-powered productivity optimization. Research shows that hormonal fluctuations throughout the menstrual cycle significantly impact cognitive abilities, energy levels, and task performance. Our system uses this knowledge to:

  1. Predict cycle phases based on logged period starts and symptoms
  2. Analyze task types to determine cognitive requirements
  3. Optimize scheduling by matching tasks to ideal cycle phases
  4. Provide strategic insights for better work-life planning

AI-Powered Decision Making

The system uses AWS Bedrock Agent (Claude 3.5 Sonnet) with a knowledge base of menstrual cycle research to make intelligent scheduling decisions:

  • Follicular Phase (Days 1-13): High energy, creativity, learning โ†’ Schedule brainstorming, presentations, learning new skills
  • Ovulatory Phase (Days 14-16): Peak confidence, communication โ†’ Schedule interviews, negotiations, important meetings
  • Luteal Phase (Days 17-28): Detail-oriented, analytical โ†’ Schedule data analysis, planning, detailed work
  • Menstrual Phase (Days 1-5): Lower energy, introspective โ†’ Schedule routine tasks, reflection, lighter workload

๐Ÿ—๏ธ Technical Architecture

Frontend Stack

Next.js 15 (App Router) โ†’ Modern React framework with server-side rendering
โ”œโ”€โ”€ TypeScript โ†’ Type safety and better developer experience
โ”œโ”€โ”€ TailwindCSS โ†’ Utility-first styling with custom cycle phase colors
โ”œโ”€โ”€ FullCalendar โ†’ Interactive calendar with day/time grid views
โ”œโ”€โ”€ React Hot Toast โ†’ Non-intrusive notifications
โ””โ”€โ”€ Date-fns โ†’ Date manipulation and formatting

AI & Backend Integration

AWS Bedrock Agent (Claude 3.5 Sonnet) โ†’ Core AI reasoning engine
โ”œโ”€โ”€ Knowledge Base โ†’ RAG with menstrual cycle research papers
โ”œโ”€โ”€ Action Groups โ†’ Lambda functions for calendar operations
โ”œโ”€โ”€ Session Management โ†’ Maintains context across interactions
โ””โ”€โ”€ Structured Output โ†’ JSON responses for calendar integration

Data Flow Architecture

User Input โ†’ Next.js API Route โ†’ Bedrock Agent โ†’ Knowledge Base + Action Groups โ†’ AI Response โ†’ Calendar Update

โœจ Key Features

๐Ÿ”ฎ Intelligent Cycle Prediction

  • Period Start Logging: Click any date to log period start
  • Symptom Tracking: Log mood, energy, physical symptoms with intensity levels
  • AI Phase Prediction: Bedrock Agent predicts 4-phase windows with confidence levels
  • Visual Phase Overlays: Color-coded calendar backgrounds showing predicted phases

๐Ÿค– Smart Task Scheduling

  • Natural Language Input: Describe tasks in plain English ("Prepare quarterly presentation - need 3 hours")
  • Cognitive Task Analysis: AI categorizes tasks (analytical, creative, communication, routine)
  • Optimal Time Matching: Schedules tasks during ideal cycle phases
  • Disruption Minimization: Considers existing calendar events for minimal schedule changes

๐Ÿ“Š Detailed AI Insights

  • Clickable Events: Click any scheduled task to see detailed reasoning
  • Strategic Planning: AI provides work division and preparation tips
  • Phase-Based Strategy: Explains why specific timing was chosen
  • Confidence Scoring: Shows how well tasks fit chosen time slots

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+
  • AWS Account with Bedrock access
  • Basic understanding of React/Next.js

Quick Setup

# 1. Clone and install
git clone https://github.com/yasminjd/sync2.git
cd sync2
npm install

# 2. Environment configuration
# Create .env.local with your AWS credentials:
AWS_REGION=us-east-1
BEDROCK_AGENT_ID=your-bedrock-agent-id
BEDROCK_AGENT_ALIAS_ID=your-bedrock-agent-alias-id  
AWS_ACCESS_KEY_ID=your-aws-access-key
AWS_SECRET_ACCESS_KEY=your-aws-secret-key

# 3. Start development server
npm run dev
# Visit: http://localhost:3000/calendar

๐Ÿงช Testing the Application

1. Log a Period Start

  • Click any date on the calendar
  • Select "Cycle Entry" tab
  • Choose "Period Start" and save
  • Watch the calendar update with predicted cycle phases

2. Schedule a Smart Task

  • Click "+ Log Entry" button
  • Switch to "Smart Task" tab
  • Enter: "Prepare presentation for client meeting - need 3 hours"
  • Set a deadline
  • Click "Schedule Smart Task"
  • See the AI-optimized scheduling based on your cycle

3. View Task Details

  • Click on any AI-scheduled task
  • See detailed modal with:
    • AI reasoning for the timing
    • Cycle phase optimization
    • Strategic planning insights
    • Disruption score

๐Ÿ”ง Development Setup

Without AWS Bedrock (UI Development Mode)

If you don't have AWS Bedrock configured, the app will show configuration errors but you can still:

  • View and interact with the calendar UI
  • Test the modal forms
  • See the overall user experience
  • Work on frontend features

With Full AWS Integration

For full functionality, you'll need:

  1. AWS Account with Bedrock access
  2. Bedrock Agent configured (see BEDROCK_SETUP.md)
  3. Lambda Functions deployed for Action Groups
  4. Knowledge Base set up with cycle-related research

๐ŸŽฏ Core Components

CycleCalendar.tsx

  • Main calendar with FullCalendar integration
  • Handles date selection and event clicks
  • Manages phase windows and calendar events
  • Integrates with Bedrock API

SmartEntryModal.tsx

  • Dual-purpose modal for cycle entries and task scheduling
  • Form validation and submission
  • Toggle between "Cycle Entry" and "Smart Task" modes

TaskDetailModal.tsx

  • Displays detailed AI reasoning when clicking events
  • Shows cycle phase optimization
  • Strategic planning insights from Bedrock

๐Ÿšจ Troubleshooting

Common Issues

  1. "Bedrock not configured" errors

    • Check your .env.local file
    • Verify AWS credentials and region
    • Ensure Bedrock Agent is deployed
  2. Calendar not loading

    • Clear browser cache
    • Check browser console for errors
    • Verify all dependencies are installed
  3. Tasks not scheduling

    • Check AWS Lambda permissions
    • Verify Bedrock Agent Action Groups
    • Look at network tab for API errors

๐Ÿ“š Additional Resources

๐Ÿง  Real Bedrock Agent Configuration:

  • Agent Name: Sync (ID: 6AEGG2YUGR, Alias: TSTALIASID)
  • Foundation Model: Claude 3 Haiku (anthropic.claude-3-haiku-20240307-v1:0)
  • Agent Status: PREPARED and operational
  • Model Parameters: temperature=0.0, topP=1.0, maxTokens=2048

๐Ÿ“‹ Actual Deployed Instructions:

  • Cycle-aware calendar optimization workflow
  • Minimal disruption rules for schedule changes
  • Task-to-phase matching (Communicationโ†’Ovulatory, Analyticalโ†’Luteal)
  • Strategic explanation style with actionable guidance
  • JSON response format for calendar integration

๐Ÿ”ง Environment & Testing:

  • Real agent IDs (6AEGG2YUGR/TSTALIASID) in environment setup
  • AWS CLI verification commands for testing
  • Development modes (UI-only vs full AI integration)
  • Complete testing workflows for cycle tracking and smart scheduling

โšก Performance & Architecture:

  • Claude 3 Haiku: Fast, cost-effective, deterministic responses
  • Session management: 30-day memory, 20 recent sessions
  • Upgrade path to Claude 3.5 Sonnet v2
  • Response times: ~2-5 seconds for predictions

Experience the future of personalized productivity optimization! ๐Ÿš€๐ŸŒ™โœจ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors