Skip to content

Ibn-Maged/book-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Book Tracker App

This is a simple web application to track books you've read and add notes for each book.
It uses Node.js + Express, PostgreSQL for the database, and EJS for rendering views.


✨ Main Features

  • 📖 View all books you've read.
  • Add a new book with title, ISBN, author, rating, review, and date read.
  • 📝 Add notes for a specific book.
  • ✏️ Edit book details (title, author, rating, review, date).
  • Delete books or delete notes.
  • 🖼️ Auto-fetch book cover images based on ISBN.
  • Nice logging of all server activity (requests and responses).
  • Custom error pages (404 and 500 errors).

🛠️ Tech Stack

  • Backend: Node.js, Express
  • Database: PostgreSQL
  • Templating Engine: EJS

🚀 Getting Started

1. Clone the repository

git clone https://github.com/Ibn-Maged/book-notes.git
cd book-notes

2. Install dependencies

npm install

3. Set up environment variables

Create a .env file in the root directory and add your PostgreSQL credentials:

PG_USER=your_postgres_username
PG_HOST=your_database_host
PG_DATABASE=your_database_name
PG_PASSWORD=your_database_password
PG_PORT=5432

4. Set up your database

You need two tables:

CREATE TABLE books (
    id SERIAL PRIMARY KEY,
    title VARCHAR(255),
    isbn VARCHAR(20),
    date_read DATE,
    rating INTEGER,
    review TEXT,
    author VARCHAR(255)
);

CREATE TABLE notes (
    id SERIAL PRIMARY KEY,
    note TEXT,
    book_id INTEGER REFERENCES books(id) ON DELETE CASCADE
);

5. Run the app

node server.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published