Skip to content

Latest commit

Β 

History

History
135 lines (94 loc) Β· 3.28 KB

File metadata and controls

135 lines (94 loc) Β· 3.28 KB

πŸ“š BookBuddy - Online Book Store

BookBuddy is a modern, responsive PHP-based online bookstore that allows users to browse, search, and purchase books, while also providing a complete admin dashboard for managing inventory, orders, and users.


🌟 Features

βœ… User Features

  • Register/Login (Email & Google OAuth)
  • Browse books with filters (title, category, author)
  • View book details and ratings
  • Add/remove books from cart
  • Apply promo codes at checkout (tanni5, shiren5, noor10)
  • Choose payment method: Stripe or Cash on Delivery
  • View past orders and submit reviews

πŸ› οΈ Admin Features

  • Admin Dashboard (admin_panel.php)
  • Manage books (manage_books.php)
  • Manage orders (manage_orders.php, order_details.php, delete_order.php)
  • Manage users (manage_users.php)

πŸ’» Technologies Used

  • Frontend: HTML, Custom CSS, Vanilla JS
  • Backend: PHP 7+, MySQL
  • Authentication: PHP Sessions, Google OAuth (google_login.php)
  • Payments: Stripe API Integration (gateway_payment.php, payment_success.php, cancel.php)
  • Utilities: Swiper.js for carousels, Composer for dependency management

πŸ“ Project Structure

β”œβ”€β”€ images/ # Book and asset images β”œβ”€β”€ js/ # Custom scripts β”œβ”€β”€ vendor/ # Composer dependencies β”œβ”€β”€ book_store.sql # Database schema β”œβ”€β”€ composer.json/lock # Composer config β”œβ”€β”€ clientid.txt # Google OAuth client ID β”œβ”€β”€ db.php # Database connection β”œβ”€β”€ header.php/footer.php # Page layout components

Core Pages β”œβ”€β”€ index.php # Homepage (book listings, search) β”œβ”€β”€ description.php # Book detail view β”œβ”€β”€ cart.php # Cart logic β”œβ”€β”€ cart_view.php # Cart display β”œβ”€β”€ cart_remove.php # Remove item from cart β”œβ”€β”€ update_quantity.php # Update cart quantity β”œβ”€β”€ checkout.php # Checkout page β”œβ”€β”€ place_order.php # Order placement β”œβ”€β”€ payment_success.php # Stripe success β”œβ”€β”€ cancel.php # Stripe cancel β”œβ”€β”€ success.php # Final success screen β”œβ”€β”€ profile.php # User profile and order history β”œβ”€β”€ submit_review.php # Submit book reviews

Auth β”œβ”€β”€ register.php β”œβ”€β”€ login.php β”œβ”€β”€ logout.php β”œβ”€β”€ verify.php β”œβ”€β”€ google_login.php β”œβ”€β”€ google_callback.php

Admin β”œβ”€β”€ admin_panel.php β”œβ”€β”€ manage_books.php β”œβ”€β”€ manage_orders.php β”œβ”€β”€ manage_users.php β”œβ”€β”€ order_details.php β”œβ”€β”€ delete_order.php

Other β”œβ”€β”€ team.php β”œβ”€β”€ test.php # For development/testing


πŸ› οΈ Setup Instructions

  1. Clone or Download the Project
    git clone https://github.com/your-username/bookbuddy.git
    cd bookbuddy
    

##Database Setup

Import book_store.sql into your MySQL server.

Update your DB credentials in db.php.

Google Login Setup

Create Google OAuth credentials via Google Cloud Console.

Save your client ID in clientid.txt.

Stripe Payment Setup

Create an account at Stripe.

Replace the test keys in gateway_payment.php and related files. Run Locally Start a local server (e.g., XAMPP, MAMP).

Access the project via http://localhost/BookStore/index.php.

πŸ’Έ Promo Codes Code Discount tanni5 5% shiren5 5% noor10 10%

πŸ“Œ Future Improvements Wishlist feature Book recommendations Admin analytics dashboard Email order notifications Pagination and sorting