A comprehensive web application that integrates with Google Classroom to provide AI-powered assignment management, deadline notifications, and intelligent study assistance.
- Assignment Dashboard: View all pending, missing, and completed assignments in one centralized location
- Smart Notifications: Get timely email reminders before assignment deadlines
- AI Integration: Powered by Google Gemini for intelligent assignment assistance and study guidance
- Secure Authentication: OAuth 2.0 integration with Google Classroom and Gmail
- Real-time Sync: Automatic polling for new assignments and updates from Google Classroom
- Responsive Design: Access your assignments from any device with a modern, mobile-friendly interface
- Assignment Analytics: Track completion rates and identify patterns in your coursework
- Frontend: Next.js 14 with TypeScript and Tailwind CSS
- Backend: Next.js API Routes
- Authentication: NextAuth.js with Google OAuth 2.0
- APIs: Google Classroom API, Gmail API, Google Gemini AI
- Styling: Tailwind CSS with Lucide React icons
- Type Safety: Full TypeScript implementation
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm or yarn package manager
- A Google Cloud Console account
- A Google Workspace or personal Google account with access to Google Classroom
git clone https://github.com/yourusername/classroom-ai-assistant.git
cd classroom-ai-assistantnpm install
# or
yarn install- Go to Google Cloud Console
- Click "Select a project" → "New Project"
- Enter project name:
classroom-ai-assistant - Click "Create"
Navigate to "APIs & Services" → "Library" and enable:
-
Google Classroom API
- Search for "Google Classroom API"
- Click "Enable"
-
Gmail API
- Search for "Gmail API"
- Click "Enable"
-
Google+ API (for user profile information)
- Search for "Google+ API"
- Click "Enable"
- Go to "APIs & Services" → "OAuth consent screen"
- Choose "External" user type
- Fill in the required fields:
- App name:
Classroom AI Assistant - User support email: Your email
- Developer contact: Your email
- App name:
- Add scopes:
../auth/userinfo.email../auth/userinfo.profile../auth/classroom.courses.readonly../auth/classroom.coursework.me../auth/gmail.send
- Add test users (your Google account email)
- Go to "APIs & Services" → "Credentials"
- Click "Create Credentials" → "OAuth 2.0 Client ID"
- Choose "Web application"
- Name:
Classroom AI Web Client - Add authorized redirect URIs:
http://localhost:3000/api/auth/callback/google- (Add production URLs when deploying)
- Click "Create"
- Save the Client ID and Client Secret - you'll need these for environment variables
- Visit Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Copy the generated API key
- Copy the example environment file:
cp .env.example .env.local- Edit
.env.localwith your actual values:
# Google OAuth Configuration
GOOGLE_CLIENT_ID=your_actual_google_oauth_client_id
GOOGLE_CLIENT_SECRET=your_actual_google_oauth_client_secret
# NextAuth Configuration
NEXTAUTH_SECRET=your_generated_nextauth_secret
NEXTAUTH_URL=http://localhost:3000
# Google AI (Gemini) Configuration
GEMINI_API_KEY=your_actual_gemini_api_keyGenerate NEXTAUTH_SECRET:
openssl rand -base64 32npm run dev
# or
yarn devOpen http://localhost:3000 in your browser.
- Open the application in your browser
- Click "Sign in with Google"
- Grant the required permissions:
- Access to your Google Classroom courses
- Permission to send emails on your behalf
- Basic profile information
- Assignment Overview: View counts of pending, missing, and completed assignments
- Course Integration: Automatically syncs with all your Google Classroom courses
- AI Assistance: Click on any assignment to get AI-powered help and guidance
- Email Notifications: Set up automatic reminders for upcoming deadlines
The application provides several API endpoints:
GET /api/assignments- Fetch all assignments from Google ClassroomPOST /api/send-email- Send assignment reminder emailsPOST /api/ai-assist- Get AI assistance for assignmentsGET/POST /api/auth/[...nextauth]- Authentication handling
- Google Classroom API - For fetching courses and assignments
- Gmail API - For sending notification emails
- Google+ API - For user authentication and profile information
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/classroom.courses.readonly
https://www.googleapis.com/auth/classroom.coursework.me
https://www.googleapis.com/auth/gmail.send
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature-name - Submit a pull request
- Check the Issues page
- Review Google Cloud Console API quotas and limits
- Verify all environment variables are set correctly