Skip to content

BIP-TeamVN/eCommerceWebsite

Repository files navigation

eCommerce Website

java html5 css3 javascript bootstrap jquery apache mysql


GitHub contributors GitHub issues GitHub top language GitHub repo size GitHub code size in bytes Github total lines GitHub commit activity GitHub last commit GitHub release (latest by date)



Overview

  • Technical: JSP (Jakarta Server Pages) and Servlet

  • Database:

    • Relational database management system : MySQL 5.7
    • Object-relational mapping : Hibernate 5.4.10.Final
    • Administrative units of Vietnam in database get from GENERAL STATISTICS OFFICE OF VIETNAM
  • Front-end frameworks :

    • Bootstrap 4.5.3 - Open source front end framework
    • jQuery 3.5.1 - Fast, small, and feature-rich JavaScript library
    • AJAX (Asynchronous JavaScript and XML) - send and retrieve data from a server asynchronously without interfering with the display and behaviour of the existing page.
    • Slim Select 2 - Slim advanced select dropdown
    • Argon dashboard by Creative Tim
  • Design pattern : Model - View - Controller (MVC)

  • Integrated development environment (IDE) : IntelliJ IDEA 2020



Project Structure

eCommerceWebsite
├── db
│   ├── Database.sql                  (Script MYSQL create database)
│   ├── ScriptInsert.sql              (Script MYSQL insert sample data)
│   ├── vietnam-zone.xls              (Excel file contain Administrative units of Vietnam)
├── src
│   ├── main
│   │   ├── java
│   │   │   ├── com.hknp.controller
│   │   │   │   └── api               (REST API)
│   │   │   │   └── filter            (Servlet filter)
│   │   │   │   └── common            (common controller for all user's page)
│   │   │   │   └── admin             (controller for admin page)
│   │   │   │   └── delivery          (controller for delivery page)
│   │   │   │   └── employee          (controller for employee page)
│   │   │   │   └── seller            (controller for seller page)
│   │   │   │   └── web               (controller for guest & customer page)
│   │   │   ├── com.hknp.interfaces
│   │   │   ├── com.hknp.model
│   │   │   │   └── dao               (data access object with singleton pattern)
│   │   │   │   └── enity             (Entity Bean class)
│   │   │   │   └── domain
│   │   │   ├── com.hknp.utils
│   │   ├── webapp
│   │   │   ├── WEB-INF
│   │   │   │   └─── web.xml
│   │   │   ├── assets
│   │   │   │   └── css               (argon css && custom css)
│   │   │   │   └── fonts             (nucleo font)
│   │   │   │   └── img               (images)
│   │   │   │   └── js                (custom javascript)
│   │   │   │   └── vendor            (front-end frameworks)
│   │   │   ├── common                (common components for all jsp page)
│   │   │   ├── view
│   │   │   │   └── admin             (contain admin pages)
│   │   │   │   └── delivery          (contain delivery pages)
│   │   │   │   └── employee          (contain employee pages)
│   │   │   │   └── seller            (contain seller pages)
│   │   │   │   └── web               (contain guest & customer pages)
│   │   │   ├── index.jsp             (redirect to /home)
└── pom.xml                           (Acronym for Project Object Model)


How to run

Please set environment variables for SMTP mail before run.

Variables Require Description Default
SMTP_HOST The SMTP server to connect to smtp.gmail.com
SMTP_PORT The SMTP server port to connect to, if the connect() method doesn't explicitly specify one 587
SMTP_USERNAME Username for SMTP Authenticator
SMTP_PASSWORD Password for SMTP Authenticator
SMTP_ADDRESS Email address to use for SMTP MAIL command. This sets the envelope return address

If use Tomcat on window, set environment variables by add this line below to file setenv.bat

set "SMTP_USERNAME=<YOUR_SMTP_USERNAME>"
set "SMTP_PASSWORD=<YOUR_SMTP_PASSWORD>"
set "SMTP_ADDRESS=<YOUR_SMTP_PASSWORD>"