An E-Commerce web application built using Jakarta EE 9 technologies. Namely, Jakarta Server Pages, Jakarta Servlet and Jakarta Persistence as our second project at the Information Technology Institute. It takes full advantage of Tailwind CSS components to create a beautiful and modern user interface.
This software project was built using a layered architecture. The following diagram demonstrates an example use case that goes through all the layers.
admin
admin
admin
admin
admin
customer
customer
customer
customer
customer
customer
customer and admin
Images
The site was deployed in two different ways
1 → Using two Docker containers, a Tomcat container and a MySQL container on a docker bridge network (dockerhub)
Create a new network.
docker network create mybridge
Create mysql container with schema "ecommerce" and connect it on the customized network and expose port 3300 to connect with mysql workbench.
docker run --name mysqldb -p 3300:3306 -e MYSQL_ROOT_PASSWORD=1234 -e MYSQL_DATABASE=ecommerce -v /usr/local/my_db_voume:/var/lib/mysql/:rw --network mybridge -d mysql:8.0.28-oracle
Run the application image.
docker run -d --name app --network mybridge -p 80:8080 asamyy97/e-ccomerce:1.5
2 → Using Docker and AWS RDS (dockerhub)
docker container run --name ecom -p 80:8080 -d -e AWS_ACCESS_KEY_ID=<access_key_for_aws_s3> -e AWS_REGION=<s3_region> -e AWS_SECRET_ACCESS_KEY=<aws_secret_key> -e DB_HOST=<db_host> -e DB_PASSWORD=<db_password> -e DB_USER=<db_user> mavis8d/ecommerce-app
Maven
pom.xml
.mvn clean compile tomcat7:redeploy
MySQL
CREATE USER 'manager'@'localhost' IDENTIFIED BY 'manager';
GRANT ALL PRIVILEGES ON ecommerce . * TO 'manager'@'localhost';
FLUSH PRIVILEGES;
resources/META-INF/persistence.xml
and make the value of hibernate.hbm2ddl.auto
property equal create
. mvn clean compile exec:java -Dexec.mainClass=gov.iti.jets.repository.util.DatabasePopulator
resources/META-INF/persistence.xml
and make the value of hibernate.hbm2ddl.auto
property equal update
.