Git Product home page Git Product logo

piotrzielonka / infinityshopping Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 4.0 1.68 MB

The e-commerce shops generator. You can find more details on the website www.infinityshopping.online The application is on the develop branch. On the develop there is also the proper Readme file.

Shell 0.13% JavaScript 0.97% Batchfile 0.07% Java 43.05% HTML 15.98% TypeScript 38.14% SCSS 1.12% CSS 0.53%
java typescript spring-boot hibernate angular jhipster bootstrap junit5 sql h2-database postgres github-actions continuous-integration continuous-delivery testing maven liquibase jacoco rest-api

infinityshopping's Introduction

infinityshopping

This application was generated using JHipster 7.3.0, you can find documentation and help at https://www.jhipster.tech/documentation-archive/v7.3.0.

Development

Before you can build this project, you must install and configure the following dependencies on your machine:

  1. Node.js: We use Node to run a development web server and build the project. Depending on your system, you can install Node either from source or as a pre-packaged bundle.

After installing Node, you should be able to run the following command to install development tools. You will only need to run this command when dependencies change in package.json.

npm install

We use npm scripts and Angular CLI with Webpack as our build system.

Run the following commands in two separate terminals to create a blissful development experience where your browser auto-refreshes when files change on your hard drive.

./mvnw
npm start

Npm is also used to manage CSS and JavaScript dependencies used in this application. You can upgrade dependencies by specifying a newer version in package.json. You can also run npm update and npm install to manage dependencies. Add the help flag on any command to see how you can use it. For example, npm help update.

The npm run command will list all of the scripts available to run for this project.

PWA Support

JHipster ships with PWA (Progressive Web App) support, and it's turned off by default. One of the main components of a PWA is a service worker.

The service worker initialization code is disabled by default. To enable it, uncomment the following code in src/main/webapp/app/app.module.ts:

ServiceWorkerModule.register('ngsw-worker.js', { enabled: false }),

Managing dependencies

For example, to add Leaflet library as a runtime dependency of your application, you would run following command:

npm install --save --save-exact leaflet

To benefit from TypeScript type definitions from DefinitelyTyped repository in development, you would run following command:

npm install --save-dev --save-exact @types/leaflet

Then you would import the JS and CSS files specified in library's installation instructions so that Webpack knows about them: Edit src/main/webapp/app/app.module.ts file:

import 'leaflet/dist/leaflet.js';

Edit src/main/webapp/content/scss/vendor.scss file:

@import '~leaflet/dist/leaflet.css';

Note: There are still a few other things remaining to do for Leaflet that we won't detail here.

For further instructions on how to develop with JHipster, have a look at Using JHipster in development.

Using Angular CLI

You can also use Angular CLI to generate some custom client code.

For example, the following command:

ng generate component my-component

will generate few files:

create src/main/webapp/app/my-component/my-component.component.html
create src/main/webapp/app/my-component/my-component.component.ts
update src/main/webapp/app/app.module.ts

JHipster Control Center

