How hoangtran0410/doan_web1 works
Project Type and Purpose
• Project Type: It’s a web-based, static website project built as an assignment ("Đồ án môn web 1"). The site is designed for selling phones.
• Purpose: It provides an end-user interface where customers can browse products, search/filter, see detailed product pages, manage their carts, and handle user authentication. Additionally, there’s an Admin interface for product, order, and user management along with statistics.
File Structure
• HTML Files: Notice multiple HTML pages like index.html (landing page), giohang.html (cart), chitietsanpham.html (product detail), and separate admin.html as well as extra pages relevant for user actions (lienhe.html for contact, nguoidung.html for user profile, etc.).
• CSS Directory: Contains numerous CSS files segregated into several categories including common page styles (header, footer, pagination, banners) and admin-specific styling (admin/progress.css, admin/style.css). This indicates that the presentation layer is very modular.
• JS Directory: Multiple JavaScript files are used to add dynamic functionality. There are library folders like jquery and owlcarousel, as well as custom scripts for different pages (chitietsanpham.js, giohang.js, trangchu.js, etc.). The admin.js file likely powers the administrative interactions.
• Data: A data folder with “products.js” suggests product information is managed through static JSON-like structures.
• Assets: An “img” folder containing images for banners, products, etc., and a “screenshots” folder used in the README for visual demonstration.
README for Additional Insights
• The README details both “Cơ bản” (Basic user functions) and “ADMIN” functionalities which guide you on what the system should exhibit.
• It describes key features like product filtering, searching, and user management along with admin operations (statistics, managing products, orders, and customers).
• References to screenshots provide visual hints on the UI design and separate interfaces for front-end and admin use.
a. Main Components:
• User Interface (Frontend):
• Customer pages: Home, Product Listing, Product Details, Cart, User Login/Registration, Contact, and News pages.
• Assets: CSS and images (for styling and visual content).
• JavaScript: Files handling user interactions (e.g., trangchu.js for the homepage, giohang.js for the shopping cart).
• Admin Interface:
• Admin Dashboard for statistics.
• Pages for managing products, orders, and users (admin.html and related JavaScript files like admin.js).
• Data Component:
• Static data source (data/products.js) which provides product information.
• External Libraries:
• jQuery, Owl Carousel (and any other JS libraries in the “js/…” folders) used to enhance functionality.
b. Relationships and Interactions:
• The HTML pages serve as the entry points that consume CSS for design and JS for interactive functionality.
• JavaScript files dynamically manipulate HTML elements and interact with the data layer (e.g., loading product details from data/products.js).
• The admin portion interacts similarly but steers toward management functions like CRUD operations (albeit simulated since this is a static web project).
• Visual elements (images) and CSS styles are used by both customer and admin interfaces.
c. Architectural Patterns & Principles:
• Separation of Concerns: By dividing the project into HTML (structure), CSS (presentation), and JS (behavior), the project follows a basic but clear separation.
• Modular File Organization: Different folders for admin, CSS, images, and JS indicate a modular approach.
• Client-Side Rendering: Since all pages are static and use JavaScript to provide interactions, you essentially have a client-side rendered application.
d. Relevant Technologies, Frameworks, or Libraries:
• HTML/CSS/JavaScript (plain or with libraries like jQuery and Owl Carousel).
• The data layer is static, using JavaScript objects in products.js.