Lire en FranΓ§ais
Β Β β’Β Β
Contact
Β Β β’Β Β
Issues
A command-line app to log and track your personal book library, with persistent storage powered by SQLite.
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.
- 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,Userclasses)
- Bun (v1.3.* and above)
git clone https://github.com/aaimeraud/termibrary.git
cd termibrary
bun run startsrc/
βββ 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
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").