Giter VIP home page Giter VIP logo

bigcommerce / stand-with-ukraine-frontend Goto Github PK

View Code? Open in Web Editor NEW
2.0 5.0 3.0 628.25 MB

Stand With Ukraine is a BigCommerce application. It allows merchants to easily add a widget to their storefront with a customized message and list of Charities that the merchant would like their shoppers to visit and support.

Home Page: https://www.bigcommerce.com/apps/stand-with-ukraine/

License: MIT License

HTML 0.98% TypeScript 91.11% JavaScript 3.27% SCSS 4.08% Shell 0.56%
bigcommerce monorepo react ukraine

stand-with-ukraine-frontend's Introduction

Stand with Ukraine App

Frontend Components


Overview

Stand With Ukraine is a BigCommerce application. It allows merchants to easily add a widget to their storefront with a customized message and list of Charities that the merchant would like their shoppers to visit and support.

Repositories

Usage

If you have a BigCommerce store and would like to use the widget - please install it via the BigCommerce app store. If you have a website on any other platform - you can use the following html to embed the widget. Feel free to edit the title and body text shown in the modal. You can configure some of the variables by reading the allowed values in /packages/config/types.ts.

<script>
  window.SWU_CONFIG = {
    style: 'black',
    placement: 'bottom-right',
    charity_selections: ['razom', 'mira-action', 'new-ukraine'],
    modal_title: 'Help the people of Ukraine!',
    modal_body:
      'With each day, the war in Ukraine worsens at an alarming pace. Millions of civilians have lost their homes and many more are without basic necessities like food, water, and health care. Consider donating to one of the charities below and join us in showing support for Ukraine. All charities are trusted, non-profit organizations dedicated to Ukrainian relief efforts. It takes less than a minute.',
  };
</script>
<script defer src="https://stand-with-ukraine-bc-app.web.app/widget/index.js"></script>

Project Structure

  1. Application Dashboard - apps/dashboard This is the configuration dashboard served to the merchant when they open the app from within the BigCommerce store apps. It is responsible for allowing the merchant to install/update/remove the widget from the store.

  2. Storefront Widget - apps/widget The widget that is injected on the storefront. For local development the configuration is fetched from the mock api and stored in window.SWU_CONFIG. In production the storefront script will have SWU_CONFIG defined directly.

  3. Mock Server - apps/mocks It uses local file system to store state for easy development without needing to run the backend project and database

The shared packages are stored in the packages folder.

Start Local Development

  1. Install NodeJS & Yarn - Recommended version NodeJS ~v16 & Yarn ~v1
  2. Install Dependencies yarn install
  3. Start local servers yarn dev
    • dashboard available at http://localhost:3001/dashboard/
    • widget available at http://localhost:3002/widget/
    • api requests are proxied from /api routes on widget and dashboard servers to mock api server running at port 9000

Helpful Commands:

  1. yarn build builds all the projects
  2. yarn lint checks all the projects using tslint
  3. yarn format auto formats all the project files
  4. yarn clean clears local dependencies and cache files

License

Copyright (c) 2017-present, BigCommerce Pty. Ltd. All rights reserved

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

stand-with-ukraine-frontend's People

Contributors

bc-acherednichenko avatar bc-micah avatar bc-roy avatar dependabot[bot] avatar golcinho avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

stand-with-ukraine-frontend's Issues

Condemn Israeli’s aggression against Palestine

We condemn Israeli's military agression against Palestine. We stand with the people of Palestine!

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen. Include a code sample or test case demonstrating the behavior that is not occurring / working as expected, as possible

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information, if applicable):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information, if applicable):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

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.