Code Monkey home page Code Monkey logo

zuri-petshop's Introduction

zuri-petshop

A Spring Boot-React-React Native Petshop Application

Installation

In order to install the development environment, please follow below steps to have a working development environment. 1- Java JDK 11 2- Node.js 3- MySql Server80 4- Maven 5- IDE like IntelliJ IDEA Community for backend development 6-In order to start be, go to project folder, mvn clean install. And run Java application. 7- IDE for frontend development(e.g. WebStorm, Visual Studio Code, etc.) 8- In order to start admin panel, go to project folder, npm install and npm start. 9- npm i -g expo 10- In order to start mobile app, go to project folder, npm run android or npm run ios.

zuri-petshop's People

Contributors

moustaphastar avatar ilkaypolat1985 avatar aliturgutbozkurt avatar boyraci41 avatar megundo avatar

Stargazers

Fırat avatar Sedat Başpınar avatar TAYFUN ÇELİK avatar  avatar Süha Can Uluer avatar İ. Başar Yargıcı avatar  avatar Khaled avatar Sefa Cihangir avatar  avatar Yasin Beyazlı avatar Mazlum Tekin avatar Metin Özkan avatar Kubilay ÇİÇEK avatar  avatar kmluns avatar Miraç Satıç avatar Enes Gür avatar Ufuk Uzun avatar Emirhan Doğandemir avatar Yasin Beyazlı avatar Serhat Yıldız avatar

Watchers

 avatar  avatar  avatar  avatar Sefa Cihangir avatar fatma avatar

zuri-petshop's Issues

Add Pet

As a pet operation specialist, I would like to add a new pet.

Validate Product Category

As a product operation specialist, there should be validation regarding product category operations.

Show Pet Detail

As a customer, I would like to see the details of a given pet.

List Product Categories

As a product operation specialist, I would like to list all product categories according to search criteria.

Add user with admin role

Implement a logic to enable a super user insert a user with admin role and restrict resource access to super user only.

Add Answer

As a user, I would like to add a new answer for a given question.

Cancel Order

As a customer, I would like to cancel an existing order.

Update Order

As a customer, I would like to update an existing order.

Add Question

As a customer, I would like to ask a new question.

Remove Pet

As a pet operation specialist, I would like to remove an existing pet.

Update Pet

As a pet operation specialist, I would like to update an existing pet.

List Products

As a customer, I would like to list all products according to search criteria.

Create Product

As a product operation specialist, I would like to create a new product.

Show Question Detail

As a user, I would like to see the details(including all answers) of a given question.

List Orders

As a customer, I would like to list all orders according to search criteria.

Parameter Structure

Common parameters will be held in this structure.
E.g. Working hours start and end, default page size, bank account information.

Delete Product

As a product operation specialist, I would like to delete an existing product.

List Pets

As a customer, I would like to list all pets according to search criteria.

Update Product

As a product operation specialist, I would like to update an existing product.

Create Order

As a customer, I would like to create a new order.

Uploading an image file via the Add Product flow fails

Description
Product images can't be uploaded on admin panel while trying to add a product using the "Ürün Ekle" flow.

The front end app receives a 500 status code from the back end app which throws a NullPointerException at retrieving Google credentials through the uploadFile method of the FirebaseFileServiceImpl class. Inside this method, getResourceAsStream method call is passed an argument as "zuri-petshop-firebase.json" (non-existent) instead of "firebase.json" (existent).

@Service
public class FirebaseFileServiceImpl implements FirebaseFileService {
// ...
    @Override
    public String uploadFile(InputStream is, String contentType, String path, String fileName) throws IOException {
        InputStream serviceAccount = getClass()
                .getClassLoader()
                .getResourceAsStream("zuri-petshop-firebase.json");  // <= Correct filename is "firebase.json"
        Storage storage = StorageOptions.newBuilder()
                .setCredentials(GoogleCredentials.fromStream(serviceAccount)) // <= Throws NullPointerException
                .setProjectId(PETSHOP_FIREBASE_PROJECT_ID).build().getService();
// ...
    }
}

Steps to Reproduce

  • Login to admin panel.
  • Add a category if none exists.
  • Upload an image file for a product using the "Ürün Ekle" flow .

Expected Result
The product image file is uploaded successfully to Firebase.

Actual Result
Upload fails. Admin panel receives a 500 status code from the back end app and the back end app throws a NPE.

Error Message

2021-09-09 03:47:24.233 ERROR 6832 --- [nio-8081-exec-4] c.t.p.v.h.ApplicationExceptionHandler    : Exception : class java.lang.NullPointerException: null

java.lang.NullPointerException: null
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:892) ~[guava-30.1.1-android.jar:na]
	at com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:125) ~[google-http-client-1.39.2.jar:1.39.2]
	at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:151) ~[google-auth-library-oauth2-http-0.26.0.jar:na]
	at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:134) ~[google-auth-library-oauth2-http-0.26.0.jar:na]
	at com.turkninja.petshop.file.impl.FirebaseFileServiceImpl.uploadFile(FirebaseFileServiceImpl.java:32) ~[classes/:na]
	at com.turkninja.petshop.v1.FileResource.uploadFile(FileResource.java:30) ~[classes/:na]
	
// ... Rest of the error message is omitted

List Questions

As a user, I would like to list all questions according to search criteria.

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.