Overview
3REECircle CI is a universal JS application written with the 3REE stack, which includes React, Redux, RethinkDB, and Express. It is a stack that allows for building both front-end and back-end applications using only JavaScript. This project was created to experiment with these technologies and showcases how to build a universal JavaScript application, handle asynchronous Redux actions, use Socket.io with Redux, and achieve code splitting for different routes of an application using System.import() with React Router and Webpack2. It also includes features such as the use of Webpack 2’s code splitting and tree shaking features, the use of RethinkDB changefeeds for real-time updates, and a demo app.
Features
- Universal (Isomorphic) Javascript Application
- Use of Webpack 2’s Code Splitting and Tree Shaking features
- Asynchronous Redux actions example
- Use of RethinkDB Changefeeds for real-time updates
- Demo app hosted at 3ree-demo.workshape.io
Installation
To install and set up the 3REECircle CI theme, follow these steps:
- Install RethinkDB by following the instructions here.
- Clone the repository using the command
git clone git@github.com:GordyD/3ree.git. - Make sure you have Node v6.0.0 installed. It is recommended to use n for Node version management.
- Run
npm installto install the necessary dependencies. - If your local environment requires customizations, add a file at
config/local.json. - Run
npm run db-setupto set up the database. - To run the development server:
- On Linux/OSX, run
npm start. - On Windows, run
npm run start:win.
- On Linux/OSX, run
- Open http://localhost:3001 in two separate tabs to see changes propagate in real-time.
- To run the production server:
- Build the client with
npm run build:prod. - Install all production npm modules on the server using
npm install --prod. - Rsync your application to your server.
- Set up nginx or your preferred web server to map HTTP requests for your URL to http://localhost:3000.
- Run
npm run start:prodto run the server on your server.
- Build the client with
- Open your URL to access the deployed application.
Note: The production setup has not been tested on Windows.
Summary
3REECircle CI is a universal JavaScript application built with React, Redux, RethinkDB, and Express. It showcases the use of Webpack 2’s code splitting and tree shaking features, asynchronous Redux actions, RethinkDB Changefeeds for real-time updates, and integration of Socket.io with Redux. The project provides a demo app and serves as a guide for building your own Redux powered application. Installation instructions are provided for setting up the theme.