Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Book Notes

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.


🚀 Features

  • 📖 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

🛠️ Technologies Used

  • Node.js
  • Express.js
  • PostgreSQL
  • EJS
  • HTML5
  • CSS3
  • Bootstrap
  • Axios
  • Body Parser

📂 Project Structure

Book_Notes/
│
├── public/
│   ├── css/
│   └── images/
│
├── views/
│   ├── partials/
│   └── index.ejs
│
├── db.js
├── index.js
├── package.json
├── package-lock.json
└── README.md

⚙️ Installation

Clone the repository

git clone https://github.com/amirkiarash/Book_Notes.git

Move into the project folder

cd Book_Notes

Install dependencies

npm install

🗄️ Database Setup

Create 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,
});

▶️ Run the Project

npm start

or

node index.js

If you have Nodemon installed:

nodemon index.js

The application will be available at

http://localhost:3000

🌐 API

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

📸 Screenshots

Home Page

Home Page

Add Book

Add Book


📦 Dependencies

{
  "axios": "^1.x",
  "body-parser": "^2.x",
  "ejs": "^3.x",
  "express": "^5.x",
  "pg": "^8.x"
}

👨‍💻 Author

Amir Mohammadi

GitHub: https://github.com/amirkiarash

About

Personal book notes app with PostgreSQL and Open Library covers

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages