A terminal UI manager built in Rust, demonstrating entry-level Rust competency via clean module separation, TDD, and persistent SQLite storage.
- Task list with title, status (TODO/DONE), and creation timestamp
- Toggle tasks complete/incomplete
- Add and delete tasks
- Persistent storage between sessions via SQLite
- Vim-style keyboard navigations
| Crate | Purpose |
|---|---|
ratatui |
TUI rendering |
crossterm |
Async terminal input |
rusqlite |
SQLite persistence (bundled) |
chrono |
Task creation timestamps |
tokio |
Async runtime |
anyhow |
Error propagation |
src/
├── main.rs — terminal setup, event loop, wiring
├── app.rs — pure state machine, no I/O
├── db.rs — SQLite CRUD layer
└── ui.rs — ratatui rendering, no state mutation
Data flow:
crossterm (input) → main.rs → app.rs (mutate state)
→ db.rs (persist)
→ ui.rs (render)
cargo run| Key | Action |
|---|---|
j / ↓ |
Move down |
k / ↑ |
Move up |
a |
Add task |
d |
Delete selected task |
Space |
Toggle selected task done/todo |
q |
Quit |
Enter |
Confirm new task (add mode) |
Esc |
Cancel (add mode) |
cargo test27 tests across app, db, ui, and integration.