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.
- 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 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)
- 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
βββ 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
- 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