Skip to content

IamVatsal/Book-Notes-WebApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 

Repository files navigation

📚 Book Notes WebApp

A simple and efficient web application for managing book notes, allowing users to store and organize their reading insights effectively.

🌍 Live Demo

The application is live at: Book Notes WebApp

🚀 Features

This application provides a range of features to help users efficiently manage their book notes. Here are some key highlights:

  • 📖 Add, edit, and delete book notes
  • 🔍 Search and filter notes
  • 📂 Categorize notes by book title or genre
  • 🎨 Clean and responsive UI
  • 🌐 Built using modern web technologies
  • 📅 Sort books by title, rating, or finish date
  • 👥 User authentication with Google OAuth and local strategy

🛠️ Tech Stack

  • Frontend: HTML, CSS, JavaScript
  • Backend: Node.js, Express.js
  • Database: PostgreSQL
  • Frameworks/Libraries: Bootstrap, Passport.js

📂 Project Structure

Book-Notes-WebApp/
├── public/          # Static assets (CSS, JS, images)
├── views/           # Frontend templates (EJS)
├── routes/          # API routes
├── controller/      # Business logic
├── .vscode/         # VSCode settings
├── .env             # Environment variables
├── .gitignore       # Git ignore file
├── db.js            # Database connection
├── index.js         # Main server entry point
├── package.json     # Dependencies and scripts
├── queries.sql      # SQL queries for database setup
└── README.md        # Project documentation

🎯 Installation & Setup

Prerequisites

Steps

These steps cover both setting up the repository and initializing the PostgreSQL database.

  1. Clone the repository:
    git clone https://github.com/IamVatsal/Book-Notes-WebApp.git
  2. Navigate to the project folder:
    cd Book-Notes-WebApp
  3. Install dependencies:
    npm install
  4. Set up environment variables:
    cp .env.example .env
    # Update .env file with necessary details

.env Structure

GOOGLE_CLIENT_ID = "Your_Client_Id"
GOOGLE_CLIENT_SECRET = "Your_Client_Secret"
GOOGLE_CALLBACK_URL = "${YourBase URL}/login/auth/google/callback" (Optional)
DB_USER = Your_User_Name
DB_HOST = Your_DB_Host
DB_NAME = Your_DB_Name
DB_PASSWORD = Your_DB_Password
DB_PORT = Your_DB_Port
SESSION_SECRET = "SECRETWORD"
NODE_ENV = "local" or "production"

Database Initialization

  1. Access the PostgreSQL shell:

    psql -U your_username -d your_database
  2. Create the book_details table:

    CREATE TABLE book_details (
      id SERIAL PRIMARY KEY,
      title TEXT NOT NULL,
      isbn TEXT NOT NULL,
      olid TEXT NOT NULL,
      authorName TEXT NOT NULL,
      genre TEXT NOT NULL,
      username TEXT NOT NULL,
      finishDate DATE NOT NULL,
      rating INTEGER NOT NULL,
      isPublic BOOLEAN DEFAULT FALSE,
      summary TEXT NOT NULL
    );
  3. Create the users table:

    CREATE TABLE users (
      id SERIAL PRIMARY KEY,
      email VARCHAR(100) NOT NULL UNIQUE,
      password TEXT NOT NULL,
      username TEXT NOT NULL UNIQUE
    );
  4. Create the session table:

    CREATE TABLE session (
      sid VARCHAR PRIMARY KEY,
      sess JSON NOT NULL,
      expire TIMESTAMPTZ NOT NULL
    );
  5. Start the server:

    npm start
  6. Open your browser and visit:

    http://localhost:3000
    

📌 Usage

  1. Add new book notes with title, content, and category
  2. Search and filter through saved notes
  3. Edit or delete notes when needed
  4. Sort books by title, rating, or finish date
  5. Authenticate using Google OAuth or local strategy

📸 Screenshots

Index Page

Index Page

New Book Page

New Book Page

Edit Book Page

Edit Book Page

🤝 Contributing

Contributions are welcome! Follow these steps:

  1. Fork the repository
  2. Create a new branch (feature-branch)
  3. Commit changes (git commit -m 'Add new feature')
  4. Push to your fork (git push origin feature-branch)
  5. Create a pull request

🛡️ License

This project is licensed under the MIT License.

📞 Contact

For any queries or feedback, feel free to reach out:


Made with ❤️ by IamVatsal

About

A simple and efficient web application for managing book notes, allowing users to store and organize their reading insights effectively.

Resources

Stars

Watchers

Forks

Contributors