Canvas to calendar, carefully coordinated.
An intelligent study planning platform that seamlessly integrates Canvas LMS with Google Calendar, powered by AI to help students optimize their study schedules and stay on top of assignments.
- Canvas Integration: Automatically fetch and sync your Canvas assignments
- AI Study Planning: Generate personalized study schedules using Google Gemini 2.5
- Smart Scheduling: AI breaks down assignments into manageable tasks with optimal time allocation
- Calendar Sync: One-click export to Google Calendar with automated event creation
- Priority Management: Visual indicators for urgent assignments and upcoming deadlines
- Real-time Updates: Refresh assignments and regenerate plans on demand
- Task Breakdown: AI automatically splits complex assignments into actionable subtasks
- Time Estimation: Smart duration prediction based on assignment type and complexity
- Buffer Time: Configurable buffer days before deadlines to reduce stress
- Pomodoro Support: Study sessions optimized for focus and productivity
- Weekend Options: Flexible scheduling including or excluding weekend study time
- Deadline Prioritization: Automatic sorting by urgency and importance
- Modern Dark UI: Sleek, eye-friendly interface optimized for long study sessions
- Responsive Design: Works seamlessly on desktop, tablet, and mobile
- Loading States: Clear feedback with "This may take a minute" indicators
- Error Handling: Graceful error recovery with helpful messages
- Local Storage: Secure credential storage for persistent sessions
- Portal Modals: Properly layered UI components for seamless interaction
- Python 3.8+ - Backend API server
- Node.js 16+ - Frontend development
- Canvas LMS account with API access
- OpenRouter API Key - For AI study plan generation
- Google Cloud account (for Calendar integration)
cd backend
# Install Python dependencies
pip install -r requirements.txt
# Create environment file
cp .env.example .env
# Edit .env and add your API keys:
# - OPENROUTER_API_KEY (required for AI)
# - GOOGLE_CLIENT_ID (for calendar)
# - GOOGLE_CLIENT_SECRET (for calendar)
# - CANVAS_URL and CANVAS_ACCESS_TOKEN (optional, can be set via UI)
# Start the backend server
uvicorn main:app --reloadBackend will run on http://localhost:8000
cd frontend
# Install Node dependencies
npm install
# Create environment file
cp .env.example .env
# (Default settings should work for local development)
# Start the frontend
npm run devFrontend will run on http://localhost:5173
-
Open the app: Navigate to http://localhost:5173
-
Connect Canvas:
- Click "Connect Canvas"
- Enter your institution's Canvas URL (e.g.,
https://yourschool.instructure.com) - Enter your Canvas API token (How to get token)
-
Connect Google Calendar (Optional):
- Follow GOOGLE_OAUTH_SETUP.md to configure OAuth
- Click "Connect Google Calendar"
- Grant permissions in Google consent screen
-
Generate Study Plan:
- Click "Refresh Assignments" to fetch from Canvas
- Review your assignments
- Click "Generate Study Plan" for AI-powered scheduling
- Click "Complete Plan" to add events to Google Calendar
SchoolAppProj/
βββ backend/
β βββ main.py # FastAPI application
β βββ canvas_service.py # Canvas LMS integration
β βββ gemini_service.py # Google Gemini AI
β βββ calendar_service.py # Google Calendar integration
β βββ schemas.py # Data models
β βββ config.py # Configuration
β βββ requirements.txt # Python dependencies
β βββ .env # Environment variables (create this)
β
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ services/ # API client
β β βββ styles/ # CSS files
β β βββ App.jsx # Main app
β β βββ main.jsx # Entry point
β βββ package.json
β βββ .env # Frontend config (create this)
β
βββ GOOGLE_OAUTH_SETUP.md # Google Calendar setup guide
βββ README.md # This file
StudyFlow uses OpenRouter to access Google Gemini 2.5 models
- Go to OpenRouter
- Sign up or log in
- Navigate to Keys
- Click "Create Key"
- Copy your API key (starts with
sk-or-v1-) - Add to
.env:OPENROUTER_API_KEY=sk-or-v1-your_key_here
π‘ Why OpenRouter? Provides reliable access to Gemini 2.5 with better token limits and error handling.
Get your Canvas access token to fetch assignments
- Log into your Canvas LMS
- Click your profile β Account β Settings
- Scroll to "Approved Integrations"
- Click "+ New Access Token"
- Set purpose (e.g., "StudyFlow AI")
- Optional: Set expiration date
- Click "Generate Token"
- Copy immediately (shown only once!)
- Add to
.envor enter in UI when connecting
π Canvas Token Guide
Enable calendar sync to automatically add study sessions
See detailed setup guide: GOOGLE_OAUTH_SETUP.md
Quick steps:
- Create project in Google Cloud Console
- Enable Google Calendar API
- Create OAuth 2.0 credentials
- Add authorized redirect URI:
http://localhost:8000/google/auth/callback - Download credentials and add to
.env
- Real-time assignment overview with statistics
- Color-coded priority indicators
- Due date countdown
- Study progress tracking
- AI-powered task breakdown
- Visual timeline
- Customizable preferences
- One-click calendar export
- Secure authentication modal
- Real-time assignment sync
- Course filtering
- Assignment details view
- React 18 - Modern UI library
- Vite - Lightning-fast build tool
- Lucide React - Beautiful icon system
- CSS3 - Custom dark theme with animations
- FastAPI - High-performance Python API
- Uvicorn - ASGI server
- httpx - Async HTTP client
- Python 3.8+ - Backend language
- OpenRouter - AI model gateway
- Google Gemini 2.5 - Study plan generation
- Canvas LMS API - Assignment fetching
- Google Calendar API - Event creation
- Google OAuth 2.0 - Secure authentication
Create backend/.env from backend/.env.example:
# Application Settings
APP_NAME=Study Planner API
APP_VERSION=1.0.0
APP_HOST=0.0.0.0
APP_PORT=8000
DEBUG=True
# Canvas LMS (Optional - can be set via UI)
CANVAS_URL=https://your-institution.instructure.com/
CANVAS_ACCESS_TOKEN=your_canvas_token_here
# Google Gemini AI (Legacy - now using OpenRouter)
GEMINI_API_KEY=your_gemini_key_here
# OpenRouter Configuration (Required)
OPENROUTER_API_KEY=sk-or-v1-your_key_here
OPENROUTER_MODEL=google/gemini-2.5-flash
# Google OAuth 2.0 (For Calendar Integration)
GOOGLE_CLIENT_ID=your_client_id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-your_secret_here
GOOGLE_REDIRECT_URI=http://localhost:8000/google/auth/callback
# Timezone
TIMEZONE=America/New_York
# CORS Origins (comma-separated)
CORS_ORIGINS=http://localhost:5173,http://localhost:3000Create frontend/.env from frontend/.env.example:
# API Configuration
VITE_API_URL=http://localhost:8000| Method | Endpoint | Description |
|---|---|---|
POST |
/canvas/authenticate |
Authenticate with Canvas using URL and access token |
GET |
/canvas/assignments |
Fetch assignments for authenticated user |
GET |
/canvas/courses |
Get list of user's courses |
| Method | Endpoint | Description |
|---|---|---|
POST |
/study-plan/generate |
Generate AI study plan from assignments |
POST |
/study-plan/complete |
Full pipeline: fetch + generate + add to calendar |
| Method | Endpoint | Description |
|---|---|---|
GET |
/google/auth/url |
Get OAuth authorization URL |
GET |
/google/auth/callback |
OAuth callback handler |
POST |
/calendar/create-events |
Create calendar events from study tasks |
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
API health check |
GET |
/models |
List available OpenRouter models |
Full API Docs: Visit http://localhost:8000/docs when server is running
# Check if port 8000 is in use
lsof -i :8000
# Kill the process if needed
kill -9 <PID>
# Or use a different port
uvicorn main:app --reload --port 8001cd backend
pip install -r requirements.txt --upgrade- Verify
OPENROUTER_API_KEYis set correctly in.env - Check key has credits remaining on OpenRouter dashboard
- Ensure no extra spaces or quotes around the key
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install
# Try different port if 5173 is busy
npm run dev -- --port 3000# Clear Vite cache
rm -rf node_modules/.vite
npm run dev- β
Verify Canvas URL is correct (include
https://) - β Check token hasn't expired
- β Ensure token has appropriate permissions
- β Try generating a new access token
- β Check backend logs for specific error messages
- β Follow GOOGLE_OAUTH_SETUP.md completely
- β
Verify OAuth credentials in backend
.env - β
Check redirect URI matches exactly:
http://localhost:8000/google/auth/callback - β Add yourself as a test user in Google Cloud Console
- β Enable Google Calendar API in Cloud Console
- β Verify Canvas authentication was successful (green indicator)
- β Check you have assignments with due dates in Canvas
- β Open browser console (F12) and check for errors
- β Check backend terminal logs for API errors
- β Try clicking "Refresh Assignments" button
- β Ensure OpenRouter API key is valid
- β Check you have assignments loaded
- β Look for "This may take a minute" - generation can take 30-60 seconds
- β Check backend logs for JSON parsing errors
- β Verify sufficient OpenRouter credits
- β Clear browser cache and reload (Cmd/Ctrl + Shift + R)
- β Check browser console for React Portal errors
- β Verify latest code is deployed
# View backend logs in real-time
cd backend
uvicorn main:app --reload --log-level debug
# Check frontend build
cd frontend
npm run build
# Test API directly
curl http://localhost:8000/
curl http://localhost:8000/modelsStill stuck? Open browser DevTools (F12) β Console tab for detailed error messages
- Connect your GitHub repository
- Select
backendfolder as root - Set environment variables from
.env.example - Update
GOOGLE_REDIRECT_URIto your production URL - Deploy automatically on push
# Create Procfile in backend/
web: uvicorn main:app --host 0.0.0.0 --port $PORTImportant Environment Variables:
- Set all variables from
backend/.env.example - Update
GOOGLE_REDIRECT_URIto production callback URL - Set
CORS_ORIGINSto include your frontend URL - Set
DEBUG=Falsefor production
- Connect GitHub repository
- Select
frontendas root directory - Framework: Vite
- Build command:
npm run build - Output directory:
dist - Add environment variable:
VITE_API_URL=https://your-backend-url.com
# Build settings
Build command: npm run build
Publish directory: distEnvironment Variables:
VITE_API_URL=https://your-backend-api-url.com- Update Google OAuth redirect URIs in Cloud Console
- Update CORS origins in backend
.env - Test Canvas authentication
- Test Google Calendar integration
- Verify API endpoints are accessible
- Check HTTPS is working
- Monitor error logs
StudyFlow/
βββ backend/
β βββ main.py # FastAPI app and routes
β βββ canvas_service.py # Canvas LMS API client
β βββ gemini_service.py # AI study plan generation
β βββ calendar_service.py # Google Calendar integration
β βββ models_service.py # OpenRouter model management
β βββ schemas.py # Pydantic data models
β βββ config.py # App configuration
β βββ requirements.txt # Python dependencies
β βββ .env # Environment variables (gitignored)
β βββ .env.example # Environment template
β
βββ frontend/
β βββ src/
β β βββ components/
β β β βββ Header.jsx # App header with auth
β β β βββ Dashboard.jsx # Main dashboard
β β β βββ CanvasAuth.jsx # Canvas login modal
β β β βββ GoogleAuth.jsx # Google OAuth button
β β β βββ AssignmentList.jsx # Assignment display
β β β βββ StudyPlanView.jsx # Study plan display
β β βββ services/
β β β βββ api.js # API client
β β βββ styles/ # Component CSS files
β β βββ App.jsx # Root component
β β βββ App.css # Global styles
β β βββ main.jsx # Entry point
β βββ index.html # HTML template
β βββ package.json # Node dependencies
β βββ vite.config.js # Vite configuration
β
βββ GOOGLE_OAUTH_SETUP.md # OAuth setup guide
βββ OAUTH_FLOW.md # OAuth flow documentation
βββ README.md # This file
# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm test
# E2E tests (if configured)
npm run test:e2e# Frontend linting
cd frontend
npm run lint
# Backend formatting (if using black)
cd backend
black .
flake8 .- Define route in
backend/main.py - Add business logic in appropriate service file
- Update schemas in
backend/schemas.py - Add API client method in
frontend/src/services/api.js - Update component to use new endpoint
- Create component file in
frontend/src/components/ - Create corresponding CSS in
frontend/src/styles/ - Import and use in parent component
- Update prop types and documentation
We welcome contributions! Here's how you can help:
- π Report bugs - Open an issue with reproduction steps
- π‘ Suggest features - Share your ideas for improvements
- π Improve docs - Help make setup and usage clearer
- π¨ Enhance UI - Contribute design improvements
- π§ͺ Add tests - Increase code coverage and reliability
- π§ Fix issues - Submit PRs for open issues
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Test thoroughly (backend and frontend)
- Commit with clear messages:
git commit -m 'Add amazing feature' - Push to your fork:
git push origin feature/amazing-feature - Open a Pull Request with detailed description
- Follow existing code style
- Add comments for complex logic
- Update documentation for new features
- Test your changes locally
- Keep commits focused and atomic
MIT License - Free to use for educational and personal purposes
See LICENSE file for details.
Check in order:
- π This README - Most common setup steps
- π GOOGLE_OAUTH_SETUP.md - Calendar integration
- π Troubleshooting section - Common problems
- π₯οΈ Backend logs in terminal running
uvicorn - π Browser console (F12) for frontend errors
- π Network tab to see API request/response details
- Backend API Docs:
http://localhost:8000/docs(when running) - OpenRouter Dashboard: Monitor usage and credits
- Canvas API Docs: https://canvas.instructure.com/doc/api/
- Google Calendar API: https://developers.google.com/calendar
Open an issue on GitHub with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Browser/OS information
- Relevant log output
Built for students, by developers who understand the struggle.
StudyFlow was created to solve a real problem: the overwhelming task of managing multiple course assignments, deadlines, and study schedules. By combining Canvas LMS data with AI-powered planning and calendar integration, we've built a tool that helps students:
- π Never miss a deadline - Automatic tracking and reminders
- π§ Study smarter - AI breaks down complex assignments
- β° Optimize time - Intelligent scheduling based on priorities
- π Stay organized - Seamless calendar integration
- πͺ Reduce stress - Buffer time and realistic planning
- Canvas-First: Built specifically for Canvas LMS users
- AI-Powered: Leverages Google Gemini 2.5 for intelligent planning
- Free & Open: No subscriptions, no hidden costs
- Privacy-Focused: Your data stays with you (local storage)
- Modern UX: Beautiful, responsive, dark-mode interface
Built with amazing open-source technologies:
- FastAPI - Modern Python web framework
- React - UI library
- Vite - Frontend build tool
- OpenRouter - AI model access
- Google Gemini - AI study planning
- Lucide Icons - Beautiful icon set
Special thanks to the Canvas API and Google Calendar API teams for excellent documentation.
- Languages: Python, JavaScript, CSS
- Framework: React + FastAPI
- AI Model: Google Gemini 2.5 (via OpenRouter)
- APIs: Canvas LMS, Google Calendar
- Status: β Active Development
Made with β€οΈ and β for students everywhere
Happy studying! πβ¨