Giter VIP home page Giter VIP logo

he-cat-e / frontend-passionate-community Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wb-ts/frontend-passionate-community

4.0 0.0 0.0 8.3 MB

Frontend of the Project that empowers educators to achieve excellence in learning, teaching, and leading so that every child is healthy, safe, engaged, supported, and challenged. With React Typescript , Next.js , Material-UI , Jest , StoryBook , Algolia , Apollo , GraphQL.

Home Page: https://www.ascd.org

Shell 0.01% JavaScript 99.38% TypeScript 0.43% CSS 0.19% Procfile 0.01%

frontend-passionate-community's Introduction

Summary

Will need to update this readme

Installation

npm install

Usage

For development,

npm run dev

For production,

npm run build:fab

then,

npm run start

Code Linting

We are using ESLint and Prettier for code linting. Please set your code editor to format on save. For Visual Studio Code, you can simply open your VSCode Preferences -> Settings and set the Format On Save option to true for either your user, workspace or folder.

The configuration files can be found at the root dir: eslintrc.json and .prettierrc

UI Library

We are using Material UI. Learn more here https://mui.com/getting-started/learn/.

Storybook

To launch storybook locally, just run

npm run storybook

Snipcart setup

  1. Add/Edit environment variables

    • NEXT_PUBLIC_SNIPCART_ORDER_VALIDATION_BASE_URL - This needs to point to an exposed url address that snipcart can call for order validation. This url will also need to be added to the snipcart trusted Domain list on the Snipcart site. this is available under the Store Configurations > Domains & Urls.

      Local Environment - To setup an exposed url on your local dev env. You can use localtunnel. Then add the generated url to Snipcart trusted domain list.

      npm install -g localtunnel
      lt --port 3000
      

      Staging Environment - The url has already been added to snipcart so the base url just needs to pont to the stage url

      Production Environment - Snipcart will use the default domain defined in Snipcart so NO URL is needed

    • NEXT_PUBLIC_SNIPCART_JS_DATA_API_KEY - Add the secret key from Snipcart

  2. How its works

    When the items get added to the cart an order validation url gets included. This url is then used by Snipcart to call our api endpoint defined in the pages/api directory. The endpoint then process a the rquet and returns a JSON to validate the item exists on our site.

Run a script at build time

Adding this a reference for future use.


Finally, override your next.config.js to run this script as part of the build process.

module.exports = {
  webpack: (config, { isServer }) => {
    if (isServer) {
      require('./scripts/generate-sitemap');
    }

    return config;
  }
};

frontend-passionate-community's People

Contributors

wb-ts avatar

Stargazers

Marko avatar Top Dev avatar  avatar  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.