Skip to content

🧩 Architecture

GlyphIt’s architecture is modular and designed around command execution and repository handling.


πŸ—‚οΈ Project Structure

src/
β”œβ”€β”€ main.rs              # Entry point
β”œβ”€β”€ functions/           # CLI command implementations
β”‚   β”œβ”€β”€ add.rs
β”‚   β”œβ”€β”€ commit.rs
β”‚   β”œβ”€β”€ push.rs
β”‚   └── mod.rs
└── types/               # Core types and data structures
    β”œβ”€β”€ commands.rs
    β”œβ”€β”€ repository.rs
    └── mod.rs

βš™οΈ Core Modules

main.rs

  • Parses CLI arguments.
  • Delegates execution to command functions in functions/mod.rs.

functions/

Contains the implementation of the main Git commands: - add.rs β†’ handles staging files. - commit.rs β†’ creates emoji-standardized commits. - push.rs β†’ handles pushing to remote.

types/

Defines data models used across the codebase: - commands.rs β†’ defines enums/structs for command types. - repository.rs β†’ manages local Git repo metadata.


🧱 Design Philosophy

  • Keep logic modular (per command file)
  • Focus on simplicity, not abstraction
  • Avoid unnecessary dependencies