Built in 3 days at Developer Camp 2025
Dewey is a cutting-edge book recommendation platform that helps users discover their next great read through intelligent, real-time recommendations powered by Gray Whale AI. Track your reading journey, manage your personal library, and get lightning-fast book suggestions tailored to your interests and reading behavior.
Experience Dewey's intelligent book recommendations, linger tracking, and seamless library management in action
- Real-time AI-powered suggestions using Gray Whale API
- Behavioral learning through advanced linger tracking
- Search-driven discovery with natural language queries
- Infinite scroll for seamless browsing experience
- Track reading status (Want to Read, Currently Reading, Read)
- Personal collection with easy book management
- Next.js 15 with React 19 - Modern React framework with latest features
- TypeScript - Type-safe development
- Tailwind CSS 4 - Utility-first styling
- Custom Hooks - Reusable logic for recommendations and library management
- Python - API exploration and experimentation
- Gray Whale AI - Foundational AI model designed for privacy, transparency & speed
- RESTful Architecture - Clean, scalable API design
- UUID - Session and user identification
- Intersection Observer API - Advanced linger tracking
- Local Storage - Client-side library persistence
ui/
โโโ app/
โ โโโ components/ # Reusable UI components
โ โโโ hooks/ # Custom React hooks
โ โ โโโ useRecommendations.ts # Main recommendation logic
โ โ โโโ useLingerTracking.ts # Behavioral tracking
โ โ โโโ libHooks.ts # Library management
โ โโโ services/ # API communication
โ โโโ types/ # TypeScript definitions
โ โโโ lib/ # Library page
test_api/
โโโ src/
โ โโโ feed_api.py # GreyWhale API integration
โ โโโ item_api.py # Item management
โ โโโ model_api.py # Data models
โโโ dataset/ # Sample data
โโโ main.py # API orchestration
- Node.js 18+
- Python 3.8+
- Gray Whale AI API access token
-
Navigate to the UI directory
cd ui -
Install dependencies
npm install
-
Set up environment variables
# Create .env.local file NEXT_PUBLIC_API_URL=http://localhost:8000 NEXT_PUBLIC_PROJECT_NAME=dewey NEXT_PUBLIC_API_TOKEN=your_gray_whale_token -
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:3000
-
Navigate to the API directory
cd test_api -
Set up environment variables
# Create .env file or set environment variables export PROJECT_NAME=dewey export ACCESS_TOKEN=your_gray_whale_token export USER=your_username export PASS=your_password
-
Install Python dependencies
pip install requests uuid
-
Run the API
python main.py
- Each user gets a unique session ID
- Gray Whale AI generates initial recommendations using their foundational model
- Real-time updates based on user interactions
- Intersection Observer tracks which books users view
- Time-based metrics measure engagement (minimum 100ms)
- Behavioral data sent to Gray Whale for improved recommendations
- Enter count tracks repeated views of the same book
- Natural language processing through Gray Whale
- Context-aware results that understand intent
- Real-time refinement based on search history
- Local storage for instant access
- Three reading states: Want to Read, Reading, Read
- Easy status transitions with visual feedback
- Manages recommendation fetching and state
- Integrates linger tracking data
- Handles infinite scroll and pagination
- Converts Gray Whale API responses to frontend models
- Tracks user engagement with book cards
- Uses Intersection Observer for accurate viewport detection
- Generates behavioral events for Gray Whale API
- Optimized for performance with minimal overhead
- Handles all Gray Whale API communication
- Manages authentication and error handling
- Formats requests and responses
- Supports both live and mock data modes
The linger tracking system is a sophisticated behavioral analysis tool that:
- Monitors viewport intersection at 50% visibility threshold
- Tracks multiple metrics: total time viewed, enter count, session data
- Sends intelligent events to Gray Whale for recommendation improvement
- Resets appropriately on new searches to maintain relevance
- Session-based personalization with UUID generation
- Event-driven updates using linger data
- Batch loading with configurable page sizes
- Error handling with graceful fallbacks
Built in just 3 days during Developer Camp 2025, Dewey showcases:
- Rapid prototyping with modern web technologies
- AI integration using Gray Whale's powerful foundational AI model
- Advanced UX patterns like linger tracking and infinite scroll
- Full-stack development from API to polished frontend
- Mobile-first design with responsive layouts
- User authentication and persistent profiles
- Social features - share and discuss books
- Reading analytics and progress tracking
- Book reviews and rating system
- Advanced filtering by genre, author, publication date
- Offline reading lists with sync capabilities
This project was built during a hackathon, but we welcome contributions! Feel free to:
- Fork the repository
- Create a feature branch
- Make your improvements
- Submit a pull request
Built with โค๏ธ during Developer Camp 2025. Open source and available for learning and improvement.
- Gray Whale AI - AI developer ecosystem providing foundational models for privacy, transparency & speed
- Developer Camp - Three-day hackathon and community event fostering innovation worldwide
Dewey - Discover your next great read with the power of AI ๐โจ
