Giter VIP home page Giter VIP logo

e-commerce-serverless's Introduction

E-commerce store providing nicotine vape juice to Japanese customers faster than anyone.

  • Deployed using Serverless | AWS Lambda | AWS S3.
  • Backend API = GraphQL.
  • Database utilizes a Mongo Cluster with 3 nodes. 2 Full + 1 Arbiter.
  • Client-side API requests are generated from Apollo Client wrapped components.
  • Other Client-side API requests are generated using redux-sagas and the npm library api-sauce that adds an abstraction layer to axios.
  • The rest of the app sits on React.js & React Router(V3)* (with Code splitting), Redux & Redux Persist (with WebStorage).

Cloud Architecture

Site Address

Nic Juice 2 Japan.

  • โ˜๐Ÿผ That site is under Heavy Development and may at times, not be working. Will update here once availability is 100%.

Splash Preview

SETUP:

  • npm i || yarn to install dependencies
  • npm start for development server
  • npm run build for production server

OPTIONAL

  • touch .gitignore I use a global .gitignore_global file so you should add your own so as not to push node_modules/ once you've completed npm i.
  • brew update
  • brew install libpng for webpack image loader (image-webpack-loader see here)

NOTES:

  1. I Highly recommend running npm update --save || yarn upgrade to update package.json &/or yarn.lock before running npm start or npm run build.
  2. You may need to do a brew update for some of the webpack image loaders to properly work.
  3. If you're following our strategy and deploying the static site to Amazon S3, then you can also run deploy-to-s3. Be sure to modify the bucket name.

WARNINGS:

  • Uses webpack version 2.0.
  • Node engine explicitly defined in package.json for [email protected].
  • If you are not compliant with these versions, it's HIGHLY recommended you update.

TECHNOLOGIES:

  1. API's

* [fixer.io](http://fixer.io) | Exchange Rates.
* [taxratesapi.avalara.com](http://taxratesapi.avalara.com/) | Tax Rates.
* [ipinfo.io](http://ipinfo.io) | IP address & Geolocation.
* [Auth0](http://auth0.com) | User Management | Auth0 solutions.
* [Square](http://squareup.com) | Payment Services via Connect API.
* [Market Hero](http://markethero.com) | Marketing API.
* [Serverless](http://serverless.com) | Framework covering AWS Lambda.
* [AWS SES](https://aws.amazon.com/ses/) | Email Notifications.
* [AWS SNS](https://aws.amazon.com/sns/) | Receiving Backend Push Notifications.
* [AWS S3](https://aws.amazon.com/s3/) | Static asset hosting.
* [AWS Route 53](https://aws.amazon.com/route53/) | DNS routing.
* [AWS CloudFront](https://aws.amazon.com/cloudfront/) | Latency reduction via CDN.
* [AWS Lambda](https://aws.amazon.com/lambda/) | All Backend Services.
* [AWS Api-Gateway](https://aws.amazon.com/api-gateway/) | HTTP endpoints for Lambda services.
  1. Libraries & Packages

* Uses _recompose_ for customized Higher Order Component implementation.
* Uses _apisauce_ for API calls.
* Uses _react-router-redux_ for dispatching route changes & tracking nav history via redux.
* Uses _apollo-grpahql_ for providing API calls directly to componenents.
* Uses _redux-persist_ for long term browser caching.
* Uses _redux-sagas_ for dispatching and handling async actions.
* Uses _redux_sauce_ for creating reducers.
* Uses _redux-logger_ for informative dev. workflow @ devtools console.  
* Uses _redux-devtools-extension_ for  dev. workflow @ devtools console.
* Uses _babel-node_ for latest ECMA version transpiling of dev-backend and Hot reloading.
* Uses _BEM_ syntax styling for classNames.
* Uses _Airbnb Style Guide_.

NOTES:

  1. Redux Reducers:

* This bp's Redux reducer methods rely on the developer to customize the logic to maintain immutability of state. This was done _intentionally_ to strengthen developers abilities in manipulating state.  If this feels cumbersome, I highly recommend using _seamless-immutable_ (refs below) to outsource this process in a very clean, and simple way.
  1. Helper Libraries:

* [apisauce](https://github.com/skellock/apisauce)
* [redux-logger](https://github.com/evgenyrodionov/redux-logger)
* [redux-devtools-extension](https://github.com/zalmoxisus/redux-devtools-extension)
* [redux-saga](https://github.com/yelouafi/redux-saga)
* [ramda](https://github.com/ramda)
  1. Suggested Libraries:

* [redux-sauce](https://github.com/skellock/reduxsauce)
* [seamless-immutable](https://github.com/rtfeldman/seamless-immutable)
  1. Setting up S3 automation:

* See setup instructions [HERE](https://github.com/TobiahRex/nj2jp/blob/master/readmeFiles/s3Automation.md).
  1. Data Model Documentation:

* [Product Model](https://github.com/lakshmantgld/nj2jp/blob/master/readmeFiles/productSchema.md)
* [User Model](https://github.com/lakshmantgld/nj2jp/blob/master/readmeFiles/userSchema.md)

Important Launch Notes:

  1. Modifiy LAMBDA_GRAPHQL env variable throughout src/ application to point to the production database & lambda endpoint.
  2. Modify the serverless MONGO_URI env variable inside the AWS console dashboard.

e-commerce-serverless's People

Contributors

lakshmantgld avatar tobiahrex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

e-commerce-serverless's Issues

Max Quantity is Delayed.

When adding Items to the Cart. The maximum cut off is delayed by one cart interaction. Logically - there's a lack of state update somewhere. Investigate.

Social Media Btns

Social Media btns need an inner inside the with "display: flex".
(Safari only issue)

Button Fonts

Need to double check & ensure all button font-family attrs = "$p-font"

AddToCart: Check Profile in LocalStorage

After pressing Logout and then adding another item to the cart, the user's profile is returned and therefore automatically "logged back in". Need to verify the user's id from local storage before doing any mutations when logged in.

Make 25% promotion banners Clickable for New Members

Show modal with details about promotions. Offer the chance to Register if not already signed in. If they click on "YES" to the question "Would you like to become a member now?" send them to the registration page.

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.