Overview
Your Library is the central hub for managing your entire story collection. Browse chronologically, explore patterns, track key moments, and compile stories into NFT books.Smart Organization: Stories grouped by month, with tabs for different views (stories, books, key moments, themes, life areas).
Library Interface
Navigation Tabs (app/library/LibraryPageClient.tsx:493-513)
- All
- Stories
- Books
- Key Moments
- Themes
- Life Areas
Month-by-Month Timeline
- Stories and books grouped by date
- Collapsible month sections
- Current month highlighted with colored dot
- Shows count badges (e.g., “5 stories, 2 books”)
Story Cards
Card Layout (app/library/LibraryPageClient.tsx:877-1016)
Story Card Components
Story Card Components
Top Row:
- 📄 Icon (story) or 📚 (book)
- Title (truncated to 1 line)
- Mood badge (if not neutral)
- Content preview (2 lines)
- Tags (up to 3 shown)
- 👁️ Views count
- ❤️ Likes count
- 🌍 Public / 🔒 Private indicator
- 🔊 Has audio indicator
- 📅 Date (story_date for entries, created_at for books)
- Shadow grows on hover
- Share icon appears
- Slight upward lift animation
Visibility Indicators
| Icon | Meaning | Access |
|---|---|---|
| 🌍 Globe | Public | Visible on social feed, anyone can view |
| 🔒 Lock | Private | Only you can access, requires authentication |
| 🔊 Volume | Has audio | Story includes voice recording |
Search & Filtering
Search Bar (app/library/LibraryPageClient.tsx:478-490)
Filter by Tab
Combine search with tab selection:
- Search in “Themes” tab → filters by theme name
- Search in “Stories” tab → searches only journal entries
- Search in “All” tab → searches everything
Compiling Books
Multi-Select Mode (app/library/LibraryPageClient.tsx:313-396)
Start Compilation
Click Compile Book button in Quick Actions section.What happens:
- Cards enter selection mode
- Checkboxes appear on story cards
- “Cancel” and “Create Book (n)” buttons replace actions
Select Stories
Click story cards to toggle selection:
- ✅ Blue border = selected
- ⬜ Gray border = not selected
- Books are not selectable (only journal entries)
Minimum 2 stories required to create a book.
Create Book Metadata
Click Create Book (n) button. Dialog opens:Required Fields:
- Book Title: Name for your collection
- Description: What this book is about
IPFS Upload
Book metadata uploaded to IPFS via Pinata:
- Returns IPFS hash (e.g.,
QmX...) - Token URI:
ipfs://{hash} - Immutable and permanent
NFT Minting
Smart Contract Interaction:Calls
StoryNFT.mintBook(tokenURI) on Base Sepolia:- Mints ERC-721 NFT to your wallet
- Pays 0.001 ETH mint fee
- You sign transaction in wallet
- NFT appears in your wallet (OpenSea, etc.)
Contract:
0x6D37ebc5... (see lib/contracts.ts for full address)Daily Journal Compilation
Auto-Compile Today's Stories
Auto-Compile Today's Stories
If you record 2+ stories on the same day, a special prompt appears in Profile page:“Daily Recap Available”
- Bundles all today’s stories into one book
- Auto-generates title: “Daily Journal - ”
- One-click compilation
- Perfect for daily journaling habit
Statistics
Quick Stats Cards (app/library/LibraryPageClient.tsx:443-475)
Total Stories
Count of all journal entries (excludes books).
Key Moments
Stories marked as canonical (important milestones).
Books Created
Number of compiled NFT collections.
Months Active
How many months you’ve been journaling.
Activity Insights
Stats are real-time—no caching. Reflect immediate changes after saving stories or creating books.
Patterns & Discovery
Themes View (components/patterns/ThemesView.tsx)
How Themes Work
How Themes Work
AI-Generated Themes:Gemini 2.5 Flash analyzes story content and extracts recurring themes:
- Gratitude
- Challenge & Resilience
- Personal Growth
- Relationships
- Celebration
- Reflection
- Each theme shows story count
- Click to expand and view stories
- Color-coded badges
- Sorted by frequency (most common first)
Life Domains View (components/patterns/DomainsView.tsx)
Domain Classification
Domain Classification
AI categorizes stories into life areas:
- Work & Career: Job, projects, professional growth
- Relationships: Family, friends, romance
- Health & Wellness: Physical health, mental health, fitness
- Finance: Money, investments, financial goals
- Personal Growth: Learning, skills, self-improvement
- Leisure & Hobbies: Travel, entertainment, hobbies
- Spirituality: Faith, meditation, purpose
- Pie chart shows percentage per domain
- Click domain to filter stories
- Helps identify imbalance (e.g., too much work, not enough leisure)
Domain insights powered by
usePatterns hook (app/hooks/usePatterns.ts).Month Grouping Logic
How Stories are Grouped (app/library/LibraryPageClient.tsx:98-145)
Month Grouping Algorithm
Month Grouping Algorithm
Key Dates:
- Stories: Grouped by
story_date(when memory occurred) - Books: Grouped by
created_at(when book was compiled)
- Groups sorted newest month first (descending)
- Within each group, entries sorted by date (descending)
- Current month highlighted with special styling
- All months start expanded
- Click month header to collapse
- State persists in component (not localStorage)
- Refreshing page resets to all expanded
Troubleshooting
Stories not appearing in library
Stories not appearing in library
Possible causes:
- Story is still being saved (wait for toast confirmation)
- Database sync delay
- You’re signed in with different account
- Refresh the page (library fetches on mount)
- Check Profile page—does story count increase?
- Verify you’re signed in (check nav bar for wallet address)
Book compilation fails at minting step
Book compilation fails at minting step
Common issues:
- Insufficient ETH for gas fees
- You rejected transaction in wallet
- Network congestion (Base Sepolia)
- Get testnet ETH from Base Sepolia faucet
- Approve transaction when prompted
- Wait 30 seconds, try again if failed
- Check wallet for “Pending” transactions
Key Moments tab is empty but I have stories
Key Moments tab is empty but I have stories
Why this happens:
- AI analysis not complete yet (takes 5-10 seconds after saving)
- None of your stories marked as canonical
- Analysis failed (check console for errors)
- Wait a minute, refresh library
- Mark stories as canonical manually (coming soon)
- Check browser console for API errors
Search returns no results but I know story exists
Search returns no results but I know story exists
Troubleshooting:
- Check spelling (search is case-insensitive but exact match)
- Try searching single words instead of full phrases
- Clear search and browse manually
- Story might be in different month than expected
Next Steps
Cognitive Insights
Click any story card to see full content, AI insights, and CRE verification.
Share on Social Feed
Make stories public to share with the iStory community.