A Next.js application that transforms academic syllabi into interactive, smart calendars. Upload a PDF or text syllabus and automatically extract assignments, exams, readings, and other important dates into a beautiful calendar interface with Google Calendar synchronization.
- File Upload Support: Upload PDF or text syllabus files via drag-and-drop interface
- Smart Date Extraction: Automatically parse various date formats using chrono-node
- Event Classification: AI-powered categorization of assignments, exams, readings, and other events
- Interactive Calendar: Beautiful calendar views (month, week, day, agenda) using react-big-calendar
- Event Editing: Click-to-edit functionality for all event details
- Multiple Views: Switch between calendar and list views
- Google Calendar Sync: Direct OAuth2 integration for seamless calendar synchronization
- ICS Export: Download calendar files for Outlook, Apple Calendar, and other applications
- AI Enhancement: Optional OpenAI integration for improved event classification
- Responsive Design: Mobile-friendly interface that works on all devices
- Color-coded Events: Visual distinction between different event types
- Frontend: Next.js 14 with TypeScript and Tailwind CSS
- Backend: Next.js API routes
- PDF Parsing: pdf-parse library
- Date Processing: chrono-node for natural language date parsing
- Calendar UI: react-big-calendar with moment.js localizer
- AI Integration: OpenAI API for enhanced classification
- Authentication: Google OAuth2 for calendar sync
- Deployment: Optimized for Vercel
- Node.js 18 or higher
- npm or yarn package manager
- Optional: OpenAI API key for enhanced parsing
- Optional: Google OAuth credentials for calendar sync
git clone <your-repository-url>
cd syllabus-calendar
npm installCreate a .env.local file in the root directory:
cp .env .env.localConfigure the following environment variables:
OPENAI_API_KEY=your_openai_api_key_hereGOOGLE_CLIENT_ID=your_google_client_id_here
GOOGLE_CLIENT_SECRET=your_google_client_secret_here
GOOGLE_REDIRECT_URI=http://localhost:3000/auth/callback
NEXT_PUBLIC_GOOGLE_CLIENT_ID=your_google_client_id_hereNote: The application will work with basic functionality even without API keys, using regex-based parsing and local state management.
If you want Google Calendar integration:
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Calendar API
- Create OAuth 2.0 credentials
- Add authorized redirect URIs:
http://localhost:3000/auth/callback(development)https://yourdomain.com/auth/callback(production)
npm run devOpen http://localhost:3000 in your browser.
npm run build
npm startThis project is optimized for Vercel deployment:
- Push your code to GitHub
- Connect your repository to Vercel
- Set your environment variables in the Vercel dashboard
- Deploy - Vercel will automatically build and deploy your application
The project includes proper configuration for serverless functions and optimized build settings.
I identified that students often struggle to keep track of important dates from their syllabi. Traditional methods involve manual calendar entry, which is time-consuming and error-prone. My solution automates this process while providing flexibility for manual adjustments.
- PDF Parsing: Used pdf-parse to extract text from PDF files
- Text Processing: Implemented text cleaning and normalization
- Date Detection: Leveraged chrono-node for robust natural language date parsing
- Event Classification: Created rule-based classification with optional AI enhancement
I implemented a multi-layered approach:
Layer 1: Rule-based Classification
- Fast, reliable parsing using regex patterns
- Keyword matching for event types (assignment, exam, reading, other)
- Handles common academic terminology and date formats
Layer 2: AI Enhancement (Optional)
- OpenAI GPT-3.5 integration for context-aware classification
- Improves accuracy for ambiguous or complex syllabi
- Graceful fallback to rule-based parsing if AI fails
Layer 3: Post-processing
- Duplicate detection and removal
- Date validation (academic year range filtering)
- Event title extraction and cleanup
- Progressive Enhancement: Core functionality works without any external APIs
- Intuitive Interface: Familiar drag-and-drop upload with clear visual feedback
- Flexible Viewing: Multiple calendar views to suit different preferences
- Easy Editing: Click-to-edit functionality for quick adjustments
- Google Calendar Sync: Full OAuth2 flow for secure calendar integration
- Universal Export: ICS file generation for compatibility with all calendar applications
- Color Coding: Visual distinction between event types for quick recognition
- Server-side PDF processing capabilities
- API routes for secure credential handling
- Excellent performance with static optimization
- Seamless Vercel deployment
- Handles diverse date formats ("March 15", "Week of Sept 10", "3/15/24")
- Robust natural language processing
- Better than regex-only approaches for academic content
- Professional calendar interface
- Multiple view options
- Excellent customization capabilities
- Good mobile responsiveness
- Comprehensive error handling at each parsing stage
- Graceful degradation when APIs are unavailable
- Input validation and sanitization
- Clear user feedback for all error states
- Client-side state management to minimize API calls
- Efficient PDF processing with proper memory management
- Lazy loading of components
- Optimized bundle size with dynamic imports
- File Upload: User uploads PDF or text syllabus
- Text Extraction: Server processes file and extracts raw text
- Date Detection: chrono-node identifies potential dates
- Event Classification: Rule-based + optional AI classification
- Duplicate Removal: Smart deduplication based on dates and content
- Calendar Display: Interactive calendar with editing capabilities
- Export/Sync: Google Calendar integration or ICS download
- Upload your syllabus (PDF or TXT format)
- Review automatically extracted events
- Edit any events by clicking on them
- Switch between calendar and list views
- Export to your preferred calendar application
- Google Calendar Sync: Authorize and sync events directly
- Bulk Editing: Efficient event management interface
- Export Options: Download ICS files for universal compatibility
"No events found"
- Ensure your syllabus contains recognizable dates
- Try different date formats or add year information
- Verify the file uploaded successfully
PDF parsing failures
- Ensure PDF contains extractable text (not scanned images)
- Try converting to TXT format as alternative
- Check file size (recommended <10MB)
Google Calendar sync issues
- Verify OAuth credentials are correctly configured
- Check that redirect URIs match exactly
- Ensure Google Calendar API is enabled
- Recurring Events: Support for "every Monday" type events
- Multi-syllabus Support: Merge calendars from multiple courses
- Smart Notifications: Email/SMS reminders
- Collaboration Features: Share calendars with classmates
- Mobile App: Native iOS/Android applications
MIT License - Feel free to use this project for personal or educational purposes.