Giter VIP home page Giter VIP logo

shopping_app_hyper_srot's Introduction

Shopping App

This is a simple shopping web application developed using Java and the Spring Framework. It allows users to perform various actions such as ordering products, applying coupons, making payments, and viewing order statuses.

Features

  • Users can enter the quantity of products they want to order.

  • The app checks if the desired quantity of the product is available.

  • Users can check available coupons and apply one if valid. Each coupon can only be applied once per user.

  • Users can make payments for their orders.

  • Users can view the status of all their orders.

Installation

To run the application locally, follow these steps:

  • Clone this repository to your local machine.

  • Please make sure you have Java and Maven installed.

  • Navigate to the project directory.

  • Run mvn spring-boot:run to start the application.

  • Access the application at http://localhost:8080.

Usage

  • Upon accessing the application, users will be able to perform the actions described above through the provided endpoints.

  • The application provides responses in JSON format for every user action.

Configuration

  • The app assumes there is only one type of product with a fixed quantity, which can be fetched from a config file during startup.

  • You may customize the product details and other configurations in the application.properties file.

API Endpoints

  1. GET /inventory
  • Retrieves information about product inventory.
  • Provides details such as ordered quantity, price, and availability.
  1. GET /fetchCoupons
  • Fetches available coupons along with their discount percentages
  1. POST /{userId}/order?qty={quantity}&coupon={couponCode}
  • Places an order for the specified user with the given quantity and coupon code.
  • Returns information about the order, including the order ID and amount.
  1. POST /{userId}/{orderId}/pay?amount={paymentAmount}
  • Makes a payment for the specified order with the given payment amount.
  • Returns the payment transaction status.
  1. GET /{userId}/orders
  • Retrieves all orders placed by the specified user.
  • Provides details such as order ID, amount, date, and applied coupon.
  1. GET /{userId}/orders/{orderId}
  • Retrieves the details of a specific order placed by the user.
  • Provides information about the order, including its status and transaction ID.

shopping_app_hyper_srot's People

Contributors

siddharth263 avatar

Watchers

 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.