How cuong75201/book-store works
Project type and purpose
• This is a full-stack web application (online bookstore) built in PHP following a custom MVC pattern.
• Two main actors: end-users (customers) and Admin.
• Key features: product browsing, shopping cart, user profile, order management, admin product/user management.
File structure
• Root files:
• .htaccess – URL rewriting for friendly routes
• index.php – application entry point (bootstraps MVC router)
• config.php – global constants, DB credentials
• admin2/ – legacy or alternate admin UI layer
• database/book_store.sql – database schema and seed data
• media/ – static images (products, banners)
• public/ – public-facing assets
• css/ – style sheets
• js/ – client-side scripts (AjaxLogin, pagination, admin CRUD, etc.)
• lib/bootstrap… – Bootstrap 4.5 distribution
• mvc/ – core MVC implementation
• core/app.php – URL router → controllers
• core/controller.php – base controller class
• core/dbconnect.php – database connector (MySQL)
• controllers/ – all HTTP action handlers (home, product, account, admin, etc.)
• models/ – data access models mapping to tables (User, Cart, Order, Product, Category…)
• views/ – UI templates (layouts, partials, pages, admin pages)
README for architecture insights
• Describes MVC flow: incoming URL → app.php router → controller/action → view render or model query.
• Technologies: PHP, MySQL, JS, CSS, Bootstrap.
Key details to capture
• Authentication flow for user vs admin paths
• AJAX endpoints vs full-page renders
• Partials and layout inclusion
• Database schema footprint (tables represented by models)
• Asset dependencies (Bootstrap CSS/JS)