Giter Club home page Giter Club logo

webstore-webapp's Introduction

Internet Shop Webapp

Introduction

The main purpose of this project is to showcase my abilities in creating back-end systems in Java. I decided to create a webapp for an internet shop as it requires me to consider a wide variety of issues, such as data security, relational databases and needs of users. Although the project is functional, there are many improvements and features I would like to implement and these will be documented below. Firstly I will explain how to run the application in IntelliJ.

Running the Application

Step 1- Setup

Having cloned the project into IntelliJ there are a few brief things that need to be setup before running. You can either run the application with an in memory database or the pre-made example database. The steps for setting up each will be listed below.

In Memory Database

For the in memory database simply comment out the current spring.datasource.url in the application.properties file and uncomment the in memory database url. You will then need to comment out the spring.jpa.hibernate.dll-auto property and uncomment labelled property. The application will then be ready to run, although it will be empty except for 2 user accounts.

Pre-made Database

This setup requires a few more steps to setup, but will load the application with example products, orders and users. The steps are as follows:

  1. In the application.properties file enter the directory you have saved the project to. You can do this by right clicking the root directory of the project and selecting "Copy Path" and pasting it into the marked area.
  2. Within the root-directory you will find a jar file called h2-1.4.197.jar. This is the jar file used to run an instance of the H2 database on your system. You can either run this in IntelliJ or simply double click the file in explorer. This should bring up a H2 database console in your browser.
  3. In the H2 Database console copy the full URL from the spring.datasource.url and paste it into the JDBC Url section. Clicking connect will connect you to the database. The database should be setup for the application.

Step 2 - Starting the Application

To run the application simply select the bootRun option in Gradle. This will build the application and start running it. To view the application running simply open up your web browser and enter the URL localhost:8080. There are preset user account loaded into the database and the login details for these accounts are as follows:

  • Admin Account: Email = "admin", Password = "password"
  • Customer 1: Email = "[email protected]", Password = "password"
  • Customer 2 (Pre-made Database Only): Email = "[email protected]", Password = "password"

Improvements/Optimisations

Whilst making this project I found that I would regularly think of features and optimisations that I would like to add to this project. my main priority was to produce a working example and I decided to press on towards this goal rather than go back and implement new features or improvements until I had a working application. Below I will list the features and improvements I hope to make to the project over the coming weeks that will improve the performance and expand the capabilities of the application.

  • Add server side validation for the data received from forms.
  • Change the structure of the shopping cart object to a symbol table.
  • Add flash messages to better communicate to the user.
  • Add basic browser side validation.
  • Add mechanism to reset a users password.
  • Log a tally of views/sales of products so the most popular products can be displayed more prominently.
  • Create a RESTApi to access the admin data.
  • Handle money in a better way so that it is always correctly rounded.

webstore-webapp's People

Contributors

cordayuk avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.