Skip to content

Nainish-Rai/paper_ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

124 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paper AI

Next.js TypeScript React MongoDB License

Open-source AI notes for turning public ChatGPT shares into collaborative, source-grounded documents.

image image

Features

  • Import public ChatGPT share links into editable notes with the original source snapshot preserved.
  • Ask a grounded note agent to summarize, extract action items, draft edits, and answer from the imported note.
  • Edit rich documents with BlockNote and Yjs-backed collaboration through a local PartyKit server.
  • Store users, documents, templates, permissions, and imports in local MongoDB for development.
  • Use local email/password auth with JWT cookies.
  • Keep dashboard state fast with TanStack Query and Zustand.

Tech Stack

  • Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS, shadcn/ui
  • Data: MongoDB Node driver with local MongoDB by default
  • Auth: Local email/password auth with bcrypt and JWT cookies
  • Editor: BlockNote
  • Realtime: PartyKit, y-partykit, Yjs
  • AI: Vercel AI SDK with OpenAI-compatible providers
  • State: TanStack Query, Zustand

Prerequisites

  • Node.js 18+
  • npm
  • Local MongoDB, or a MongoDB URI in LOCAL_MONGODB_URI
  • OpenAI API key for the note agent

On macOS with Homebrew:

brew tap mongodb/brew
brew install mongodb-community@7.0
brew services start mongodb-community@7.0

Local Setup

git clone https://github.com/Nainish-Rai/paper_ai.git
cd paper_ai
npm install --legacy-peer-deps

Create .env.local:

LOCAL_MONGODB_URI=mongodb://127.0.0.1:27017
MONGODB_DB=paper_ai
JWT_SECRET=replace-with-a-local-secret
OPENAI_API_KEY=sk-...
AI_MODEL=gpt-4o-mini
FAST_AI_MODEL=gpt-4o-mini
NEXT_PUBLIC_PARTYKIT_HOST=localhost:1999

For OpenAI-compatible gateways, also set OPENAI_API_BASE_URL and update AI_MODEL / FAST_AI_MODEL to models supported by that gateway.

Run the app and collaboration server:

npm run dev:full

Or run them separately:

npm run dev
npm run dev:collab

Next.js defaults to http://localhost:3000; PartyKit runs on http://localhost:1999.

Manual Flow

  1. Start local MongoDB.
  2. Run npm run dev:full.
  3. Sign up with email/password.
  4. Import a public ChatGPT share from the dashboard.
  5. Open the imported note, edit it, and use the note agent panel.

Build Check

npx tsc --noEmit
npm run build

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors