Skip to content

Xoshbin/Mini-NotebookLM

Repository files navigation

Notebook LM with Gemini 2.5

Your personal research assistant. Upload documents and ask questions powered by Gemini 2.5. This is an open-source, self-hosted alternative to Google's NotebookLM.

Project Story

This project started as a personal experiment to solve a specific problem: translating technical accounting documents from English to Kurdish (Sorani) while preserving markdown formatting. The initial approach was to use Retrieval-Augmented Generation (RAG) by providing source documents as context to a language model.

As development progressed, the application's capabilities grew. The core functionality of grounding a model's responses in user-provided source documents felt very similar to Google's NotebookLM. Inspired by this, the project's scope expanded to become a more general-purpose, notebook-style research assistant, incorporating features like notebook management, customizable system prompts, and a multi-file RAG pipeline.

Features

  • Notebook Organization: Create, manage, and delete multiple notebooks to keep your research projects separate.
  • Source Grounding (RAG): Upload your own documents (.md, .yml, .txt) to be used as a source of truth for the AI's responses.
  • Gemini 2.5 Powered: Leverages the powerful and efficient gemini-2.5-flash model for fast and accurate responses.
  • Rich Chat Interface: Interact with your sources through a clean and intuitive chat UI.
  • Customizable Personas: Tailor the AI's behavior with customizable system prompts and a library of useful templates (e.g., Technical Explainer, Creative Brainstormer, Code Reviewer).
  • Markdown Support: Both input and output are rendered as markdown, preserving formatting for code blocks, lists, and more.
  • Persistent Storage: All your notebooks, source files, and chat histories are saved locally in your browser's localStorage.
  • Standalone & Private: Runs entirely in your browser. Your data is never sent to any server besides Google's AI services.

Getting Started

API Key Setup

This application requires a Google Gemini API key to function. You can get one from Google AI Studio.

There are two ways to provide your API key:

  1. (Recommended for Devs) Environment Variable: For local development, you can set the API_KEY environment variable. The application will automatically pick it up. This is the most secure method and takes precedence over any key set in the UI. How you set this depends on your development server (e.g., using a .env file with Vite or Create React App).

  2. In-App UI: If the environment variable is not set, the application will prompt you to enter your API key when you first launch it. This key is saved securely in your browser's localStorage and will be used for subsequent sessions. You can change the key at any time:

    • On the "My Notebooks" screen, click the "Manage API Key" button.
    • Inside a notebook, open "Settings" (⚙️) to find the API key field.

Running the Application

  1. Clone the repository.
  2. (Optional) Set up your API_KEY environment variable as described above.
  3. Install dependencies and run. (Assuming a standard React/Vite/etc. setup)
    npm install
    npm run dev
  4. If you did not provide an environment variable, the app will ask for your API key.
  5. Create a notebook, upload your source files, and start your research!

File Upload Limits

To ensure optimal performance and avoid API errors:

  • Individual file limit: 10MB per file
  • Total files limit: 50MB total across all source files
  • Supported formats: Text files (.md, .txt, .yml, .yaml), images, and other formats
  • Automatic optimization: Text files are sent as text rather than base64 when possible
  • Model fallback: Automatically tries different Gemini models if one is overloaded

Tech Stack

  • Frontend: React, TypeScript
  • AI: Google Gemini API (@google/genai)
  • Styling: Plain CSS
  • Markdown Rendering: marked

About

With gemini 2.5 pro

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published