Giter Site home page Giter Site logo

afrostream-front-end's Introduction

React + Redux example

Also includes ReactRouter, Immutable for Universal (isomorphic) application. This is good start for those who want a full solution to work with a RESTful API. This project is written with ES7 and uses Babel to transpile to ES5.

Redux v1.0.0-alpha is now available on npm. You can view the example for [email protected] on branch redux@alpha. Anyway, you should wait for Redux 1.0 docs.

##Installation

npm install

##Run Dev

npm run dev

##Run Staging

npm run staging

Run afrostream.dev:3000 in browser

##Deploy

git push

Make on pull request build a new heroku app review automatically Push on master to build it

##How it works ###API Thanks to React and Redux, Server side and client side calls will run almost the same code for rendering.

The differences are in how api calls from the client and from the server (running the same code with client) are achieved. Server side calls may send information that is different from client, such as an accessToken field (which is received from each request's session), or may send to another api-server.

The api methods should therefore be different between server and client. You can take a look at implementations of the api method on the server (/server/index.js) and client (/src/js/main.js).

###Why Immutable?

Data changing over time can cause some unpredictable errors. Immutable makes sure the referenced objects won't have their data changed over time. If you want to change the data, you must reference it to another object. For example:

handleStarButtonClick() {
  const repo = this.state.repo; // Assume we use Immutable for state.repo
  this.setState({
    repo: repo.set('starred', true)
  });
}

##TODO

  • Improve english.
  • Rewrite README.md
  • Add inline-style.
  • Prevent first loading when having initial state.
  • Loading indicator.

afrostream-front-end's People

Contributors

benjipott avatar dabielf avatar johnarch avatar nelsounet avatar saxinfone avatar syndr0m avatar tominardi avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

afrostream-front-end's Issues

in some case, problem with payment process

People are blocked in the spinner,

No way to know why,
best way to solve this issue is to add some logmetrics to know what process is blocking now,
let's talk with Nelson to add some

Disable ajax call on unsecured route

disable all ajax call and prefer use redux call promise

var apiPath = config.apiClient.urlPrefix + '/subscriptions/billing/' + accountCode;
    var cardLastFour;

    $.ajax({
      type: 'GET',
      url: apiPath,
      dataType: 'json',
      async: false,
      success: function (responseData) {

        cardLastFour = responseData.data.billing_info.last_four;
        self.setState({cardNumber: cardLastFour});
      },
      error: function (err) {

        console.log('**** there was an error ***');
        console.log(err);
        console.log('*** end of error message ***');
        cardLastFour = '';
        self.setState({cardNumber: cardLastFour});
      }

Call redux same method in paymentForm (the route in api are created

dispatch(UserActionCreators.billing(formData)).then(function () {
        //get result
      }).catch(function (err) {
       //catch error
      });
dispatch(UserActionCreators.me(formData)).then(function () {
        //get result
      }).catch(function (err) {
       //catch error
      });

Check that only active objects should not be shown

Only Licensors, Movies, Seasons, Episodes, Videos that are active (field active is set to 'yes') must be shown.

For Example, we can see unactive 'Seasons'.

Please check that the search Engine is aware of that filter in order to find only contents that can be broadcasted.

ALERT Request timeout mails reçu pour le chemin /compte

Regarde bien tes mails, on a reçu plusieurs à propos de ce sujet:

319 <158>1 2015-09-11T20:15:29.543132+00:00 heroku router - - at=error code=H12 desc="Request timeout" method=GET path="/compte" host=afrostream.herokuapp.com request_id=87db4a42-3f64-40b6-8f21-1aef77f4c62f fwd="23.235.43.43" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0

l'utilisateur arrive sur la page "choissisez la formule" pendant *deuxième* visite

scenario:

  1. Utilisateur achète une formule. Il arrive sur la page du player tout de suite.
  2. Il navigue en direction d'un autre site (n'importe quel, facebook par exemple.)
  3. Il visite beta.afrostream.tv encore. Il est connecté déjà. Mais pendant le deuxième visite, et tout les visites suivant avec ce token, il arrive sur la page de "choissisez la formule."
  4. Si il se déconnecte, et en suite il se réconnecte, il toujours arrive sur la page du player.

Play issues

Reported by Tonjé.

Videos do not play on Mac/Chrome, Mac/Firefox, on iPad (but it is ok on a iphone 6 Plus).
There's just a black screen.

When creating a user his billing_provider is not set

Now that we are using 'recurly', when adding a user the field 'billing_provider' should always be set to 'recurly'.

I didn't see any consequences even it's empty so it's not a blocker.

As a quick fix, we can set the default value to 'recurly'...

subscriptions: card number and card country must match

today I purchased a subscription with my american carte crédit. the country selected in the formulaire was France. Purchases should be rejected if the country does not match the card's country. I believe this is a bug that has been introduced.

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.