How joker-qp/crafting works
craFTing is a terminal note vault: users invoke commands to create, browse, search, delete, encrypt, and back up notes. The CLI dispatches note operations to handlers, which initialize storage and use the repository for SQLite access; encrypted-note handlers also call the security layer. Separate language commands update persisted language preferences. JSON import/export is a distinct backup workflow. The source excerpts support these calls and storage paths; broader UI details are documented in the README but are not expanded into separate components.
Main entry points: notes.py Note commands · main_cli.py Typer CLI · connection.py DB connection · repository.py Note repository
Components 12
CLI interface
- Typer CLI
crafting/cli/main_cli.py
Note workflows
- Note commands
crafting/cli/notes.py - Note model
crafting/core/models.py - JSON backup file
Persistence
- Note repository
crafting/db/repository.py - DB connection
crafting/db/connection.py - DB location config
crafting/config.py - SQLite note store
Security and language
- Content encryption
crafting/core/security.py - Language preferences
crafting/core/i18n.py - Language config file
Other components
- Terminal user
Connections 14
- Terminal user → Typer CLI: runs commands
- Typer CLI → Note commands: dispatches notes
- Typer CLI → Language preferences: sets language
- Typer CLI → Language preferences: reads translations
- Note commands → DB connection: initializes DB
- Note commands → Note repository: requests note operations
- Note commands → Content encryption: encrypts or decrypts
- Note commands → Note model: creates notes
- Note repository → Note model: reads and builds
- Note repository → DB connection: opens connection
- DB connection → DB location config: gets DB path
- DB connection → SQLite note store: opens and initializes
- Language preferences → Language config file: reads and writes
- Note commands → JSON backup file: imports or exports JSON