Giter Site home page Giter Site logo

customer-rewards-app's Introduction

Customer Rewards App

This project is a React-based web application designed to calculate and display customer reward points for a retailer. It showcases a rewards program where customers earn points based on their transaction amounts. The application displays the points earned for each customer per month and the total points over a three-month period. Screenshot 2023-11-16 at 2 26 16 PM

Features

  • React 18 for building the user interface.
  • Tailwind CSS for styling components.
  • Custom utility functions to calculate rewards points.
  • Displaying data in a table-like structure using Tailwind CSS.
  • Simulating asynchronous API calls to fetch transaction data.

Getting Started

Prerequisites

  • Node.js installed on your system.

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/customer-rewards-app.git
  2. Navigate to the project directory:
    cd customer-rewards-app
  3. Install NPM packages:
    npm install

Available Scripts

In the project directory, you can run:

  • npm run dev: Runs the app in development mode.
  • npm run build: Builds the app for production to the dist folder.
  • npm run lint: Lints and checks for code quality.
  • npm run preview: Preview the production build.

Viewing the Application

After running npm run dev, open http://localhost:5173 to view the app in the browser.

Project Structure

  • src: Contains the source code for the application.
  • customer_transactions.json: Contains transaction data

Coding Challenge Details

This application was built as a response to a coding challenge with the following requirements:

  • A retailer offers a rewards program to its customers, awarding points based on each recorded purchase.
  • Points are earned as follows:
    • 2 points for every dollar spent over $100 in each transaction.
    • 1 point for every dollar spent between $50 and $100 in each transaction.
  • The application should calculate reward points earned for each customer per month and the total combined points.

Contact

Kyle Richardson - [email protected]

Project Link: https://github.com/krichdev/customer-rewards-app/

customer-rewards-app's People

Contributors

krichdev 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.