Highlight AI

Highlight AI

AI-Powered Reading Assistant with Notion Integration

Demo Link: Link
Github Repo Url: Link

The Challenge

Digital readers face challenges in efficiently processing and retaining information from online content. Traditional note-taking methods are time-consuming and disconnected from modern knowledge management systems. Users need a seamless way to capture, understand, and organize important information while reading online.

The Solution

I created Highlight AI, a sophisticated Chrome extension that transforms the online reading experience. By combining AI-powered text analysis with seamless Notion integration, users can instantly summarize, explain, and save important content. The extension features real-time processing, offline support, and intelligent text analysis, making it an indispensable tool for researchers, students, and professionals who need to efficiently process and organize digital content.

Tech Mastery Showcase

PythonPython

Powers the backend API with FastAPI framework, handling AI processing and integration services.

JavaScriptJavaScript

Used for the Chrome extension's core functionality and interactive features.

FastAPIFastAPI

Provides a high-performance, async-capable API backend for processing requests.

SupabaseSupabase

Manages user data and highlights storage with real-time capabilities.

Notion APINotion API

Enables seamless integration for saving and organizing highlights in Notion workspaces.

Innovative Logic & Implementation

AI-Powered Text Processing

Implemented advanced text processing using Together AI's language models for generating summaries and explanations. The system processes text in real-time while maintaining context and accuracy.

1async def summarize_text(self, text: str, max_length: int = 200) -> str:
2    try:
3        response = client.chat.completions.create(
4            model="mistralai/Mixtral-8x7B-Instruct-v0.1",
5            messages=[
6                {"role": "system", "content": system_prompt},
7                {"role": "user", "content": user_prompt}
8            ],
9            max_tokens=max_length
10        )
11        return response.choices[0].message.content.strip()
12    except Exception as e:
13        return "Failed to generate summary."

Seamless Notion Integration

Developed a robust Notion integration system that handles OAuth authentication and provides reliable saving of highlights with proper formatting and organization.

1async def save_to_notion(highlight: Highlight, notion_token: str):
2    page_data = create_page_data(highlight)
3    response = await notion_client.pages.create(
4        parent={"database_id": database_id},
5        properties=page_data
6    )
7    return response

Overcoming Challenges

Real-Time Text Processing Performance

Ensuring fast and reliable text processing for various content lengths while maintaining quality.

Solution:

Implemented efficient caching mechanisms and optimized API calls to reduce latency. Used streaming responses and progressive loading to improve perceived performance.

Offline Functionality

Maintaining functionality when users lose internet connectivity.

Solution:

Developed a robust offline storage system using Chrome's storage API and implemented background sync to ensure highlights are preserved and synchronized when connectivity is restored.

Cross-Origin Security

Managing secure communication between the extension and various web pages.

Solution:

Implemented strict content security policies and proper message passing between content scripts and background workers while ensuring data privacy.

Key Learnings & Growth

  • 🚀

    Mastered Chrome Extension development best practices and security considerations

  • 🚀

    Gained expertise in implementing OAuth flows and handling third-party API integrations

  • 🚀

    Developed deep understanding of natural language processing and AI model optimization

  • 🚀

    Learned effective strategies for managing offline-first applications

  • 🚀

    Improved skills in creating intuitive UIs for complex functionality