This project was developed during my learning journey with Ratatui, building upon the original JSON Editor tutorial from the Ratatui documentation with more useful features to be used as a reference.
- URL Fetching: Fetch JSON data from URLs and merge it into the current dataset (how to use async tasks)
- File Operations: Save your JSON data to a file
- Scrollable Interface: Navigate through large datasets with keyboard scrolling
- Temporary Notifications: Non-intrusive status messages that appear and disappear automatically
- Keyboard-Driven Interface: Full keyboard control for all operations
-
Core Module (
src/core/
)- Tasks: Contains all async operations (URL fetching, file writing)
- Errors: Centralized error handling with custom error types
- Types: Shared type definitions used across the application
-
App Module (
src/app/
)- State Management: Centralized application state
- Enums: All application-specific enumerations
- Handlers: UI-specific event handlers separated from core logic
-
UI Module (
src/ui/
)- Components: Reusable UI components
- Screens: Different application screens
- Notification System: Temporary notification display
- Notifications appear in the top-right corner
- Different types (Success, Error, Info) with distinct colors
- Auto-dismiss after a configurable duration
- Non-blocking UI updates
- Arrow keys for line-by-line navigation
- Page Up/Down for larger jumps
- Home/End for quick navigation
- Visual highlighting of the selected item
- Automatic scrolling to show newly added items
- Custom error types with detailed information
- Proper error propagation through the async chain
- User-friendly error messages through notifications
src/
├── app/
│ ├── enums.rs # Application-specific enumerations
│ ├── handlers.rs # UI event handlers
│ ├── mod.rs # App state and core logic
│ ├── notif.rs # Notification
│ └── types.rs # Type definitions
├── core/
│ ├── errors.rs # Error handling
│ ├── mod.rs # Core module exports
│ └── tasks.rs # Async operations
├── ui/
│ ├── components/ # Reusable UI components
│ ├── screens/ # Application screens
│ └── mod.rs # UI module exports
└── main.rs # Application entry point
- The Ratatui team for the excellent TUI framework
- The original JSON Editor tutorial for providing the foundation