Overview
The Studley AI library is your personal collection of all generated study materials. Save quizzes, flashcards, study guides, and writing prompts to access them anytime from any device.Accessing Your Library
Saving Content to Library
From Generators
When you generate study materials:Choose Folder (Optional)
Select a folder to organize your content, or leave unassigned for the main library.
From Quiz Results
After completing a quiz:- View your results page
- Click “Save to Library” button
- The quiz is saved with your score, accuracy, and quiz data
- Access it later from the library
API Endpoint
Save to Library:- Endpoint:
POST /api/library/save - Authentication: Required
- Body:
{ title, topic, itemType, content, folderId? } - Response:
{ success: true, item: LibraryItem }
Library Item Types
The library supports four content types:Quiz
- Interactive quizzes with multiple choice questions
- Displays with FileText icon in red
- Route:
/dashboard/view/quiz/[id]
Flashcards
- Flip-card study sets
- Displays with BookOpen icon in red
- Route:
/dashboard/view/flashcards/[id]
Study Guide
- Comprehensive study notes with sections
- Displays with Book icon in red
- Route:
/dashboard/view/notes/[id]
Writing Prompt
- Creative or academic writing prompts
- Displays with Sparkles icon in red
- Route:
/dashboard/view/writing/[id]
Organizing with Folders
Creating Folders
Moving Items to Folders
Folder Features
- Unlimited folders: Create as many as you need
- No nesting: Folders are flat (no subfolders)
- Quick access: Filter library by folder
- Easy reorganization: Move items between folders anytime
Searching Your Library
Search Functionality
View Results
Results appear in a dropdown showing:
- Item title
- Item type (quiz, flashcards, etc.)
- Creation date
Search Features
- Debounced: Waits 300ms after typing to search
- Minimum query: 2 characters required
- Keyboard navigation: Arrow keys to select, Enter to open, Escape to close
- Real-time: Searches your
study_itemsas you type
Search API
Search Endpoint:- Endpoint:
GET /api/sidebar/search?q=query - Parameters:
q(query string, min 2 chars) - Response:
{ results: SearchResult[] }
Filtering Library Items
Use the filter tabs at the top of your library:Filter Options
- All Items: Shows all study materials (default)
- Quizzes: Only quiz items
- Flashcards: Only flashcard sets
- Shared With Me: Content shared by other users (see Sharing section)
Favorites
Marking Favorites
Favorites Section
Favorited items appear in a special section at the top of your library:- Separated from regular items
- Clearly labeled “Favorites”
- Respect active filters (e.g., only favorite quizzes if quiz filter is active)
Unfavoriting
Click the filled star icon again to remove from favorites.Item Actions
Available Actions
For each library item, you can:- Open: Click the card to view/study the content
- Favorite: Star icon to mark as favorite
- Rename: Edit the title directly
- Move to Folder: Organize into folders
- Delete: Permanently remove the item
Renaming Items
Deleting Items
Deleted items cannot be recovered. Make sure you really want to delete before confirming.
Library Statistics
At the top of your library, see an overview:- Total Quizzes: Count of all quiz items
- Total Flashcards: Count of all flashcard sets
- Other stats: Study guides, writing prompts, etc.
Shared Content
Shared With Me View
Content that other users have shared with you appears in a separate view:- Click the “Shared With Me” filter tab
- See all items shared by other users
- View creator name and avatar
- Access the content but cannot edit or delete
Sharing Your Content
Currently, sharing is managed through the database. Future enhancements will include:- Share buttons on each item
- Generate shareable links
- Control who can view your content
Database Schema
study_items table
user_folders table
Row Level Security
RLS policies ensure:- You can only see your own items and folders
- You can only modify your own content
- Shared items are visible but read-only
Client-Side Storage (Public Tools)
For users who aren’t logged in, content is stored in browser localStorage:- Prefix:
quizlix_ - Keys:
quizlix_quizzes,quizlix_flashcards,quizlix_study_guides - Lifespan: Until browser data is cleared
- Migration: Log in to save localStorage items to your account
API Endpoints
Get Library Items
- Endpoint:
GET /api/dashboard/library - Response:
{ items: LibraryItem[] }
Delete Item
- Endpoint:
DELETE /api/dashboard/library/[itemId] - Response:
{ success: true }
Update Item
- Endpoint:
PATCH /api/dashboard/library/[itemId] - Body:
{ title?, folder_id?, is_favorite? } - Response:
{ success: true, item: LibraryItem }
Troubleshooting
Items not appearing?
- Refresh the page to reload data
- Check you’re logged in to the correct account
- Verify the item was saved successfully
Can’t find an item?
- Use the search feature to locate by title
- Check if it’s in a specific folder
- Look in the “All Items” filter view
Folder not showing items?
- Ensure items are assigned to that folder
- Try refreshing the page
- Check folder_id in database matches
Search not working?
- Type at least 2 characters
- Wait for debounce (300ms)
- Check internet connection
- Try exact title match