Focus Buddy is a web app that helps students with ADHD to focus when reading textbooks. It provides an integrated text-to-speech reader that reads aloud textbooks, and highlights the part that is being read, so that student's attention is properly guided, making learning more accessible and engaging.
The app also features an AI Assistant powered by Groq's API, enabling users to interact with and better comprehend their reading material.
- Text-to-speech functionality for textbooks and documents
- PDF document support
- Adjustable reading speed and voice settings
- Progress tracking and bookmarking
- Real-time messaging system with AI-powered responses
- Message history with user/assistant differentiation
- Visual loading states during AI processing
- Responsive design for both desktop and mobile views
- Contextual help for better text comprehension
- Clean, modern design
- Two-column layout:
- Left: Text Reader for document display
- Right: AI Assistant for interactive help
- Responsive design that adapts to different screen sizes
- Intuitive controls and navigation
- Frontend: React with TypeScript
- Styling: Tailwind CSS
- PDF Processing: PDF.js (version 3.11.174)
- AI Integration: Groq API
- Clone the repository:
git clone [repository-url]
cd focus-buddy- Install dependencies:
npm install groq lucide-react pdfjs-dist@3.11.174 --legacy-peer-deps- Set up environment variables:
Create a
.env.localfile in the root directory and add:
GROQ_API_KEY=your_api_key_here
- Start the development server:
npm run dev- Node.js 16.x or higher
- Modern web browser with JavaScript enabled
- Internet connection for AI features
-
Upload Documents
-
Text-to-Speech
- Click the play button to start reading
- Adjust speed and voice settings as needed
- Use keyboard shortcuts for control
-
AI Assistant
- Type questions about the text in the chat interface
- Get real-time responses and explanations
- Access reading comprehension help
- Request summaries or clarifications
The application includes comprehensive error handling:
- Network error detection and user feedback
- Graceful fallbacks for API failures
- Loading state management
- Input validation and sanitization
We welcome contributions to Focus Buddy! Please follow these steps:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
For support, please:
- Open an issue in the GitHub repository
- Check our documentation for common issues
- Groq for providing the AI capabilities
- PDF.js contributors