Skip to content

tjonesy10/knowledge-app

Repository files navigation

Knowledge - Personal Knowledge Management System

A local-first personal notes app with bi-directional linking, inspired by Linear's clean design aesthetic.

Knowledge App TypeScript License

Features

✅ Phase 1 & 2 Complete

  • Local-First Architecture - All data stored in browser IndexedDB (zero backend, instant performance)
  • Bi-Directional Linking - Wiki-style [[links]] with automatic backlink tracking
  • Real-Time Updates - UI automatically refreshes when notes change
  • Linear-Inspired Design - Dark-first, high contrast, minimal aesthetic
  • Auto-Save - Changes saved automatically with debouncing
  • Interactive Links - Click [[links]] to navigate between notes
  • Backlinks Sidebar - See all notes linking to the current note

🚧 Upcoming Phases

  • Phase 3: Search & Navigation (Fuse.js fuzzy search, command palette with ⌘K)
  • Phase 4: Design Polish (animations, empty states, responsive design)
  • Phase 5: Graph Visualization (React Flow network graph)

Tech Stack

  • Framework: Next.js 15 (App Router)
  • Database: IndexedDB via Dexie.js
  • Editor: Lexical (Meta's extensible editor framework)
  • UI: Tailwind CSS v4 with custom design system
  • Icons: Lucide React

Architecture Highlights

Local-First Design

All data lives in the browser's IndexedDB. Benefits:

  • Zero latency - No network requests
  • Privacy - Notes never leave your device
  • Offline-first - Works without internet
  • Free hosting - Deploy as static site
  • Future-proof - Easy to add cloud sync later

Bi-Directional Linking

When Note A links to Note B using [[Note B]]:

  • Note A's linkedNoteIds array includes Note B's ID
  • Note B's backlinkNoteIds array includes Note A's ID
  • Both arrays update automatically
  • Enables instant backlink queries without scanning all notes

Design System

Linear-inspired color palette:

  • Deep black background (#0A0A0A)
  • High contrast white text (#FFFFFF)
  • Subtle borders (#2C2C30)
  • Purple-blue accent (#5E6AD2)
  • 200-300ms smooth transitions

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/YOUR_USERNAME/knowledge-app.git
cd knowledge-app

# Install dependencies
npm install

# Start development server
npm run dev

Open http://localhost:3000 in your browser.

Usage

  1. Create a note - Click "New Note" button
  2. Write content - Start typing (auto-saves every 1 second)
  3. Link notes - Type [[Note Title]] to create a link
  4. Navigate - Click on wiki links to jump between notes
  5. View backlinks - See which notes link to the current note in the sidebar

Project Structure

knowledge-app/
├── app/                       # Next.js App Router
│   ├── page.tsx               # Home (note list)
│   └── notes/[id]/page.tsx    # Note detail page
├── components/
│   ├── editor/
│   │   ├── NoteEditor.tsx     # Lexical editor wrapper
│   │   ├── WikiLinkNode.tsx   # Custom link node
│   │   └── WikiLinkPlugin.tsx # Link parser/renderer
│   ├── notes/
│   │   ├── NoteList.tsx       # Note grid
│   │   └── NoteCard.tsx       # Note preview card
│   └── ui/
│       └── Button.tsx         # Reusable button
├── lib/
│   ├── db/
│   │   ├── index.ts           # Dexie instance
│   │   ├── schema.ts          # TypeScript types
│   │   └── operations.ts      # CRUD functions
│   ├── linking/
│   │   └── parser.ts          # Wiki link parsing
│   └── utils.ts               # Utility functions
└── hooks/
    └── useNotes.ts            # React hooks for database

Development Roadmap

Phase 1: Foundation ✅

  • Next.js project setup
  • IndexedDB with Dexie
  • Basic CRUD operations
  • Note list and editor

Phase 2: Bi-directional Linking ✅

  • Lexical editor integration
  • Custom WikiLinkNode
  • Link parsing and tracking
  • Backlinks display

Phase 3: Search & Navigation 🚧

  • Fuse.js fuzzy search
  • Command palette (⌘K)
  • Wiki link autocomplete
  • Keyboard shortcuts

Phase 4: Design Polish 🚧

  • Framer Motion animations
  • Empty states
  • Loading skeletons
  • Mobile responsive

Phase 5: Graph Visualization 🚧

  • React Flow integration
  • Network graph of notes
  • Interactive nodes
  • Zoom/pan controls

Future Enhancements 💡

  • AI-powered link suggestions
  • Auto-tagging
  • Export to Markdown
  • Optional cloud sync
  • Daily notes feature
  • Note templates

Performance

  • Initial load: < 1s (static site)
  • Note creation: < 50ms
  • Search: < 100ms (100+ notes)
  • Auto-save: 1s debounce
  • Database size: ~50MB - 1GB per browser (IndexedDB quota)

Browser Support

  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 14+

Requires IndexedDB support

Contributing

Contributions welcome! Please open an issue or PR.

License

MIT

Acknowledgments


Built with Claude Code 🤖

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors