Giter VIP home page Giter VIP logo

gdpr-react-redux-starter's Introduction

gdpr-react-redux-starter

Not ready to face the GDPR🇪🇺 yet? Use this starter app as a quick solution! Render different content to EU residents (or a simple "sorry, we're working on it" screen). This app knows from which IP address the user is coming and will render the component accordingly. All you have to do is fill up the component!

Built with

  • Node.js
  • Express.js
  • React.js/Redux
  • ES6
  • uses free ipinfo.io API. Consider getting the API token if you expect more than 1000 hits a day.

Getting started

  1. Clone and install
$ git clone https://github.com/Nukki/gdpr-react-redux-starter.git starter
$ cd starter
$ npm install
  1. Run
$ npm start 

In your browser go to http://localhost:3000. Because you're running it on localhost, you will only be shown the "non-EU version", because 127.0.0.1 resolves as non-EU IP address. I'm working on a feasible way to test the "EU version" other than deploying it on heroku.

  1. For development run each command in a separate terminal window
$ npm run start-watch
$ npm run build-watch

About Components

There are three components in app/components/ you should pay attention to.

  • <MainContainer /> in MainContainer.js decides which child to render. Feel free to style it
  • <EuropeanHome /> is rendered to users with EU IP address. EuropeanHome.js is where components(code) for EU residents will go
  • <Home /> is rendered to users with non-EU IP address. RegularHome.js is where components(code) for non-EU users will go

Demo / PoC

Here is what you will see after deplying this app on heroku:

  1. Connect from IP address that belongs to EU alt text


  1. Connect from IP address outside of EU alt text Feedback welcome!

TODO

gdpr-react-redux-starter's People

Contributors

nukki avatar

Stargazers

 avatar

Watchers

 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.