Skip to content
/ rutodo Public

A Vim-inspired terminal-based todo list application written in Rust using iocraft for the TUI and SQLite for persistence.

Notifications You must be signed in to change notification settings

esl07/rutodo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RuToDo

RuToDo Main Screen

A Vim-inspired terminal-based todo list application written in Rust using iocraft for the TUI and SQLite for persistence.

Features

  • Vim-like modal interface
  • Persistent storage using SQLite
  • Terminal-based user interface
  • CRUD operations for tasks
  • Status tracking for tasks (Pending/Completed)

Screenshots

Normal Mode

Normal Mode

Insert Mode

Insert Mode

Complete Mode

Complete Mode

Usage

The application has different modes similar to Vim:

  • Normal Mode: Default mode for navigation

    • i: Enter Insert mode
    • a: Enter Insert mode (clear input)
    • c: Enter Complete mode
    • u: Enter Update mode
    • d: Enter Delete mode
  • Insert Mode: For adding new tasks

    • Esc: Return to Normal mode
    • Enter: Save new task
  • Complete Mode: For marking tasks as completed

    • Esc: Return to Normal mode
    • Enter: Mark selected task as completed
  • Update Mode: For modifying existing tasks

    • Esc: Return to Normal mode
    • Enter: Confirm update
  • Delete Mode: For removing tasks

    • Esc: Return to Normal mode
    • Enter: Delete selected task

Concepts Learned

Rust Concepts

  • Lifetimes: Understanding and managing references with explicit lifetime annotations
  • Enums: Using enums for state management (EditorMode, TaskStatus)
  • Structs: Implementing data structures with methods and traits
  • Error Handling: Using Result and Option types for robust error handling
  • Pattern Matching: Extensive use of match expressions for mode and event handling

Database Integration

  • Using rusqlite for SQLite database operations
  • CRUD operations implementation
  • Connection management and error handling
  • SQL query execution and result handling

State Management

  • Modal editing system inspired by Vim
  • State transitions between different modes
  • Managing application state with hooks
  • Handling user input and events

UI/TUI Development

  • Terminal-based user interface development
  • Event handling and user input processing
  • Custom component development
  • Layout and styling implementation

Dependencies

  • iocraft: Terminal user interface framework
  • rusqlite: SQLite database integration
  • smol: Async runtime for terminal events

Building

cargo build --release

Running

cargo run

About

A Vim-inspired terminal-based todo list application written in Rust using iocraft for the TUI and SQLite for persistence.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages