brianyan / Dispatchr

Capstone 2016-2017

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dispatchr

Dispatcher enables consumers to receive any item from local businesses, saving them time and providing additional convenience

Usage

For clientside app (iOS):

  • npm install
  • react-native run-ios

For backend API: If running locally:

  • bundle install
  • rails s

Otherwise, you can deploy to Heroku and use that public endpoint instead of the local server.

Files

dispatchr-ruby/

  • This is the directory for the API we built with Rails 5.0
  • Most of the endpoints and logic is within /app/controllers
  • DB migrations are in /db/migrate
  • Models (with associations) are in /app/models

Frontend Documentation

Dispatchr/

Technologies Being Used

React Native

  • Used to create cross platform apps. Can be deployed to iOS, Android, Desktop, Web.
  • ES6 JavaScript is heavily used.
  • Really hard/inpractical to test UI, however.

Redux

  • A react native library that makes managing react native states much more easier.
  • Introduces 3 powerful concepts:
    • Single source of truth: The state of your whole application is stored in an object tree within a single store.
    • State is read-only: The only way to change the state is to emit an action, an object describing what happened.
    • Changes are made with pure functions: To specify how the state tree is transformed by actions, you write pure reducers.
  • These 3 concept s sets up the project structure for our app.

Redux Saga

  • Helps manage any side effects, such as asynchronous calls, API calls, background service
  • Saga runs a task (usually in response to seeing an action called) in the background. Once the task finishes, saga emits a new action that redux handles.

Project Structure

The project structure is setup to match the redux core components. In the app/ folder you will find the following:

  • actions
  • reducers
  • sagas
  • components
  • containers
  • lib The app/ folder is where our source code lives. Everything else is autogenerated. Almost every one of these folders has an index.js file. This is used to combine all the other files when a developer imports that folder.

Actions

Reducers

Sagas

Containers

Components

  • Just like containers except they are strictly presentational. They don't modify state, just present it.

Libraries

  • A folder full of useful helper functions.

About

Capstone 2016-2017


Languages

Language:Ruby 48.4%Language:JavaScript 47.6%Language:Objective-C 2.1%Language:Java 0.9%Language:Python 0.8%Language:HTML 0.1%Language:Shell 0.1%