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