Skip to content

🎨 Create, edit, and export interactive infographics with a modern drag-and-drop web app. ⚑ Built using Next.js, Tailwind CSS, Radix UI, and Zustand for a seamless user experience. https://nodeeditor.vercel.app/

License

Notifications You must be signed in to change notification settings

sourcecodeRTX/infoed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–ΌοΈ Infographic Editor

License: MIT Next.js Tailwind CSS Radix UI Zustand


✨ Overview

Infographic Editor is a modern, interactive web application for creating, editing, and exporting infographics. It features a drag-and-drop canvas, customizable nodes and edges, context menus, keyboard shortcuts, and export/import functionality. Built with Next.js, Tailwind CSS, Radix UI, and Zustand for state management, it offers a seamless and beautiful user experience.


πŸš€ Features

  • 🎨 Drag-and-Drop Canvas: Easily add, move, and connect nodes.
  • 🟒 Customizable Nodes: Support for different shapes (circle, rectangle, ellipse), colors, and styles.
  • 🧩 Context Menus: Right-click for quick actions on nodes and canvas.
  • ⌨️ Keyboard Shortcuts: Undo, redo, add, and delete nodes with your keyboard.
  • πŸ—‚οΈ Sidebar: Edit node properties and global styles.
  • πŸ“€ Export: Download your infographic as JSON or image (PNG/SVG).
  • πŸ“₯ Import: Load infographics from JSON files.
  • πŸ•ΉοΈ Toolbar: Undo/redo, fit view, and center canvas controls.
  • πŸŒ— Theme Support: Light and dark mode with theme switcher.
  • 🧩 Radix UI Components: Accessible, beautiful UI elements.


πŸ—οΈ Project Structure

β”œβ”€β”€ app/                  # Next.js app directory
β”‚   β”œβ”€β”€ globals.css       # Global styles
β”‚   β”œβ”€β”€ layout.tsx        # App layout
β”‚   └── page.tsx          # Main page
β”œβ”€β”€ components/           # UI and editor components
β”‚   β”œβ”€β”€ infographic-editor.tsx  # Main editor logic
β”‚   β”œβ”€β”€ canvas.tsx        # Canvas rendering
β”‚   β”œβ”€β”€ custom-node.tsx   # Node rendering
β”‚   β”œβ”€β”€ context-menu.tsx  # Context menu logic
β”‚   β”œβ”€β”€ sidebar.tsx       # Sidebar for node/global editing
β”‚   β”œβ”€β”€ toolbar.tsx       # Toolbar controls
β”‚   └── ui/               # Radix UI-based components
β”œβ”€β”€ hooks/                # Custom React hooks
β”‚   β”œβ”€β”€ use-infographic-store.ts # Zustand store
β”‚   β”œβ”€β”€ use-keyboard-shortcuts.ts
β”‚   └── use-toast.ts
β”œβ”€β”€ lib/                  # Utility functions
β”‚   β”œβ”€β”€ export-utils.ts   # Export/import helpers
β”‚   β”œβ”€β”€ graph-utils.ts    # Node/edge helpers
β”‚   └── utils.ts          # Misc utilities
β”œβ”€β”€ public/               # Static assets (images, video)
β”œβ”€β”€ styles/               # Additional styles
β”œβ”€β”€ types/                # TypeScript types
β”‚   └── graph.ts          # Node/edge types
β”œβ”€β”€ package.json          # Project metadata & scripts
└── ...

πŸ› οΈ Getting Started

1. Clone the Repository

git clone https://github.com/your-username/infographic-editor.git
cd infographic-editor_2

2. Install Dependencies

pnpm install

3. Run the Development Server

pnpm dev

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


πŸ“ Usage

  • Add Nodes: Click the canvas or use the sidebar to add root nodes.
  • Edit Nodes: Select a node to edit its label, shape, and styles in the sidebar.
  • Connect Nodes: Drag from one node's handle to another.
  • Context Menu: Right-click nodes or canvas for quick actions.
  • Export/Import: Use the sidebar to export as JSON/image or import from JSON.
  • Undo/Redo: Use toolbar buttons or keyboard shortcuts (Ctrl+Z / Ctrl+Y).

⌨️ Keyboard Shortcuts

Shortcut Action
Ctrl + Z Undo
Ctrl + Y Redo
Delete Delete Node
N Add Node
B Toggle Sidebar

πŸ§‘β€πŸ’» Technologies Used


πŸ“¦ Scripts

Command Description
pnpm dev Start development server
pnpm build Build for production
pnpm start Start production server
pnpm lint Lint code

πŸ“ Where to Place the Demo GIF

  • Place your demo GIF file (e.g., demo.gif) in the public/ directory.

  • Reference it in the README using:

    <img src="/demo.gif" alt="Demo GIF" width="100%" />

πŸ“„ License

This project is licensed under the MIT License.


πŸ™ Acknowledgements


πŸ’‘ Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.


πŸ“¬ Contact

For questions or feedback, please open an issue or contact the maintainer.

About

🎨 Create, edit, and export interactive infographics with a modern drag-and-drop web app. ⚑ Built using Next.js, Tailwind CSS, Radix UI, and Zustand for a seamless user experience. https://nodeeditor.vercel.app/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published