Skip to content

aaimeraud/termibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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").

About

πŸ“š A javascript terminal app to store the books you read or want to read

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors