StudyAI is an intelligent, modular iOS study assistant that helps students organize, summarize, and interact with study materials through notes, PDFs, voice recordings, and AI-powered flashcards. It features a custom FastAPI backend and a modern SwiftUI frontend, with all data synced via Firebase.
-
Dashboard Home
Central hub for navigation to all major features: paste note, scan PDF, record voice, flashcards, and more. -
Smart Note Summarization
Summarize your notes using a locally hosted NLP backend (BART model). -
PDF Upload & Scan
Import PDF files, extract text, and generate AI summaries from scanned notes. -
Voice Note Recording & Transcription
Record voice notes, transcribe them, and generate AI summaries + flashcards. -
Paste Note
Paste text to quickly create and summarize notes. -
AI Summaries with Multiple Styles
Choose from short, medium, detailed, or academic-style summaries. -
Flashcard Generation, Review, and Management
-
Generate flashcards from notes or pasted text using AI.
-
Manually create, edit, and delete flashcard sets and cards.
-
Review flashcards with a modern, flip-card UI.
-
All flashcard data is synced with Firestore for persistence and cross-device access.
-
Export & Share Notes as PDF
Export your notes as PDF for sharing or offline use. -
Profile Management
View and edit your user profile. -
Settings & Preferences
Manage your account, log out, and view app version. -
Secure Auth & Data Sync
Uses Firebase Authentication and Firestore to securely store user data, notes, summaries, and flashcards. -
Local Persistence
Uses Core Data for local caching and offline support. -
Custom Theming & UI
Consistent, beautiful theming and custom UI components throughout the app. -
Modular, Maintainable Codebase
Utility extensions and reusable components for rapid development.
*Import and extract notes from PDFs to be summarized*
Voice recording and transcription feature
git clone https://github.com/shulabhb/StudyAI.git
cd StudyAIcd StudyAI_Backend
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
# Set your Firebase credentials
export GOOGLE_APPLICATION_CREDENTIALS=path/to/your/serviceAccountKey.json
# Run the server (default port 8000)
uvicorn main:app --reload --port 8000The backend will run on http://127.0.0.1:8000.
- Open
StudyAI_Frontend.AI/Study.AI/Study_AI.xcodeprojin Xcode. - Set your Bundle ID and add your
GoogleService-Info.plistfor Firebase. - Build and run on a simulator or real iOS device.
StudyAI/ │ ├── StudyAI_Backend/ # FastAPI-based backend │ ├── main.py │ ├── firebase.py │ ├── requirements.txt │ ├── render.yaml │ ├── serviceAccountKey.json │ ├── models/ │ │ ├── flashcard.py │ │ └── note.py │ ├── services/ │ │ ├── flashcard_service.py │ │ ├── summarizer_service.py │ │ ├── pdf_parser.py │ │ └── parser.py │ └── utils/ │ ├── auto_google_creds.py │ └── storage.py │ ├── StudyAI_Frontend.AI/ │ └── Study.AI/ │ ├── APIConfig.swift │ ├── AppDelegate.swift │ ├── AppState.swift │ ├── ContentView.swift │ ├── CreateFlashcardSetView.swift │ ├── CreateFlashcardView.swift │ ├── DashboardView.swift │ ├── Data+Multipart.swift │ ├── EditCardsSheet.swift │ ├── EditFlashcardSheet.swift │ ├── EditNoteView.swift │ ├── Extensions.swift │ ├── FlashCardView.swift │ ├── FlashcardCardView.swift │ ├── FlashcardEditSheet.swift │ ├── FlashcardGenerateVM.swift │ ├── FlashcardGeneratorView.swift │ ├── FlashcardModels.swift │ ├── FlashcardPasteNoteView.swift │ ├── FlashcardReviewVM.swift │ ├── FlashcardSelectNoteView.swift │ ├── FlashcardService.swift │ ├── GoogleService-Info.plist │ ├── LoadingView.swift │ ├── LoginView.swift │ ├── MainTabView.swift │ ├── Note.swift │ ├── NoteService.swift │ ├── PasteNoteView.swift │ ├── Persistence.swift │ ├── ProfileView.swift │ ├── RecordView.swift │ ├── RoundedButton.swift │ ├── SavedFlashcardReviewView.swift │ ├── SavedFlashcardSetsView.swift │ ├── ScanView.swift │ ├── SettingsView.swift │ ├── SignupView.swift │ ├── Study_AI.entitlements │ ├── Study_AIApp.swift │ ├── Summary.swift │ ├── SummaryService.swift │ ├── SummaryView.swift │ ├── Theme.swift │ ├── WelcomeView.swift │ └── Assets.xcassets/ │ └── Study_AI.xcdatamodeld/ │ └── README.md
- Email/Password authentication
- Google Sign-In integration
- User profile management
users/{userId}
{
"email": "string",
"displayName": "string",
"createdAt": "timestamp",
"lastLogin": "timestamp",
"preferences": {
"summaryStyle": "string",
"theme": "string"
}
}users/{userId}/notes/{noteId}
{
"name": "string", // Note title
"content": "string", // Full note text
"source": "string", // e.g. "text", "pdf", "voice"
"createdAt": "timestamp",
"noteId": "string"
}- Used as an embedded object in a flashcard set.
{
"id": "string", // Unique flashcard ID
"question": "string", // Flashcard question
"answer": "string" // Flashcard answer
}users/{userId}/flashcardSets/{setId}
{
"id": "string", // Set ID
"name": "string", // Set name
"userId": "string", // Owner user ID
"noteId": "string|null", // Linked note ID (if any)
"noteTitle": "string|null", // Linked note title (if any)
"flashcards": [ // Array of flashcard objects
{
"id": "string",
"question": "string",
"answer": "string"
}
],
"createdAt": "timestamp"
}- Not stored in Firestore, but returned by the backend for detail views.
{
"success": true,
"id": "string",
"name": "string",
"noteId": "string|null",
"noteTitle": "string|null",
"flashcards": [
{
"id": "string",
"question": "string",
"answer": "string"
}
],
"createdAt": "timestamp"
}- Each set contains an array of flashcard objects (question, answer, id).
- Sets are linked to notes if generated from a note, or can be standalone.
- All flashcard CRUD operations are performed at the set level.
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Welcome message (health check) |
| POST | /summarize_text |
Summarize a note (JSON body: content, user_id, title, source) |
| POST | /summarize_raw |
Summarize raw text (form-data: content, user_id, title, etc.) |
| POST | /upload_pdf |
Upload a PDF, extract text, and summarize |
| POST | /upload_images |
Upload images, extract text, and summarize |
| DELETE | /delete_summary/{user_id}/{summary_id} |
Delete a summary and its note |
| POST | /generate_flashcards |
Generate flashcards from content (AI-powered) |
| POST | /create_flashcard_set |
Create a flashcard set manually (with a list of flashcards) |
| GET | /flashcard_sets/{user_id} |
Get all flashcard sets for a user |
| GET | /flashcard_set/{user_id}/{set_id} |
Get a specific flashcard set |
| PUT | /flashcard_set/{user_id}/{set_id} |
Update a flashcard set with new flashcards |
| DELETE | /flashcard_set/{user_id}/{set_id} |
Delete a flashcard set |
- All endpoints above are implemented and documented.
- Modular code:
main.py,firebase.py,models/,services/,utils/ - Features: Summarization (text, PDF, images), flashcard generation/CRUD, Firestore sync
- All major features are modularized:
- Flashcards:
Flashcard*files,SavedFlashcard*,EditCardsSheet,EditFlashcardSheet, etc. - Notes/Summaries:
PasteNoteView,SummaryView,EditNoteView,NoteService,SummaryService - PDF/Scan:
ScanView - Voice/Record:
RecordView - Dashboard & Navigation:
DashboardView,MainTabView,AppState,Study_AIApp,WelcomeView - Profile & Settings:
ProfileView,SettingsView,SignupView,LoginView - Persistence:
Persistence.swift,Study_AI.xcdatamodeld - UI/Theme:
Theme.swift,RoundedButton.swift,LoadingView.swift,Assets.xcassets - Utilities:
Extensions.swift,Data+Multipart.swift, etc.
- Flashcards:
- Features: Dashboard, paste/scan/record notes, summarize, export/share as PDF, full flashcard system, profile, settings, onboarding/auth, local persistence, custom theming, reusable UI
- User, Note, Flashcard, FlashcardSet: All documented above
- Syncs all user data, notes, summaries, and flashcards to Firestore
- No quiz generator, analytics, or collaborative/group features (yet)
- No image OCR endpoint (image upload is for text extraction/summarization only)
- No global search or advanced analytics
- Open the app and log in or sign up (onboarding flow).
- Use the dashboard to:
- Paste text to create and summarize a note
- Scan/upload a PDF and generate a summary
- Record a voice note and generate a summary
- Access flashcards, profile, or settings
- Generate flashcards using AI, or manually create a set.
- Edit, add, or delete flashcards in a set.
- Review flashcards with a flip-card UI.
- Export notes as PDF if needed.
- All changes are synced to Firestore and available across devices.
- The app uses a robust navigation and authentication flow:
- Onboarding (WelcomeView)
- Login/Signup (LoginView, SignupView)
- MainTabView for dashboard, summaries, flashcards, and settings
- AppState.swift manages global state and navigation
- Profile and settings accessible from dashboard and tab bar
- PDF and image OCR support
- Quiz generator based on flashcards
- Collaborative study groups
- Progress tracking and analytics
- Export functionality for notes and summaries
Feel free to fork the repo, make improvements, and submit a pull request. Contributions are welcome!
This project is under the MIT License.
Shulabh Bhattarai







