A Next.js application for writing markdown files with AI assistance, built with Shadcn UI components and Monaco Editor.
- Three-Panel Layout: Similar to Cursor IDE with navigation, editor, and AI composer panels
- Customizable Interface: Hide/show panels to focus on writing or use fullscreen mode
- Resizable Right Panel: Drag panel divider to adjust the width of the AI composer panel
- Monaco Editor Integration: Powerful code editor with syntax highlighting, auto-completion, and more
- Markdown Editing: Write and preview markdown content with formatting tools
- Version History: Track changes with version history and compare different versions with diff view
- Document Comparison: Compare any two documents side-by-side with diff highlighting
- AI Assistance: Get help from AI models for writing, editing, and brainstorming
- Multiple LLM Providers: Configure different AI providers (OpenAI, Anthropic, Google, Mistral, etc.)
- Document Management: Create, edit, and organize markdown documents
- Dark/Light Mode: Toggle between dark and light themes for both the app and editor
- Auto-Save: Automatically saves your work after a period of inactivity
- Keyboard Shortcuts: Familiar shortcuts like Ctrl+S for saving and Alt+1/2 for toggling panels
- Next.js: React framework for building the application
- TypeScript: Type-safe JavaScript
- Tailwind CSS: Utility-first CSS framework
- Shadcn UI: High-quality UI components built with Radix UI and Tailwind
- Monaco Editor: The code editor that powers VS Code, with diff view capabilities
- React Markdown: Markdown rendering
- Zustand: State management
- LangChain: Framework for working with language models
- Node.js 18+ and npm
-
Clone the repository:
git clone https://github.com/yourusername/markdown-writing-app.git cd markdown-writing-app
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
- Navigation Panel (Left): Browse and select documents
- Click the comparison mode button to select two documents for comparison
- Use checkboxes to select documents for comparison
- Fixed width panel that can be hidden/shown
- Editor Panel (Middle): Write and edit markdown content with Monaco Editor
- Use the formatting toolbar for common markdown elements
- Switch between Edit and Preview modes
- Use keyboard shortcuts (Ctrl+S to save, etc.)
- Export your markdown files
- Access version history and compare changes
- AI Composer Panel (Right): Interact with AI to get writing assistance
- Resize by dragging the panel divider
- Hide/show using the panel toggle button
- Panel Management:
- Toggle panels with the header buttons or keyboard shortcuts
- Resize the right panel by dragging the divider
- Enter fullscreen mode to hide both side panels
- Settings: Configure LLM providers and API keys
The app includes powerful document comparison features:
- Compare Documents: Select two documents in comparison mode to see differences
- Compare Versions: Compare different versions of the same document
- Side-by-Side View: See differences highlighted in a side-by-side view
- Restore Options: Easily restore either version from the comparison view
- Word-Level Diffs: See precise word-level differences between documents
The app includes several keyboard shortcuts for improved productivity:
- Alt+1: Toggle the left panel (document navigation)
- Alt+2: Toggle the right panel (AI composer)
- Alt+3: Toggle both panels
- Alt+0: Show both panels
- Alt+F: Toggle fullscreen mode (hide/show both panels)
- Ctrl+S: Save the current document
- Various editor shortcuts: All Monaco Editor keyboard shortcuts are available
The app includes a powerful version history system:
- Automatic Versioning: Manual saves create new versions automatically
- Version Comparison: Compare any version with the current document using a side-by-side diff view
- Version Restoration: Easily restore previous versions of your documents
- Version Notes: Add descriptive notes to your versions for better organization
To use the AI features, you'll need to configure your LLM provider:
- Click the Settings button in the navigation panel
- Select your preferred LLM provider
- Enter your API key
- Select the model you want to use
- Save your settings
This project is licensed under the MIT License - see the LICENSE file for details.