Skip to content

This is a web application developed for the CS 3360 course, focusing on creating a simple e-commerce platform for selling accessories and clothing. The project leverages Java, Spring Boot, HTML, CSS, and JavaScript. Users can view items, add them to their cart, view the cart, proceed to checkout and view their order history

Notifications You must be signed in to change notification settings

TGaDev203/CS3360-Accessories-Clothing-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DATABASE DESIGN

  • NẾU TRẢ VỀ BẢN GHI THÌ LẤY LIST OF ITEMS ID ĐÓ ĐỂ ADD ITEM MỚI VÀO DỰA TRÊN LIST OF ITEMS ID ĐÓ (THÊM VÀO GIỎ HÀNG)
  • NẾU NHƯ KO TRẢ VỀ GÌ (GIỎ HÀNG TRỐNG) THÌ GENERATE LIST OF ITEMS ID MỚI VÀ INSERT VÀO BẢNG
  • DỰA VÀO CUSTOMER ID VÀ DATE OF PURCHASE ĐỂ LẤY CÁC ĐƠN HÀNG ĐÃ MUA, CÁC ĐƠN HÀNG CÓ CÙNG DATE OF PURCHASE GỘP VÀO MỘT ĐƠN, CÁC ĐƠN HÀNG DATE OF PURCHASE NULL LÀ HÀNG CHƯA THANH TOÁN TRONG GIỎ
  • SELECT customer_id = ? 
    FROM list_of_items
    WHERE date_of_purchase = NULL;


    enum Material {
      "golden" 
      "sliver"
      "copper"
    }
    
    Table customer {
      id integer [primary key]
      username varchar(255)
      phone_number varchar(10)
      address text
    }
    
    Table item {
      id integer [primary key]
      name varchar(255)
      price double
      description text
    }
    
    Table clothes {
      id integer [primary key, ref: < item.id]
      brand varchar(255)
      size varchar(255)
    }
    
    Table accessories {
      id integer [primary key, ref: < item.id]
      material Material
      type varchar(255)
      weight double
    }
    
    
    Table list_of_items {
      list_of_items_id integer
      customer_id integer [primary key, ref: > customer.id]
      item_id integer [primary key, ref: > item.id]
      quantity integer
      date_of_purchase datetime
      
    }

    CONFIG SQL

    spring.application.name=demo
    spring.jpa.hibernate.ddl-auto=update
    
    spring.datasource.username=your_username
    spring.datasource.password=your_password
    spring.datasource.url=jdbc:mysql://localhost:3306/your_schema
    spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
    
    #allow table's name like tblProduct (allow creating customized table name)
    spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
    spring.jpa.properties.hibernate.format_sql=true
    spring.jpa.open-in-view=false
    spring.jpa.properties.hibernate.transaction.jta.platform=org.hibernate.engine.transaction.jta.platform.internal.AtomikosJtaPlatform
    spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
    





    CLASS DESIGN






    SCHEDULE

    • 07/05/2024: Dựng Model (Class) - Database: thống nhất các mối quan hệ khi map từ DB sang class object, add các methods: getter, setter, constructor,...
    • 12/05/2024: Dựng Controller - Service: dựng các luồng đi chính, test các API để chuẩn bị làm frontend
    • 13/05/2024: Hỏi góp ý của thầy debug
    • 18/05/2024: Test toàn bộ chương trình
    • 20/05/2024: Thuyết trình

    UPDATE NOTES

    • 02/05/2024: Init project
    • 05/05/2024: Đã xong models, đang làm repositories
    • 09/05/2024: Đã dựng xong cơ bản của luồng liên quan đến Item, thiếu các luồng findby...
    • 11/06/2024: Xong services + controller, check?
    • 12/05/2024: Đã xong toàn bộ backend
    • 18/05/2024: Đã xong toàn bộ frontend
    • 19/05/2024: Test chương trình

    About

    This is a web application developed for the CS 3360 course, focusing on creating a simple e-commerce platform for selling accessories and clothing. The project leverages Java, Spring Boot, HTML, CSS, and JavaScript. Users can view items, add them to their cart, view the cart, proceed to checkout and view their order history

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published