Plothole is an AI-powered narrative architecture tool designed for novelists, world-builders, and screenwriters. It transforms raw manuscripts and research material into a living, interconnected encyclopedia of your narrative universe.
A deep-integrated Gemini-powered terminal that understands your entire story. Use it to scan manuscripts for plot holes, generate character biographies, or synthesize complex lore based on your research.
A unified, spreadsheet-style explorer for all narrative entities. Plothole standardizes your data using industry-standard formats:
- Characters: Standardized to Schema.org/Person.
- Timeline Events: Powered by ISO-8601 and Schema.org/Event.
- Lore & Codex: Organized via SKOS (Simple Knowledge Organization System).
- Research Sources: Cataloged with Dublin Core (DCMI) and BibTeX.
- Relationships: Mapped using JSON Graph Format (JGF) and RDF Triples.
A GeoJSON-powered mapping engine that supports both real-world OpenStreetMap integration and custom fantasy maps. Includes "Smart Portals" for instant navigation between distant story hubs (e.g., jumping from Los Angeles to London).
A dual-mode writing environment:
- Stream View: A chronological feed for rapid-fire idea capture.
- Prose View: A professional, block-based rich text editor powered by Tiptap, featuring automatic saving and semantic grounding.
A specialized ingestion pipeline that pairs raw source files (PDFs, Images, TXT) with:
index.json: Machine-readable metadata.extracted.md: Clean, AI-processed Markdown transcripts.
- Frontend: React 19, TypeScript, Tailwind CSS
- State & Routing: React Router 7, React Flow (@xyflow/react)
- Editor: Tiptap (ProseMirror)
- Database Search: Fuse.js (Fuzzy Matching)
- Maps: Leaflet & OpenStreetMap
- Intelligence: Google Gemini GenAI SDK
- Auth: Clerk (Identity & Session Management)
- Backend: Node.js, Express, tsx
- Versioning: simple-git (Automated story versioning)
- Node.js (Latest LTS recommended)
- A Google AI Studio API Key
- A Clerk account for authentication
-
Clone the repository:
git clone https://github.com/alittler/Plothole.git cd Plothole -
Install dependencies:
npm install
-
Environment Setup: Create a
.envfile in the root directory:VITE_CLERK_PUBLISHABLE_KEY=your_clerk_key CLERK_SECRET_KEY=your_clerk_secret GEMINI_API_KEY=your_gemini_key
-
Run for development:
npm run dev
├── src/
│ ├── components/
│ │ ├── Views/ # Page-level components (Atlas, Entity Explorer, Notepad)
│ │ ├── Layout/ # Sidebar, Navigation
│ │ └── ui/ # Reusable widgets (Map, Editor, Graph)
│ ├── services/ # AI logic, Storage, Git integration
│ ├── utils/ # Calendar engines, Citation formatters
│ └── types.ts # Unified Type definitions
├── server.ts # Express backend for storage & PDF processing
├── public/ # Static assets & generated license manifest
└── source/ # Server-side repository for project sidecars
This project is licensed under the MIT License. See the LICENSE file for the full text.
Plothole relies on several incredible open-source projects. A comprehensive manifest of all dependencies and their licenses can be found in THIRD-PARTY-NOTICES.txt.