# ๐ Personal List Markdown Editor
An advanced, feature-rich markdown editor system that allows users to build and curate their own awesome lists with a beautiful, sliding panel UX powered by TipTap and Motion.
## โจ Features
### Core Functionality
- **๐ Push to My List** - Add any repository or resource with one click
- **โ๏ธ Rich Markdown Editor** - Full-featured TipTap editor with slash commands
- **๐๏ธ Live Preview** - See your list as beautiful cards while editing
- **๐ Category Organization** - Auto-organize items by category
- **๐ท๏ธ Tag Support** - Add custom tags to items for better organization
- **๐พ Auto-Save** - LocalStorage persistence, never lose your work
- **๐ค Export** - Download as Markdown or JSON
- **๐ฅ Import** - Import lists from JSON
- **๐จ Split View** - Edit markdown and preview items side-by-side
- **๐ฌ Sliding Panel** - Beautiful, resizable sliding panel interface
### User Experience
**1. Push Button Throughout App**
- Available on every repository card in list detail pages
- One-click action with beautiful toast notifications
- Shows "Added" state with checkmark for already-added items
- Opens customization dialog before adding
**2. Customization Dialog**
- Edit title, description, and URL
- Add repository name
- Select category from predefined list
- Add custom tags (comma-separated)
- Form validation with required fields
**3. Sliding Panel Editor**
- Opens from list detail pages
- Resizable divider (drag to adjust width)
- Smooth animations with Motion
- Close with X button or click "My List" again
- Persists position across sessions
**4. Standalone Page**
- Full-screen editor at `/my-list`
- Access from header navigation with badge showing item count
- Export markdown directly from page
### Editor Modes
**Split View (Default)**
- Left: Rich markdown editor
- Right: Live preview as cards
- Perfect for simultaneous editing and previewing
**Editor Only**
- Full-width markdown editor
- TipTap with all formatting options
- Slash commands for quick formatting
**Preview Only**
- Full-width card view
- See your list as organized categories
- Hover actions on each card
### Editor Features
**Toolbar Actions:**
- ๐ **Editor Mode** - Focus on writing
- ๐ **Split View** - Edit and preview together
- ๐๏ธ **Preview Mode** - See final result
- ๐ **Copy Markdown** - Copy to clipboard
- ๐ **Export Markdown** - Download .md file
- ๐พ **Export JSON** - Download .json file
- ๐ **Import JSON** - Load saved list
- ๐๏ธ **Clear List** - Start fresh (with confirmation)
**Rich Text Formatting:**
- **Bold**, *Italic*, ~Strike~, `Code`
- Headings (H1, H2, H3)
- Bullet lists & Numbered lists
- Task lists with checkboxes
- Blockquotes
- Code blocks with syntax highlighting
- Tables
- Links with custom text
**Slash Commands:**
Type `/` to see available commands:
- `/text` - Plain paragraph
- `/todo` - Task list
- `/h1`, `/h2`, `/h3` - Headings
- `/bullet` - Bullet list
- `/numbered` - Numbered list
- `/quote` - Blockquote
- `/code` - Code block
- `/table` - Insert table
## ๐๏ธ Architecture
### Component Structure
```
components/personal-list/
โโโ sliding-panel.tsx # Resizable panel layout
โโโ personal-list-editor.tsx # Main editor component
โโโ personal-list-items.tsx # Card preview display
โโโ push-to-list-button.tsx # Action button component
lib/
โโโ personal-list-store.ts # Zustand store with persistence
```
### Data Flow
```
User Action โ Store โ LocalStorage โ UI Update
โ
Markdown Generation
```
### State Management
**Zustand Store (`usePersonalListStore`)**
```typescript
interface PersonalListState {
items: PersonalListItem[] // Array of added items
markdown: string // Generated markdown
isEditorOpen: boolean // Sliding panel state
activeView: 'editor' | 'preview' | 'split'
// Actions
addItem: (item) => void
removeItem: (id) => void
updateItem: (id, updates) => void
setMarkdown: (markdown) => void
toggleEditor: () => void
openEditor: () => void
closeEditor: () => void
setActiveView: (view) => void
clearList: () => void
importList: (items) => void
exportList: () => PersonalListItem[]
generateMarkdown: () => string
}
```
**Item Structure:**
```typescript
interface PersonalListItem {
id: string // Auto-generated unique ID
title: string // Display name
description: string // Short description
url: string // Homepage URL
repository?: string // GitHub repo name
addedAt: number // Timestamp
tags?: string[] // Custom tags
category?: string // Organizational category
}
```
### Persistence
**LocalStorage Key:** `personal-awesome-list`
**What's Saved:**
- All items with metadata
- Current markdown content
- Editor open/closed state
- Active view preference (split/editor/preview)
**Version:** 1 (for future migration support)
### Markdown Generation
Automatic markdown generation from items:
```markdown
# My Awesome List
> A curated list of my favorite resources, tools, and projects.
## Contents
- [Category 1](#category-1)
- [Category 2](#category-2)
## Category 1
### [Item Title](https://example.com)
Item description goes here.
**Repository:** `owner/repo`
**Tags:** `tag1`, `tag2`, `tag3`
---
*Generated with [Awesome](https://awesome.com) ๐๐๐*
```
## ๐จ UX Design
### Sliding Panel Behavior
**Opening:**
- Click "My List" button in header
- Click "Push to my list" and then "View List" in toast
- Slides in from right with smooth animation
- Takes 30-70% of screen width (resizable)
**Resizing:**
- Drag the vertical handle to adjust width
- Min width: 30% of screen
- Max width: 70% of screen
- Smooth spring animation
**Closing:**
- Click X button in panel header
- Click "My List" button again in header
- Slides out to right with animation
### Visual Hierarchy
**Main Content Area:**
- Takes remaining space (100% width when closed, 30-70% when open)
- Maintains all functionality
- Keeps scroll position
**Panel:**
- Fixed position on right
- Full height
- Shadow and border for depth
- Blur backdrop on header
### Empty States
**No Items Yet:**
- Centered icon (folder)
- Friendly message
- Clear call-to-action
- Gradient text highlight
**Zero State in Editor:**
- Placeholder text in editor
- Helpful hints about slash commands
- Preview shows empty state
## ๐ Usage Examples
### Adding an Item
```typescript
// From repository card
{items.length} items in list