Skip to content

RonielSabala/LibrarySystemCLI

Repository files navigation

Library System CLI

A Python console application designed to streamline the management of library book loans and inventory. It provides an efficient, memory-based system to handle book records, student interactions, and loan lifecycles.


Table of Contents


Installation

Requirements


Install Dependencies

Install uv:

# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

From the repo root:

uv sync

VS Code: open the Command Palette (Ctrl+Shift+P), run Python: Select Interpreter, and choose the .venv created by uv. Reload your terminal afterwards.


Run Locally

From the repo root:

uv run python -m frontend.main

Use Ctrl+C to exit the application at any time.


Project Structure

The project follows a clean structure to separate the business rules from the user interface:

  • backend/domain/: Contains the core data models (Book, Student, Loan) and Enums.
  • backend/services/: Contains the business logic for managing books and loans.
  • backend/repository/: Handles data storage.
  • frontend/: Contains the CLI menus and user interaction logic.
  • data/: Directory where persistent files are stored.

Contributing

Contributions are welcome. Suggested workflow:

  1. Fork the repository.
  2. Create a feature branch: feat/my-change.
  3. Make your changes, ensuring they follow the existing code style.
  4. Include appropriate documentation or tests.
  5. Commit, push, and open a pull request describing the change and the reason for it.

Pre-commit Hooks

This project uses pre-commit to enforce code quality automatically before each commit. Run the following once from the repo root to set it up:

pip install pre-commit
pre-commit install

After that, checks will run automatically on every git commit. To run them manually across all files:

pre-commit run --all-files

License

This project is available under the MIT License.

About

Console application designed to streamline the management of library book loans and inventory.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages