Snippod-Starter-Demo-App-Front is a front part of snippod-starter demo application. A Snippod-Starter-Demo-App is a 'Full Stack Single Page Application' for the starter who want to be a web application developer. This repository code is based on React and Redux.
This codelab branch is the starting point of study web application. Please checkout at the starting point 'LAB01' tag and follow the higher tags step by step.
We made this using these technologies.
- React
- Redux
- normalizr
- Redux Form
- Semantic UI
- Radium
- React Router and react-router-redux
- React Intl
- SuperAgent
- Webpack
- Node.js
- Express
Preliminaries :
- npm v2.15.5 or higher
- Node v4.4.6 - We highly recommend Node Version Manager (NVM)
You have to git clone this repository.
git clone https://github.com/shalomeir/snippod-starter-demo-app-front
git checkout LAB01
And we recommend to use a Chrome DevTools with React Developer tools for debugging.
More information about setup development environment is available here written in Korean.
npm install
npm run build:semantic
After node packages are installed, automatically build a semantic ui for styling and bundling by webpack. A module bundling by webpack process is a little time consuming task (about 60 sec).
Dev local node server interacted with public shared REST API server hosted by Snippod Inc..
npm run dev
Dev local node server interacted with localhost REST API server 'snippod-starter-demo-app-server' which should be run first in your computer.
npm run dev-local
Whatever you execute a development server, first executing time is a little time consuming task. (about 40sec) After then, react-hot-loader and redux-devtools are executed with a development server. So you can easily fix and debug a code. You don't needed to reboot a server for development.
npm run build
npm run start
Almost main javascript source are located './src' directory.
Also customized theme semantic ui source are located './semantic/src/site' directory. All semantic ui code are merged by webpack.
At some point, Inline Styles is injected by Radium.
What initially gets run by Express is bin/server.js
, which does little more than enable ES6 and ES7 awesomeness in the server-side node code. It then initiates server.js
.
We'd like to apply node server for react server-side rendering, but didn't make perfectly yet.
A front side ajax call usually doing in Actions. We use Ducks for handling actionTypes and actions, reducer.
Almost front source architecture is based on 'React Redux Universal Hot Example'.
More information about tutorial is provided by google slide at here written in Korean.
A demonstration of this app can be seen here.
Fear not. chtefi has figured out what needs to be changed to make it work on Windows 8.
They will only show in development, but if you want to disable them even there, set __DEVTOOLS__
to false
in /webpack/dev.config.js
.
Contributions, questions and comments are all welcome and encouraged.
Copyright 2016 Snippod Inc.