Coder Social home page Coder Social logo

kobbiman / r3-go Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sosaucily/r3-go

0.0 1.0 0.0 5.72 MB

React/Redux/Rails fast fast fast! - Based on react-boilerplate frontend

Home Page: https://www.r3-go.com

License: MIT License

ApacheConf 1.27% JavaScript 68.68% HTML 6.06% Shell 0.37% Ruby 23.14% CoffeeScript 0.01% CSS 0.47%

r3-go's Introduction

#R3-GO!

A full-featured react / rails framework

Based on some great, popular projects from around the nets, combined together for awesomeness and speed.

  • Rails Backend, React/Redux client.

  • Hosted completely independently on Heroku and Netlify, respectively.

  • React-toolbox for quickly leveraging redux friendly components styled with Material Design

  • Various features you "always" need are done! Including

  • Authentication system, email/pass using JWT tokens, ready to go, as well as Facebook(wip) and Google(wip)
  • Simple deploy scripts, done!
  • Admin portal(wip)

Client system is based primarily on https://github.com/react-boilerplate/react-boilerplate

Server is just a simple Rails 5 server for now. Considering basing the rails system on https://github.com/thoughtbot/suspenders but for now that seems like overkill

Requirements

Client

  • node ^4.5.0
  • yarn ^0.17.0 or npm ^3.0.0

Server

  • Ruby 2+

Getting Started

Setting up locally

  • Fork or clone the repo
  • In the 'server' directory, install the gems with bundle (hint: consider creating a gemset for housekeeping)
  • Create a figaro config file for your environment variables with bundle exec figaro install and then adding the basic settings as shown below.
  • In the 'client' directory, install the node modules with yarn install
  • Run the rails server; cd to 'server' and run env PORT=3001 rails server
  • In another terminal window, run the React client; cd to 'client' and run yarn start
  • If you like foreman, do both at once with foreman start Procfile in the root dir.

Setting up for 'prod' deploy

Deploying the Rails server

  • Set up a free heroku instance for the rails server
  • In the './deploy-server.sh' file, change the name of the heroku instance (the one you just created)
  • Run deploy-server.sh - Browse to your heroku server to make sure things are working
  • Run heroku run rake db:migrate
  • Push env variables to heroku with figaro heroku:set -e production
  • Add an admin user by connecting to the Heroku rails console heroku run rails console and issuing the command User.create({email: '[email protected]', password: 'password'})

Deploying the JS client

  • Update the API_URL variable in 'webpack.prod.babel.js' with the URL of your heroku instance
  • Configure a free netlify instance for your JS client, configuring it to auto-deploy on push to a branch called 'r3-go/production'
  • Run the deploy-client.sh script
  • Browse to your netlify page to see your awesome website and test your login flow!

More about React client

Updating global js variables

See the 'API_URL' example in the webpack..babel.js files. WIP

More about Rails server

WIP

Figaro config settings

WIP

r3-go's People

Contributors

sosaucily avatar

Watchers

James Cloos 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.