Git Product home page Git Product logo

chain-reaction's Introduction

Chain Reaction

Presented By: Eric Nograles, Orlando Code Camp 2016

Overview

This project represents a hypothetical multi-platform application called Chain Reaction that demonstrates how React, React Native and Redux, when used together, can be an amazing architectural foundation for applications of any scale.

Installation

  1. Install Node Version Manager
  2. Install MongoDB
  • (Mac OSX Users) You may want to install Homebrew and then run brew install mongodb
  1. Clone this repo
  2. Run ./install.sh

Note: This project has not been tested in a Windows machine, but should theoretically work, assuming you have a bash port for Windows installed, such as cygwin or win-bash

Run the Common Library

  1. In a terminal from the root of this repo, type in cd ./chain-reaction.common
  2. Run npm run dev

Note: The common library gets transpiled to ES5 using Babel and we utilize Nodemon to watch any changes to /src, which will then compile into /lib automatically once you run npm run dev

Run the API

  1. In a terminal from the root of this repo, type in cd ./chain-reaction.api
  2. Make sure mongodb is running
  3. Run node app.js

Run the Web Client

  1. In a terminal from the root of this repo, type in cd ./chain-reaction.web
  2. Run ./start.sh
  3. Wait for browsers to open. http://localhost:8080 is the web application and http://localhost:8082 are your unit tests.
  • Note: Both will live reload as you modify files

Run the iOS App

Note: Be sure to install Xcode and/or the Android SDK before running.

  1. In a terminal from the root of this repo, type in cd ./chain-reaction.mobile
  2. Run ./start.sh

Architecture

Overview

The chain-reaction.common library represents all cross-platform shareable code. This includes all Redux components (store, reducers, actions) and also infrastructure items (services) that talk to external resources, such as a Web API.

Development Mode

This library was designed to be independent of any client framework. As such, you'll notice that we use NPM symlinks in the root install.sh to point the Web project to the source code. This is so that you can develop on the library concurrently with the web components.

For the Mobile application, because React Native's packager doesn't quite play well with symlinks, we simply have a Nodemon instance as part of its start.sh file which brings in an updated copy of chain-reaction.common to the mobile project.

In practice, a library like this may live in npm (public or private) which you can then npm install normally into the web or mobile projects, as any other Node library.

Overview

A simple Sails.js Web API that serves as the backend for the app

Overview

A React SPA, packaged with Webpack, that serves as the web front-end

Overview

A React Native project that is the baseline for the iOS and Android versions of the app

chain-reaction's People

Contributors

ericnograles avatar hconrad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hconrad

chain-reaction's Issues

MongoDB Info

Just noticed that MongoDB is a pre-req to run the app. Was going to submit a PR to add the installation info for MongoDB.

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.