A simple web application built with Node.js, Express.js, EJS, and PostgreSQL that allows users to search for books, save reading notes, rate books, and manage their personal reading collection.
- 📖 Add books to your collection
- ⭐ Give each book a personal rating
- 📝 Write notes about books
- 🔍 Search books using the Open Library API
- 🖼️ Automatically display book covers
- ✏️ Edit existing book entries
- 🗑️ Delete books from your collection
- 💾 Store data in PostgreSQL
- Node.js
- Express.js
- PostgreSQL
- EJS
- HTML5
- CSS3
- Bootstrap
- Axios
- Body Parser
Book_Notes/
│
├── public/
│ ├── css/
│ └── images/
│
├── views/
│ ├── partials/
│ └── index.ejs
│
├── db.js
├── index.js
├── package.json
├── package-lock.json
└── README.md
git clone https://github.com/amirkiarash/Book_Notes.gitMove into the project folder
cd Book_NotesInstall dependencies
npm installCreate a PostgreSQL database.
Example:
CREATE DATABASE book_notes;Create the required table.
CREATE TABLE books (
id SERIAL PRIMARY KEY,
title TEXT,
author TEXT,
isbn VARCHAR(20),
rating INTEGER,
notes TEXT
);Update your PostgreSQL credentials inside db.js.
Example:
const db = new pg.Client({
user: "postgres",
host: "localhost",
database: "book_notes",
password: "your_password",
port: 5432,
});npm startor
node index.jsIf you have Nodemon installed:
nodemon index.jsThe application will be available at
http://localhost:3000
This project uses the Open Library API to search for books and display book covers.
Documentation:
https://openlibrary.org/developers/api
Cover API:
https://covers.openlibrary.org/b/isbn/{ISBN}-L.jpg
{
"axios": "^1.x",
"body-parser": "^2.x",
"ejs": "^3.x",
"express": "^5.x",
"pg": "^8.x"
}Amir Mohammadi
GitHub: https://github.com/amirkiarash