JHipster Control Center can help you manage and control your application(s). You can start a local control center server (accessible on http://localhost:7419) with:

docker-compose -f src/main/docker/jhipster-control-center.yml up

Building for production

Packaging as jar

To build the final jar and optimize the infinityshopping application for production, run:

./mvnw -Pprod clean verify

This will concatenate and minify the client CSS and JavaScript files. It will also modify index.html so it references these new files. To ensure everything worked, run:

java -jar target/*.jar

Then navigate to http://localhost:8080 in your browser.

Refer to Using JHipster in production for more details.

Packaging as war

To package your application as a war in order to deploy it to an application server, run:

./mvnw -Pprod,war clean verify

Testing

To launch your application's tests, run:

./mvnw verify

Client tests

Unit tests are run by Jest. They're located in src/test/javascript/ and can be run with:

npm test

For more information, refer to the Running tests page.

Code quality

Sonar is used to analyse code quality. You can start a local Sonar server (accessible on http://localhost:9001) with:

docker-compose -f src/main/docker/sonar.yml up -d

Note: we have turned off authentication in src/main/docker/sonar.yml for out of the box experience while trying out SonarQube, for real use cases turn it back on.

You can run a Sonar analysis with using the sonar-scanner or by using the maven plugin.

Then, run a Sonar analysis:

./mvnw -Pprod clean verify sonar:sonar

If you need to re-run the Sonar phase, please be sure to specify at least the initialize phase since Sonar properties are loaded from the sonar-project.properties file.

./mvnw initialize sonar:sonar

For more information, refer to the Code quality page.

Using Docker to simplify development (optional)

You can use Docker to improve your JHipster development experience. A number of docker-compose configuration are available in the src/main/docker folder to launch required third party services.

For example, to start a postgresql database in a docker container, run:

docker-compose -f src/main/docker/postgresql.yml up -d

To stop it and remove the container, run:

docker-compose -f src/main/docker/postgresql.yml down

You can also fully dockerize your application and all the services that it depends on. To achieve this, first build a docker image of your app by running:

./mvnw -Pprod verify jib:dockerBuild

Then run:

docker-compose -f src/main/docker/app.yml up -d

For more information refer to Using Docker and Docker-Compose, this page also contains information on the docker-compose sub-generator (jhipster docker-compose), which is able to generate docker configurations for one or several JHipster applications.

Continuous Integration (optional)

To configure CI for your project, run the ci-cd sub-generator (jhipster ci-cd), this will let you generate configuration files for a number of Continuous Integration systems. Consult the Setting up Continuous Integration page for more information.

infinityshopping's People

Contributors

piotrzielonka avatar

Stargazers

 avatar Celso Kurrle avatar  avatar Marius Vasilache avatar Tony avatar  avatar Leonardo Castilhos avatar

Watchers

 avatar  avatar

infinityshopping's Issues

Phone to the ordering party in placed order.

Now after creating the order the phone field is empty in OrderMain. There is only the phone to the receiver in ShipmentCart / ShipmentOrderMain. Phone to the receiver may be different than the phone to the ordering party (I can place the order not for me but someone else). The Phone to the receiver field can be in user (probably relationship OneToOne between the user and the new field is required it isn't possible to add it to the user domain). If the phone to the ordering party is easier in ShipmentCart / ShipmentOrderMain you can do it.

The additional field here. We get it from it and put it in OrderMain.
2022-01-21 17_49_33-Settings

or here

2022-01-21 17_48_51-Address of shipment

Price net and vat in Product management after clicking the view button.

Price net and vat are not important for a user (it depends on a client but infinityshopping in default does not have this) but can be necessary for the admin. Now, this view is shared between for user and admin. Do the new view only for the admin when after clicking the view button field price net and vat will be available. The design of the view is the same two fields only will be added.

Uploading 2022-01-13 18_33_05-Product management.jpg…
2022-01-13 18_36_08-Create a new Product to Cart

From monolith to microservices

Microservices' architecture may be needed in the future. This task is only for planning. You can consider the screenplays below.

In microservices' architecture, every addon is another microservice, for instance, the chatbot is in the next microservice. Every microservice is generated, of course by Jhipster.

infinityshopping microservice 1

infinityshopping microservice 2

infinityshopping microservice 3

Two or more of the same products in the cart.

Now when a client adds the same product to the cart it works as in the picture but should be in this example ordered quantity should be 3 and total price gross 369 in one row. The second and the third row should not exist.

2022_01_13_19_20_44_Cart

The change in the quantity of the ordered product in order management

While the admin changes the quantity of the ordered product in order management (Someone can phone and say I want less or more. The print-screen below) or the admin deletes the product from the order. The admin should change the quantity in stock in Product management manually.

It's not so easy. Other programs do the same too.

2022-01-13 20_54_13-Ordered products

Improvement of forms the address of shipment and the address of the placed order

In the form address of shipment and address of the placed order add validation a pattern in Postal Code. It always should be 07-305, not 07305 or other forms. In the field Phone To The Receiver, a pattern is a possibility too but a user not always can enter a mobile phone can enter a landline phone too this field is good. In Street field should be only the street not the Street and number of a house. A number of a house should be in another field of the form and should be required and of course, a number of a flat should be in another field and should not be required.

2022-01-13 17_20_28-Address of shipment
2022-01-13 17_35_53-Address of shipment

After finishing this task check the views below

2022-01-13 17_24_27-Address of shipment
2022-01-13 17_23_41-My orders
2022-01-13 17_23_04-Submit your order

Information about shipment price for a client

In this version, when a customer wants to know how much the shipment costs. It has to go to the submit your order view. This is not convenient, a better variant is to create another view called Shipment price. A customer needs to find out what the shipping price is instinctively when it is on our site

alert-error and alert are commented in order-main-update.component.html

This is the only comment in the entire project infinityshopping. In the project is the principle, don't use comments. If a comment exists, create an issue on Github. If you think comments help to understand code logic try to use these hints. If you don't understand the code of the project you can see the test code. In the code Java / Spring is log.debug() in methods for instance, log.debug("REST request to get all the amounts gross of a current logged user") can be also a hint for you. Additionally, the names of the methods are very important for this project and it can be also a hint for you.

About the task
When this will be uncommented, the alert for a user after creating an order "The order has been accepted for implementation" does not work and works the alert after updating ShipmentCart (Address of shipment) and PaymentCart(Kind of payment and shipment) for instance Address of shipment was updated. Because the alert "The order has been accepted for implementation" is more important the code is commented. All alerts should work of course not only one.

Fewer variables can be sent in ProductInCartDto

In Cart view, not every variables are necessary. Description, for instance, can have a lot of chars and is here sending and is not needed. In ProductInCart detail as many variables are not necessary too. After finishing this task check if Edit the quantity of order ( button in cart view ) works correctly.

Hint see Dto in ProductResource in package infinityshopping.online.app.web.rest.

2022-01-13 16_56_21-Cart
2022-01-13 16_53_30-infinityshopping – ProductInCartDTO
2022-01-13 16_52_55-infinityshopping – ProductInCartDTO

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.