A comprehensive Flutter application powered by AI for intelligent student assistance including timetable management, smart note-taking, conversational AI chat, and adaptive flashcard generation.
|
LOGO |
π Dashboard |
π€ AI Chat |
π― Flashcards |
π Timetable |
- π€ AI Chat Assistant - Multi-model AI with 200 daily requests via smart key rotation
- π― Smart Flashcards - AI-generated study cards from your notes and content
- π Course Management - Organized timetable and comprehensive course tracking
- π Intelligent Notes - AI-powered summarization and smart organization
- π Semantic Search - Find information across all your notes instantly
- π Firebase Auth - Email/Password + Google Sign-in integration
- π Secure API Management - Multi-key rotation system for reliability
- π€ User Profiles - Personalized learning experience
- π Cross-Platform - Web, Android, and iOS support
- π± Offline-First - Works without internet, syncs when connected
- πΎ Local Storage - SQLite for reliable offline functionality
- π Smart Notifications - Reminders for classes and study sessions
- β‘ Real-time Sync - Firebase Firestore for instant updates
- State Management: Riverpod for reactive state management
- Navigation: Go Router for declarative routing
- HTTP Client: Dio for API communications
- Local Storage: SQLite with Floor ORM
- Notifications: Flutter Local Notifications
- Authentication: Firebase Auth SDK
- Flutter SDK 3.24+ (Install Guide)
- Firebase CLI (Install Guide)
- Git (Download)
- 4 Free OpenRouter API Keys (Sign up)
-
Clone the Repository
git clone https://github.com/assassinaj602/ai-student-assistant.git cd ai-student-assistant -
Install Dependencies
flutter pub get
-
Environment Setup
# Copy environment template cp .env.template .env # Edit .env with your API keys (see setup guide below)
-
Firebase Configuration
- Follow our Firebase Setup Guide
- Add your
google-services.json(Android) andGoogleService-Info.plist(iOS)
-
Run the App
# Web flutter run -d chrome # Android flutter run -d android # iOS flutter run -d ios
-
Create 4 Free OpenRouter Accounts
- Visit OpenRouter.ai
- Use different email addresses for each account
- Get your free API key from each account (50 requests/day each = 200 total)
-
Configure Environment Variables
# Edit .env file OPENROUTER_API_KEY_1=sk-or-v1-your-first-key-here OPENROUTER_API_KEY_2=sk-or-v1-your-second-key-here OPENROUTER_API_KEY_3=sk-or-v1-your-third-key-here OPENROUTER_API_KEY_4=sk-or-v1-your-fourth-key-here -
Smart Key Rotation System
- Automatic rotation every 45 requests
- Instant failover on rate limits
- Debug logging for monitoring
# Android APK
flutter build apk --release \
--dart-define=OPENROUTER_API_KEY_1=$OPENROUTER_API_KEY_1 \
--dart-define=OPENROUTER_API_KEY_2=$OPENROUTER_API_KEY_2 \
--dart-define=OPENROUTER_API_KEY_3=$OPENROUTER_API_KEY_3 \
--dart-define=OPENROUTER_API_KEY_4=$OPENROUTER_API_KEY_4
# iOS (requires macOS)
flutter build ios --release# Build for web
flutter build web --release \
--dart-define=OPENROUTER_API_KEY_1=$OPENROUTER_API_KEY_1 \
--dart-define=OPENROUTER_API_KEY_2=$OPENROUTER_API_KEY_2 \
--dart-define=OPENROUTER_API_KEY_3=$OPENROUTER_API_KEY_3 \
--dart-define=OPENROUTER_API_KEY_4=$OPENROUTER_API_KEY_4
# Deploy to Firebase
firebase deploy --only hosting| Document | Description |
|---|---|
| π§ Setup Guide | Complete setup and installation instructions |
| π₯ Firebase Guide | Firebase configuration and deployment |
| π Security Guide | API security and best practices |
| π§ͺ Testing Guide | Testing procedures and validation |
| π Contributing | How to contribute to this project |
| π Changelog | Version history and updates |
// Example: Getting study help from AI
final chatService = ref.read(chatServiceProvider);
final response = await chatService.sendMessage(
"Explain quantum physics in simple terms"
);// Example: Creating flashcards from notes
final flashcardService = ref.read(flashcardServiceProvider);
final flashcards = await flashcardService.generateFromText(
"Your study notes content here"
);We love contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Check existing issues
- Create a new issue with our templates
- π Analytics Dashboard - Learning progress and statistics
- π¨ Theme Customization - Dark/light themes and color schemes
- π Multi-language - Internationalization support
- π± Desktop Apps - Windows, macOS, and Linux support
- π Integration APIs - Google Calendar, Notion, etc.
- π― Advanced AI - Custom model fine-tuning
- π₯ Study Groups - Collaborative learning features
This project is licensed under the MIT License - see the LICENSE file for details.
- Flutter Team for the amazing cross-platform framework
- Firebase for backend infrastructure and hosting
- OpenRouter for AI model access and API services
- Riverpod for state management solution
- Open Source Community for inspiration and tools
β Star this repository if it helped you! β
Made with Flutter π
- Create a Firebase project at https://console.firebase.google.com/
- Enable Authentication (Email/Password + Google)
- Enable Firestore Database
- Download configuration files:
- Android:
google-services.jsonβandroid/app/ - iOS:
GoogleService-Info.plistβios/Runner/
- Android:
dart pub global activate flutterfire_cli
flutterfire configureFlutter:
flutter pub getBackend:
cd backend
npm installStart Backend Server:
cd backend
npm run dev # or: npm start
# Server runs on http://localhost:3000Run Flutter App:
# Web (Chrome)
flutter run -d chrome --dart-define=API_BASE_URL=http://localhost:3000
# Android emulator
flutter run -d emulator-5554 --dart-define=API_BASE_URL=http://10.0.2.2:3000
# Physical device (replace with your LAN IP)
flutter run --dart-define=API_BASE_URL=http://192.168.1.100:3000Notes:
- If you omit
API_BASE_URL, the app will pick a platform-aware default (web/desktop: http://localhost:3000, Android emulator: http://10.0.2.2:3000). - For Flutter web, ensure
CORS_ORIGINSin backend.envincludes your dev URL (e.g., http://localhost:5000).
- Hugging Face API Key: Get from https://huggingface.co/settings/tokens
- Firebase Service Account: Firebase Console β Project Settings β Service Accounts β Generate new private key
- Chat:
microsoft/DialoGPT-medium - Summarization:
facebook/bart-large-cnn - Embeddings:
sentence-transformers/all-MiniLM-L6-v2
- Free tier: 20 AI calls per user per day
- Configurable via
AI_DAILY_QUOTAenvironment variable
ai_student_assistant/
βββ lib/ # Flutter source code
β βββ main.dart # App entry point
β βββ src/
β βββ app.dart # Main app widget
β βββ theme.dart # App theme configuration
β βββ screens/ # UI screens
β βββ providers/ # Riverpod providers
β βββ services/ # Business logic services
β βββ models/ # Data models
βββ backend/ # Node.js backend
β βββ src/server.js # Express server
β βββ routes/ # API routes
β βββ middleware/ # Auth middleware
βββ test/ # Flutter tests
βββ .github/workflows/ # CI/CD configuration
flutter test
flutter test test/widget_test.dartflutter analyze# Android
flutter build apk --release
# iOS
flutter build ios --release
# Web
flutter build web --release-
Firebase Configuration Issues: Ensure
flutterfire configurewas run successfully -
Backend Connection: Check that proxy server is running on the expected port and
API_BASE_URLmatches -
API Rate Limits: Monitor daily quota usage in app settings
-
Offline Sync: Check internet connectivity and Firebase rules
-
Web CORS: If you see CORS errors in the browser, update
CORS_ORIGINSinbackend/.envto include your dev origin, e.g.,http://localhost:5000 -
Authorized Domains (Web Auth): In Firebase Console β Authentication β Settings β Authorized domains, add
localhostand127.0.0.1(and custom dev ports if prompted)
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
flutter test - Submit a pull request
MIT License - see LICENSE file for details




