An intelligent AI-powered productivity assistant with BMW-themed showcase, featuring calendar management, task tracking, and AI chat capabilities.
- Project Overview
- Key Features
- Technology Stack
- Architecture
- Prerequisites
- Installation & Setup
- Usage Guide
- Configuration
- API Documentation
- Development
- Troubleshooting
Amulate BMW Group is a full-stack productivity application featuring:
- 📅 Google Calendar Integration - Natural language calendar management
- ✅ Smart Task Management - AI-powered task parsing with deadline tracking
- 🔔 Task Deadline System - Color-coded urgency indicators (Red/Orange/Yellow)
- 👥 Real-time Collaboration - Share tasks and calendars with team members
- 🚗 BMW Showcase - Interactive 3D BMW presentation with intro animation
- 🎨 Modern UI - Dark/light theme with smooth animations
- ⚡ AI-powered parsing: Create tasks from natural language (e.g., "Schedule a 2-hour coding session after lunch")
- 🎯 Priority levels: Low, Medium, High with visual indicators
- 🏷️ Categories: Organize tasks by category
- ⏱️ Estimated time: Optional duration estimates
- 📆 Deadline tracking: Set due dates with urgency indicators:
- 🚨 Red: Less than 6 hours remaining
- ⏰ Orange: 6-24 hours remaining
- ⏱️ Yellow: 1-3 days remaining
- 🎙️ Voice input: Speech-to-text for hands-free task creation
- 📤 Task sharing: Share tasks with other users via email (Under Maintenance)
- 🔄 Real-time updates: Live synchronization across users
- 📅 Google Calendar sync: View and manage Google Calendar events
- 📝 Natural language: Create events with conversational commands
- 🔄 Real-time refresh: Live calendar updates
- 📍 Event details: View location, description, and time
- 👥 Share tasks: Assign tasks to team members
- 📧 Email notifications: Automatic sharing notifications
- 🔔 Real-time updates: Instant sync of shared items
- 📋 Shared view: Dedicated tab for items shared with you
- 🚗 Intro animation: Stunning BMW logo reveal with glowing effects
- 🎨 Landing page: Professional BMW-themed presentation
- 📱 Responsive design: Works on all devices
- 🌙 Theme toggle: Dark and light modes
- Framework: React 18 with TypeScript
- Build Tool: Vite 5
- UI Components: shadcn/ui (built on Radix UI primitives)
- Styling: Tailwind CSS 3 + CSS custom properties
- Animations: Framer Motion
- 3D Graphics: Spline, React Three Fiber
- Routing: React Router DOM v6
- State Management: React hooks + TanStack Query
- Markdown: react-markdown with remark-gfm
- Icons: Lucide React
- API Framework: FastAPI (Python)
- AI/LLM: LangGraph + Groq (Llama 3.1 8B Instant)
- Calendar API: Google Calendar API (googleapis)
- Database: Supabase PostgreSQL
- Authentication: Supabase Auth
- Real-time: Supabase Realtime subscriptions
- Edge Functions: Supabase Edge Functions (Deno)
profiles- User profilestasks- Task management with deadline columnshared_tasks- Task sharing relationshipscalendars- User calendar metadatacalendar_events- Calendar eventscalendar_shares- Calendar sharingnotifications- User notifications
┌────────────────────────────────────────────────────────────┐
│ Frontend (React + Vite) │
│ ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Landing │ │ Dashboard │ │ AI Chat │ │
│ │ & BMW │ │ (Tasks/Cal) │ │ Interface │ │
│ └─────────────┘ └──────────────┘ └──────────────┘ │
└────────────┬────────────────────────────────────────────────┘
│
│ HTTP/REST + WebSocket
│
┌─────────┴────────┬──────────────────────┐
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌──────────────────┐
│ Supabase │ │ Calendar │ │ Google Calendar │
│ (DB+Auth) │ │ Agent API │ │ API │
│ + Edge Fn │ │ (Python) │ │ │
└─────────────┘ └──────┬──────┘ └──────────────────┘
│
▼
┌──────────────┐
│ LangGraph │
│ + Groq LLM │
│ (Llama 3.1) │
└──────────────┘
Amulate-BMW-Group/
├── src/
│ ├── pages/
│ │ ├── Index.tsx # Landing page with intro
│ │ ├── BMW.tsx # BMW showcase animation
│ │ ├── Dashboard.tsx # Main dashboard (tabs)
│ │ ├── Auth.tsx # Authentication page
│ │ ├── Profile.tsx # User profile
│ │ └── NotFound.tsx # 404 page
│ │
│ ├── components/
│ │ ├── dashboard/
│ │ │ ├── AIChat.tsx # AI chat (Chat/Agent modes)
│ │ │ ├── TaskManager.tsx # Task management UI
│ │ │ ├── GoogleCalendarView.tsx # Calendar display
│ │ │ ├── AllCalendarsView.tsx # Multi-calendar view
│ │ │ ├── SharedWithMe.tsx # Shared items view
│ │ │ ├── ShareDialog.tsx # Sharing interface
│ │ │ ├── CalendarActionAnimation.tsx # Action feedback
│ │ │ ├── TaskManagerWithAI.tsx # AI task variant
│ │ │ └── VoiceInterface.tsx # Voice input
│ │ │
│ │ ├── ui/ # shadcn/ui components
│ │ ├── HeroSection.tsx
│ │ ├── FeaturesSection.tsx
│ │ ├── AIDemoSection.tsx
│ │ ├── Navigation.tsx
│ │ ├── Footer.tsx
│ │ └── ThemeToggle.tsx
│ │
│ ├── integrations/
│ │ ├── supabase/ # Supabase client setup
│ │ ├── calendarAgent.ts # Calendar agent helpers
│ │ ├── calendarAgentConfig.ts
│ │ ├── calendarAgentService.ts # Calendar API calls
│ │ └── taskAgentService.ts # Task AI service
│ │
│ ├── hooks/
│ │ ├── useAuth.ts # Authentication hook
│ │ ├── useNotifications.ts # Notifications hook
│ │ ├── use-toast.ts # Toast notifications
│ │ └── use-mobile.tsx # Mobile detection
│ │
│ └── lib/
│ └── utils.ts # Utility functions
│
└── supabase/
├── migrations/ # Database migrations
└── functions/ # Edge functions
├── ai-assistant/ # AI chat function
└── send-share-notification/ # Sharing notifications
calender-agent-service/ # Backend Python service
├── app_langgraph.py # FastAPI server
├── graph.py # LangGraph workflow
├── nodes.py # Agent nodes
├── state.py # State management
├── calendar_tools.py # Calendar operations
├── google_apis.py # Google API integration
├── clarification_agent.py # User clarification
├── constraint_agent.py # Constraint checking
└── requirements.txt # Python dependencies
-
Python 3.10+
- Download: https://www.python.org/downloads/
-
Git
- Download: https://git-scm.com/
-
Supabase Account (Database & Auth)
- Create at: https://supabase.com/
- You'll need: Project URL and API keys
-
Google Cloud Account (Calendar API)
- Create at: https://console.cloud.google.com/
- Enable Google Calendar API
- Create OAuth 2.0 credentials
-
Groq API Key (LLM for agents)
- Create at: https://console.groq.com/
- Get free API key
-
OpenAI API Key (Optional - for Chat mode)
- Create at: https://platform.openai.com/
- Only needed if using Chat mode
git clone <your-repository-url>
cd Amulate-BMW-Groupnpm installThis installs React, TypeScript, Vite, Tailwind CSS, shadcn/ui, Supabase client, and all other dependencies.
Create .env file in the root directory:
# Supabase Configuration
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_PUBLISHABLE_KEY=your-anon-public-key
VITE_SUPABASE_PROJECT_ID=your-project-id
# Backend Services
VITE_CALENDAR_AGENT_URL=http://localhost:8000
VITE_TASK_AGENT_URL=http://localhost:8000
# Optional: Google Gemini (if using Gemini mode)
VITE_GEMINI_API_KEY=your-gemini-api-keyGetting Supabase Credentials:
- Go to https://supabase.com/dashboard
- Create new project or select existing
- Settings → API
- Copy:
- Project URL →
VITE_SUPABASE_URL - anon/public key →
VITE_SUPABASE_PUBLISHABLE_KEY - Project ID →
VITE_SUPABASE_PROJECT_ID
- Project URL →
Option A: Using Supabase CLI (Recommended)
# Install Supabase CLI
npm install -g supabase
# Login
supabase login
# Link to your project
supabase link --project-ref your-project-ref
# Push migrations
supabase db pushOption B: Manual Migration
Copy SQL from migration files in supabase/migrations/ and run them in Supabase SQL Editor:
20251208082529_*.sql- Initial schema20251212204627_*.sql- Calendar shares20251212205225_*.sql- Task updates20251227105113_*.sql- Notifications20251229000000_add_task_deadline.sql- Task deadlines20251229000000_fix_shared_task_policies.sql- RLS fixes20251229120000_add_deadline_to_tasks.sql- Deadline indices
This creates tables: profiles, tasks, shared_tasks, calendars, calendar_events, calendar_shares, notifications
If using AI chat features:
# Add secrets in Supabase Dashboard → Edge Functions → Secrets
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
OPENAI_API_KEY=your-openai-key
# Deploy functions
supabase functions deploy ai-assistant
supabase functions deploy send-share-notificationnpm run devFrontend available at: http://localhost:8080
Part 2: Backend Setup (Calendar & Task Agents) : https://github.com/rupeshv2121/AI_agent_service
cd calender-agent-service# Windows
python -m venv venv
venv\Scripts\activate
# Linux/Mac
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtThis installs FastAPI, LangGraph, LangChain, Groq SDK, Google APIs, and more.
A. Enable API in Google Cloud
- Go to https://console.cloud.google.com/
- Create new project (e.g., "Amulate Calendar")
- APIs & Services → Library
- Search "Google Calendar API" → Enable
B. Create OAuth 2.0 Credentials
- APIs & Services → Credentials
- Create Credentials → OAuth client ID
- Configure consent screen if needed:
- User Type: External
- Add your email as test user
- Scopes:
https://www.googleapis.com/auth/calendar
- Application type: Desktop app
- Download JSON
- Save as
client_secret.jsonincalender-agent-service/
C. Verify client_secret.json Format
Ensure redirect URIs include:
{
"installed": {
"redirect_uris": [
"http://localhost:8000",
"urn:ietf:wg:oauth:2.0:oob"
]
}
}Create .env file in calender-agent-service/:
# Groq API Key (required for AI agents)
GROQ_API_KEY=your-groq-api-key
# Server Configuration
PORT=8000
HOST=0.0.0.0
# Optional: OpenAI (alternative LLM)
OPENAI_API_KEY=your-openai-keyGet Groq API Key:
- https://console.groq.com/
- Sign up/Login
- API Keys → Create API Key
- Copy to
.env
python app_langgraph.py- Browser opens automatically
- Sign in with Google account
- Grant calendar permissions
- Authorization complete
- Token saved to
token_calender_v3.pickle
python app_langgraph.pyBackend available at: http://localhost:8000
Verify:
curl http://localhost:8000/healthShould return:
{"status": "healthy"}Navigate to http://localhost:8080 to see:
- Intro Animation: Animated BMW logo reveal with glowing effects
- Hero Section: BMW presentation with interactive elements
- AI Demo Section: Preview of AI assistant capabilities
- Features Section: Overview of key features
- Navigation: Access to Auth and BMW showcase
- Click "Sign In" in navigation
- Create account or sign in with email
- Verify email (check Supabase Auth settings)
- Redirected to Dashboard
Dashboard has 4 tabs:
- Tasks - Task management
- Calendars - Google Calendar integration
- Shared - Items shared with you (Under Maintenance)
- AI Chat - AI assistant (Chat & Agent modes)
Manual Creation:
- Go to Tasks tab
- Click "+" button
- Fill in:
- Title (required)
- Priority: Low/Medium/High
- Category
- Estimated time (optional)
- Deadline (optional)
- Click "Add Task"
AI-Powered Creation:
- Click sparkle icon (⚡)
- Type natural language:
- "Schedule 2-hour coding session"
- "Add urgent task: Fix auth bug"
- "Create task to review docs by Friday"
- AI extracts priority, category, time, and deadline
- Review and save
Voice Input:
- Click microphone icon in task input
- Speak your task
- Works in both manual and AI modes
- Complete: Click checkbox
- Delete: Click trash icon
- View details: See priority, category, time estimate
- Urgency indicators:
- 🚨 Red badge: < 6 hours until deadline
- ⏰ Orange badge: 6-24 hours remaining
- ⏱️ Yellow badge: 1-3 days remaining
- Select a task
- Click share icon
- Enter recipient's email
- Recipient receives notification
- Task appears in their "Shared" tab
- Go to Calendars tab
- See all your Google calendars
- Events displayed with:
- Title
- Date & time
- Location (if set)
- Calendar name
Via AI Chat (Agent Mode):
- Go to AI Chat tab
- Select "Agent" mode (Cpu icon)
- Type commands like:
- "Schedule meeting tomorrow at 2pm"
- "Show my events for next week"
- "Create event: Team sync on Friday 3pm"
- Agent uses LangGraph + Google Calendar API
- Click refresh icon in calendar view
- Real-time sync with Google Calendar
The AI Chat has 2 modes (switch via tabs):
-
Chat Mode (💬 MessageSquare icon) (Under Maintenance)
- General productivity assistant
- Uses OpenAI GPT via Supabase Edge Function
- Best for: Questions, advice, general tasks
-
Agent Mode (🤖 Cpu icon)
- Calendar & task management
- Uses LangGraph + Groq (Llama 3.1)
- Understands calendar intents
- Can create/modify calendar events
- Natural language task parsing
- Type message in input box
- Optional: Attach files (images, PDFs, text)
- Optional: Use voice input (microphone icon)
- Send message
- Watch streaming response (character-by-character)
Supported Features:
- 📎 File attachments (images, documents)
- 🎙️ Voice input
- 📝 Markdown responses
- ⚡ Streaming text
- 🔄 Conversation history
Agent Mode (Calendar):
- "Create meeting with Sarah tomorrow at 10am"
- "Show my schedule for today"
- "Add event: Dentist appointment Friday 2pm"
- "List all my calendars"
Chat Mode (General):
- "Help me prioritize my tasks"
- "Explain SOLID principles"
- "How do I improve productivity?"
Task Intent (both modes):
- "Add task: Review pull requests"
- "Schedule 30min coding session"
- "Remind me to call John by 5pm"
View tasks and calendars shared with you:
- Go to "Shared" tab
- Two sub-tabs:
- Tasks: Tasks assigned to you
- Calendars: Calendars you have access to
- Real-time updates via Supabase Realtime
- See who shared each item
- Complete shared tasks (updates for everyone)
- Click user icon in dashboard header
- View/edit profile
- Manage account settings
- Sign out
File: tailwind.config.ts
// Customize colors
theme: {
extend: {
colors: {
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
// Add custom BMW colors
bmw: {
blue: "#1C69D4",
black: "#000000",
white: "#FFFFFF",
}
}
}
}File: vite.config.ts
export default defineConfig({
server: {
port: 8080, // Change port
host: "::", // Listen on all interfaces
proxy: { // Add API proxy
'/api': {
target: 'http://localhost:8000',
changeOrigin: true,
}
}
},
build: {
outDir: 'dist', // Output directory
sourcemap: true, // Generate sourcemaps
}
});File: calender-agent-service/state.py
class GraphState(TypedDict):
messages: Annotated[Sequence[BaseMessage], add_messages]
intent: str # Detected intent
action: str # Action to perform
calendar_name: str # Target calendar
# Add custom fields as neededFile: calender-agent-service/graph.py
# Change LLM model
llm = ChatGroq(
model="mixtral-8x7b-32768", # or "llama-3.1-70b-versatile"
temperature=0.7, # Creativity (0-1)
max_tokens=4096, # Response length
)File: app_langgraph.py
# CORS configuration
app.add_middleware(
CORSMiddleware,
allow_origins=["http://localhost:8080"], # Add production URLs
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)Base URL: http://localhost:8000 (development)
GET /healthResponse:
{
"status": "healthy"
}POST /calendar
Content-Type: application/jsonRequest:
{
"message": "Schedule meeting tomorrow at 2pm",
"thread_id": "optional-uuid",
"history": [
{"role": "user", "content": "previous message"},
{"role": "assistant", "content": "previous response"}
],
"user_decision": null
}Response:
{
"response": "✅ Meeting scheduled for Dec 29, 2025 at 2:00 PM",
"thread_id": "conversation-uuid",
"state": {
"intent": "calendar_management",
"action": "create_event",
"calendar_name": "Primary",
"error": null
},
"debug_info": {
"processing_time_ms": 1234
}
}Supported Actions:
create_event- Create calendar eventlist_events- Retrieve eventsupdate_event- Modify eventdelete_event- Remove eventlist_calendars- Get all calendarscreate_calendar- Create new calendar
GET /calendarsResponse:
{
"success": true,
"calendars": [
{
"id": "primary",
"name": "My Calendar",
"description": "Primary calendar",
"accessRole": "owner",
"primary": true
}
]
}GET /events/{calendar_id}?timeMin=2025-01-01T00:00:00Z&timeMax=2025-12-31T23:59:59ZResponse:
{
"success": true,
"events": [
{
"id": "event-id",
"summary": "Team Meeting",
"start": {"dateTime": "2025-01-15T10:00:00Z"},
"end": {"dateTime": "2025-01-15T11:00:00Z"},
"location": "Conference Room A"
}
]
}Base URL: http://localhost:8000 (development)
POST /api/task-agent/parse
Content-Type: application/jsonRequest:
{
"message": "Schedule 2-hour coding session by Friday",
"existing_tasks": []
}Response:
{
"conversational_response": "Task created successfully!",
"parsed_task": {
"title": "Coding session",
"priority": "medium",
"category": "Work",
"duration": "2 hours",
"estimated_time": "2h",
"deadline": "2025-12-29T23:59:59Z"
},
"context": "Task scheduling",
"estimated_effort": "2 hours"
}POST /api/task-agent/summarize
Content-Type: application/jsonRequest:
[
{
"title": "Review code",
"priority": "high",
"category": "Work"
}
]Response:
{
"summary": "You have 1 high-priority task...",
"task_count": 1,
"breakdown": {
"high": 1
}
}CREATE TABLE tasks (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id UUID REFERENCES auth.users(id) ON DELETE CASCADE,
title TEXT NOT NULL,
priority TEXT CHECK (priority IN ('low', 'medium', 'high')),
category TEXT,
completed BOOLEAN DEFAULT false,
estimated_time TEXT,
deadline TIMESTAMPTZ,
reminder_sent BOOLEAN DEFAULT false,
created_at TIMESTAMPTZ DEFAULT now(),
updated_at TIMESTAMPTZ DEFAULT now()
);
CREATE INDEX idx_tasks_user_id ON tasks(user_id);
CREATE INDEX idx_tasks_deadline ON tasks(deadline) WHERE deadline IS NOT NULL;
CREATE INDEX idx_tasks_upcoming_deadlines ON tasks(user_id, deadline, completed)
WHERE deadline IS NOT NULL AND completed = false;CREATE TABLE shared_tasks (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
task_id UUID REFERENCES tasks(id) ON DELETE CASCADE,
shared_by UUID REFERENCES auth.users(id) ON DELETE CASCADE,
shared_with UUID REFERENCES auth.users(id) ON DELETE CASCADE,
created_at TIMESTAMPTZ DEFAULT now()
);- Users can view/modify only their own tasks
- Users can view tasks shared with them
- Task sharing requires explicit permission
Amulate-BMW-Group/
├── src/
│ ├── pages/ # Route pages
│ ├── components/ # React components
│ │ ├── dashboard/ # Dashboard components
│ │ └── ui/ # shadcn/ui primitives
│ ├── integrations/ # API integrations
│ ├── hooks/ # Custom React hooks
│ └── lib/ # Utilities
├── supabase/
│ ├── migrations/ # Database migrations
│ └── functions/ # Edge functions
└── public/ # Static assets
calender-agent-service/ # Python backend
├── app_langgraph.py # FastAPI server
├── graph.py # LangGraph workflow
├── nodes.py # Agent logic
├── calendar_tools.py # Calendar operations
└── google_apis.py # Google API client
// src/components/MyFeature.tsx
import { Button } from "@/components/ui/button";
import { useAuth } from "@/hooks/useAuth";
export const MyFeature = () => {
const { user } = useAuth();
return (
<div>
<h2>My Feature</h2>
<Button>Click Me</Button>
</div>
);
};# calender-agent-service/app_langgraph.py
@app.post("/api/my-feature")
async def my_feature(data: dict):
"""Custom endpoint"""
result = process_data(data)
return {"success": True, "result": result}// Use TypeScript types
interface TaskProps {
title: string;
priority: "low" | "medium" | "high";
onComplete: () => void;
}
// Use functional components with hooks
export const TaskItem = ({ title, priority, onComplete }: TaskProps) => {
const [isLoading, setIsLoading] = useState(false);
return (
<Button onClick={onComplete} disabled={isLoading}>
{title}
</Button>
);
};# Use type hints
from typing import Optional
from datetime import datetime
def create_event(
title: str,
start_time: datetime,
end_time: datetime,
calendar_id: Optional[str] = None
) -> dict:
"""Create calendar event.
Args:
title: Event title
start_time: Start datetime
end_time: End datetime
calendar_id: Optional calendar ID
Returns:
Created event details
"""
pass- React DevTools: Inspect components
- Console:
console.log(),console.table() - Network Tab: Monitor API calls
- FastAPI Docs: Visit
http://localhost:8000/docs - Logging: Use
loggingmodule - Debugger:
breakpoint()orpdb.set_trace()
│ │ │ └── Profile │ └── Profile Settings
#### Backend Service Architecture
Calendar Agent Service │ ├── app_langgraph.py (FastAPI server) │ ├── /health (Health check) │ ├── /calendar (Main endpoint) │ └── CORS middleware │ ├── graph.py (LangGraph workflow) │ ├── classify_node │ ├── calendar_node │ ├── reformulate_node │ └── general_node │ ├── nodes.py (Node implementations) │ ├── IntentClassifier │ ├── CalendarManager │ └── ResponseGenerator │ ├── calendar_tools.py (Google Calendar operations) │ ├── create_event() │ ├── list_events() │ ├── update_event() │ ├── delete_event() │ └── create_calendar() │ ├── google_apis.py (OAuth & API client) │ └── create_service() │ └── state.py (State management) └── GraphState (TypedDict)
### Adding New Features
#### Example: Add New Calendar View
1. **Create Component**:
```typescript
// src/components/dashboard/WeeklyView.tsx
import { useState } from 'react';
export const WeeklyView = () => {
const [weekStart, setWeekStart] = useState(new Date());
return (
<div className="weekly-calendar">
{/* Implementation */}
</div>
);
};
- Add to Dashboard:
// src/pages/Dashboard.tsx
import { WeeklyView } from '@/components/dashboard/WeeklyView';
// Add to tabs
<Tabs>
<TabsList>
<TabsTrigger value="weekly">Weekly</TabsTrigger>
</TabsList>
<TabsContent value="weekly">
<WeeklyView />
</TabsContent>
</Tabs>- Update Types (if needed):
// src/types/calendar.ts
export interface WeekView {
startDate: Date;
endDate: Date;
events: Event[];
}// ✅ Good
interface Props {
userId: string;
onComplete: () => void;
}
export const TaskItem = ({ userId, onComplete }: Props) => {
const [isLoading, setIsLoading] = useState(false);
const handleClick = async () => {
setIsLoading(true);
await completeTask(userId);
onComplete();
setIsLoading(false);
};
return <Button onClick={handleClick} disabled={isLoading} />;
};
// ❌ Bad - no types, unclear naming
export const Item = ({ id, cb }) => {
const [loading, setLoading] = useState(false);
// ...
};# ✅ Good
from typing import List, Optional
from datetime import datetime
def create_event(
title: str,
start_time: datetime,
end_time: datetime,
calendar_id: Optional[str] = None
) -> dict:
"""Create a calendar event.
Args:
title: Event title
start_time: Event start datetime
end_time: Event end datetime
calendar_id: Optional calendar ID (uses primary if None)
Returns:
dict: Created event details
"""
# Implementation
pass
# ❌ Bad - no types, no docstring
def create_event(title, start, end, cal=None):
pass// src/components/__tests__/TaskItem.test.tsx
import { render, screen, fireEvent } from '@testing-library/react';
import { TaskItem } from '../TaskItem';
describe('TaskItem', () => {
it('renders task title', () => {
render(<TaskItem title="Test Task" status="todo" />);
expect(screen.getByText('Test Task')).toBeInTheDocument();
});
it('calls onComplete when checkbox clicked', () => {
const onComplete = jest.fn();
render(<TaskItem title="Test" onComplete={onComplete} />);
fireEvent.click(screen.getByRole('checkbox'));
expect(onComplete).toHaveBeenCalledTimes(1);
});
});# tests/test_calendar_tools.py
import pytest
from calendar_tools import create_event
from datetime import datetime, timedelta
def test_create_event():
"""Test event creation"""
start = datetime.now()
end = start + timedelta(hours=1)
event = create_event(
title="Test Meeting",
start_time=start,
end_time=end
)
assert event["summary"] == "Test Meeting"
assert "id" in event-
React DevTools:
- Install Chrome extension
- Inspect component props/state
- Track re-renders
-
Console Logging:
console.log('User data:', user);
console.table(tasks); // For arrays
console.error('API Error:', error);- Network Tab:
- Monitor API calls
- Check request/response
- Verify headers
-
FastAPI Docs:
- Visit
http://localhost:8000/docs - Interactive API testing
- See request/response schemas
- Visit
-
Python Debugger:
import pdb; pdb.set_trace() # Breakpoint
# or
breakpoint() # Python 3.7+- Logging:
import logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
logger.debug("Processing request: %s", request_data)
logger.error("Failed to create event", exc_info=True)Problem: Module not found errors
Solution:
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm installProblem: Supabase authentication not working
Solution:
- Verify
.envhas correct keys - Check Supabase project is active
- Verify email confirmation in Auth settings
- Clear browser localStorage
Problem: Calendar not syncing
Solution:
- Check backend is running:
http://localhost:8000/health - Verify
VITE_CALENDAR_AGENT_URLin.env - Check browser console for errors
- Ensure Google Calendar token is valid
Problem: ModuleNotFoundError in Python
Solution:
# Activate virtual environment
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
# Reinstall dependencies
pip install -r requirements.txtProblem: Task deadlines not saving
Solution:
# Apply database migrations
cd Amulate-BMW-Group
supabase db push
# Verify in Supabase Dashboard → Database → MigrationsProblem: Shared tasks not working
Solution:
- Run RLS policy fix migration
- Check Supabase logs for policy errors
- Verify shared_tasks table exists
Problem: Google Calendar unauthorized
Solution:
# Delete token and re-authorize
rm token_calender_v3.pickle
python app_langgraph.py
# Complete authorization flowProblem: GROQ_API_KEY not found
Solution:
# Verify .env file
cat .env # Linux/Mac
type .env # Windows
# Ensure format:
GROQ_API_KEY=gsk_...# Find process using port 8000 (Windows)
netstat -ano | findstr :8000
taskkill /PID <pid> /F
# Linux/Mac
lsof -ti:8000 | xargs kill -9Update app_langgraph.py:
allow_origins=[
"http://localhost:8080",
"http://localhost:5173", # Vite default
"https://your-production-domain.com"
]- Check Supabase project status
- Verify API keys in
.env - Check network/firewall
- Try restarting Supabase project
This project is for educational and demonstration purposes.
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
For issues and questions:
- Check Troubleshooting section
- Review API Documentation
- Check backend logs for errors
Built with ❤️ using React, TypeScript, Python, LangGraph, and Supabase