Skip to content

Repository files navigation

Noto

NotebookAI — Next.js + Supabase research workspace. Upload sources, index notebook-scoped chunks, and ask grounded questions with inline citations.

Overview

A research workspace where users create notebooks, upload PDF and text sources, index content into searchable chunks, and ask questions that return grounded answers with inline citations. Supports Gemini and OpenAI LLM providers with automatic fallback routing. Uses Supabase Auth, Postgres with pgvector for semantic retrieval, and BullMQ for async queue processing.

Core Architecture

flowchart LR
    User -->|authenticates| Next["Next.js App Router"]
    Next -->|auth| Supabase["Supabase Auth"]
    Next -->|CRUD| DB[(Postgres + pgvector)]
    Next -->|embeddings| OpenAI["OpenAI Embeddings"]
    Next -->|chat| Router["LLM Router"]
    Router -->|primary| Gemini["Gemini"]
    Router -->|fallback| OpenAI_CHAT["OpenAI"]
    Upload -->|enqueue| Worker["BullMQ Worker"]
    Worker -->|parse| Parser["Parser/Chunker"]
    Worker -->|store| DB
    Next -->|query| DB
Loading

System Components

Component Responsibility
app/ Next.js App Router pages and API routes
components/ Notebook, source, auth UI components
lib/ Auth, database, storage, retrieval, LLM, telemetry helpers
worker/ BullMQ queue workers, parsing and chunking helpers
supabase/ Migrations, seed data, schema definitions
tests/ Unit, integration, and E2E test suites

Repository Layout

Directory Purpose
app/ App Router pages and API routes
components/ React UI components
lib/ Shared utilities
worker/ Background queue processing
supabase/ Database migrations and seed data
tests/ Unit, integration, and E2E tests

Technology Stack

Layer Technology Purpose
Framework Next.js 15 (App Router) Full-stack React framework
Language TypeScript Type safety
Auth Supabase Auth Authentication and sessions
Database Supabase Postgres + pgvector Primary data store and vector search
Storage Supabase Storage Source file storage
Queue BullMQ + Redis Async document processing
LLM Gemini + OpenAI Answer generation and embeddings
Testing Vitest + Playwright Unit and E2E testing

Requirements

  • Node.js 18+
  • npm
  • Supabase account (local or hosted)
  • Redis (for BullMQ worker)

Configuration

File Purpose
.env.example Environment variable template
next.config.ts Next.js configuration
vitest.config.ts Unit test configuration
playwright.config.ts E2E test configuration
supabase/migrations/ Database schema migrations
supabase/seed.sql Local demo fixtures

Getting Started

git clone <repo-url>
cd NotebookAI
npm install
cp .env.example .env.local
# Configure Supabase and API keys in .env.local
supabase start
supabase db reset
npm run dev

Development

npm run dev         # Start Next.js dev server
npm run build       # Production build
npm run lint        # ESLint check
npm run test        # Run Vitest suite
npm run test:e2e    # Run Playwright E2E
npm run worker      # Start BullMQ worker

About

NotebookAI: research workspace with source indexing, semantic search, and grounded Q&A with citations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages