e-commerce-app Tailwind Templates

E Commerce App

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 build create a beautiful and modern user interface.

chocotown-banner

Webp net-resizeimage (1) ChocoTown

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.

🏛 Architecture

This software project was built using a layered architecture. The following diagram demonstrates an example use case that goes through all the layers.

Screenshot (21)

📄 Database Schema

image

📦 Features

  • Registration and login
  • Email confirmation
  • Forget password
  • Add product admin
  • Edit product admin
  • Delete product admin
  • View all customers admin
  • View order history admin
  • View homepage customer
  • View product details customer
  • Add product to cart customer
  • View shopping cart customer
  • Search by category customer
  • Checkout using Stripe payment customer
  • Logout customer and admin

▶ Demo

1

⚙ Technologies used

  • AWS EC2, RDS, and S3
  • Docker
  • Maven
  • Apache Tomcat 10.0.20
  • Jakarta Persistence (Hibernate)
  • MySQL
  • Jakarta Server Pages
  • Jakarta Servlet
  • Jakarta Standard Tag Library
  • Tailwind CSS
  • Ajax
  • Bean Validation (Hibernate Validator)
  • JSON-P and JSON-B
  • HikariCP Connection Pooling
  • MySQL
  • Spring Security Encoder
  • Stripe payment integration
  • Apache Commons Email

🐳 Run with Docker

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

🛠 Run with Maven

Maven

  • Change the configuration of tomcat in pom.xml.
  • Deploy the application using the following maven command:
    mvn clean compile tomcat7:redeploy
    

MySQL

  • Create a database user using MySQL Commandline 8.0 using the following commands:
    CREATE USER 'manager'@'localhost' IDENTIFIED BY 'manager';
    GRANT ALL PRIVILEGES ON ecommerce . * TO 'manager'@'localhost';
    FLUSH PRIVILEGES;
    
  • Go to resources/META-INF/persistence.xml and make the value of hibernate.hbm2ddl.auto property equal create.
  • Run DatabasePopulator.java file
    mvn clean compile exec:java -Dexec.mainClass=gov.iti.jets.repository.util.DatabasePopulator
    
  • Go back to resources/META-INF/persistence.xml and make the value of hibernate.hbm2ddl.auto property equal update.

👷‍♀️ Contributors

Top categories

Loading Svelte Themes