Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 2.09 KB

File metadata and controls

64 lines (46 loc) · 2.09 KB

Termi-brary — a simple terminal book logger

Lire en Français   •   Contact   •   Issues

A command-line app to log and track your personal book library, with persistent storage powered by SQLite.

Project Context

After my first JavaScript class (covering OOP and JS basics), I built this project to practice object-oriented programming in a real-world context.

The first challenge I ran into was data persistence, the library wasn't saving between sessions. I solved this by integrating SQLite, which is built into Bun, requiring no extra dependencies.

Features

  • Add books to your library (title, author, read status)
  • View all books in your library with their read status
  • Persistent storage via SQLite — data is retained between sessions
  • Built with OOP principles (Book, Library, User classes)

Requirements

  • Bun (v1.3.* and above)

Getting Started

git clone https://github.com/aaimeraud/termibrary.git

cd termibrary

bun run start

Project Structure

src/
├── main.js              # Entry point
├── classes/
│   ├── Book.js          # Book constructor
│   ├── Library.js       # Library methods (add, display)
│   └── User.js          # User class
├── database/
│   ├── database.js      # SQLite connection
│   └── operations.js    # DB queries (getAllBooks, addBook...)
└── utils/
    └── input.js         # Terminal input helper

AI Usage

I am limiting my use of AI and allowing myself to use it only to :

  • Ask questions when I'm stuck or if I need to ask something specific.
  • Ask if "my code follows the rules and best practices of OOP"
  • Learn the things I haven't seen in class yet.
  • Enhance this readme (I started writing it and then asked Copilot to "make it cleaner").