Giter Club home page Giter Club logo

hmgshop's People

Contributors

pdasilem avatar

Watchers

 avatar

hmgshop's Issues

[FEATURE] HMGS-7: adding the buttons

To do:

  • On the product list, add a button - Buy. When user clicks on this button - he needs to be redirected to the purchase page with the form of details input.
  • Then user submits the form - request sent to the backend and new order is created.
  • User should see a message that order created and he need to pay for it.

[FEATURE] HMGS:-9: admin can add the user to the black list

To do:

  • add one more page where all the users will be displayed
  • add a button along with the user "add to black list".
  • When admin clicks on that button, user is marked as BLOCKED. His status becomes from ACTIVE to BLOCKED.
  • In the authorization, if we see that use r is blocked we need to return him a message to contact to administration.

[FEATURE] HMGS-2: create a service layer

To do:

use dependency injection:

  • create service for customers

In you save or update method, you firstly validate incoming data;
after you convert DTO to the entity object;
after you call your repository save() method to save new entity in the database.

  • create a package Service
  • create YourEntityService interfaces
  • Create DefaultYourEntityService classes that implement the above interfaces accordingly

YourEntity - is a placeholder for your entity classes. If you have a UserEntity, you need to create UserService and DefaultUserService accordingly.

[FEATURE] HMGS-13: Send email to ADMINs when new order created

[BACKEND]

To do:

  • When new order is created, you need to send an email to users with ADMIN role
  • create a NotificationClient interface and a NotificationClientImpl class with the implementation of notification client with a single method: sendEmailNotification.
  • In the sendEmailNotification you should call notification-app endpoint which sends emails
  • use Kafka and RestTemplate to communicate between microservices (kafka must be paid for heroku
  • create 2 implementations of NotificationClient. One is KafkaNotificationClient and another is NotificationClientImpl which will be default implementation

I suggest you to use RestTemplate because if you deploy application to Heroku - kafka is not going to be in the free plan.
But for the local purposes you can use kafka to communicate between microservices.

This video will help you to communicate your microservices via RestTemplate
This video will help you to setup kafka as communication channel

[FEATURE] HMGS-6: add a page with the form of product addition

To do:

  • find appropriate simple template form on codepen
  • make ajax request to the server
  • create a frontend folder in the root of application
  • create file index.html and paste the template
  • create css, js, img folders inside the frontend folder
  • need to use AJAX call to get all the products and display them on the page

Codegen
Shop temlate on Codegen
Spring Boot, JPA, REST, Postgresql, JUnit, Mockito, Thymeleaf, Ajax
Online book JavaScript

[FEATURE] HMGS-10: deploy to the server

To share the result of your work, you need to deploy the application to some server.We can use free Heroku server.

To do:

  • [Frontend] Deploy frontend to the free server
    • change the url constant to the remote server url
    • find a free hosting where you can put your HTML files. you can check this one Бесплатный Хостинг с поддержкой PHP, MySQL и cPanel.
    • put all the frontend logic to the hosting
    • make sure everything works fine.

Deploy Java Web Application to Heroku free server Spring Boot example
Free hosting

[FEATURE] HMGS-11: send email functionality

To do:

  • create standalone app - Notification app
  • create a controller which receives body with email, body of the message, subject of the message.
  • in the service call email provider (use google) to send email
  • save notification detail in the DB. create a single db table notification_details.
    In this table will be the next fields:
    • id,
    • type,
    • body,
    • subject,
    • receiver,
    • created_date.
  • add swagger documentation

Send Email with Spring Boot and Gmail

[FEATURE] HMGS-1: connect to DB

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.