WebBanSach is a client-side front-end web application representing an online bookstore e-commerce storefront. Built entirely with vanilla HTML5, CSS3, and JavaScript, the application supports local user registration, catalog listing, detailed book views, reviews, and a shopping cart utilizing localStorage persistence.
Technical Features
- Storefront Architecture: Client-side single-page layout structures loaded dynamically (using loadNavbar.js and loadBooks.js).
- State Persistence: Persists shopping cart products, customer details, and session records inside the browser’s localStorage.
- Interactivity: JavaScript events handling forms validation (SignIn, SignUp, UserProfile updates) and cart calculation updates.
- Styling: Custom stylesheets located in the css/ directory.
File Organization
DOANCUOIKI/
└── WebBanSach/
├── README.md # Original project description
├── anhsachdemo/ # Product thumbnail assets
├── testing/ # Local testing and verification files
└── Main/ # Core application files
├── index.html # Storefront homepage grid
├── details.html # Book detailed specs and information
├── cart.html # Shopping cart listing
├── SignIn.html # User sign-in page
├── SignUp.html # User registration page
├── UserProfile.html # Profile details dashboard
├── editprofile.html # Profile editing form page
├── addbook.html # Admin form for adding new books
├── danhgia.html # User review submission form
├── navbar.html # Reusable navigation bar HTML
├── css/ # Custom CSS styling stylesheets
├── img/ # Icon and layout assets
└── *.js # Client-side scripts (cart.js, books.js, loadBooks.js)
Operations Flow
- Landing Catalog (index.html): The site pulls book records from
books.js and renders cards dynamically via loadBooks.js.
- Product Details (details.html): Users select a book to view specifications, summaries, and write reviews (
danhgia.html).
- Shopping Cart (cart.html): Adds selected books. All item quantites, prices, and removals are handled locally by
cart.js and saved in localStorage.
- Authentication (SignIn/SignUp): Simulates registrations and signs users into session profiles (
UserProfile.html) saved in local storage keys.
Local Run Instructions
No server setup is required.
- Navigate to the project source directory:
cd D:\TKWEB\DOANCUOIKI\WebBanSach\Main
- Open
index.html in your default browser.
- Interact with the catalog, add books to the cart, register new accounts, and test the checkout flows locally.
评论