├── tests ├── routes │ ├── Home │ │ ├── index.js │ │ ├── UserList │ │ │ ├── index.js │ │ │ ├── modules │ │ │ │ ├── reducers.spec.js │ │ │ │ └── actions.spec.js │ │ │ ├── components │ │ │ │ └── User.spec.js │ │ │ └── UserList.spec.js │ │ └── Report │ │ │ └── Report.spec.js │ └── Login │ │ ├── index.js │ │ └── LoginForm │ │ ├── modules │ │ └── actions.spec.js │ │ └── LoginForm.spec.js ├── store │ ├── createStore.spec.js │ └── reducers │ │ └── currentUser.spec.js ├── testHelper.js ├── components │ ├── Footer │ │ └── Footer.spec.js │ ├── Loading │ │ └── Loading.spec.js │ ├── Root │ │ └── Root.spec.js │ ├── Header │ │ └── Header.spec.js │ └── Forms │ │ └── LoginForm │ │ └── LoginForm.spec.js └── layouts │ └── CoreLayout │ └── CoreLayout.spec.js ├── src ├── components │ ├── Footer │ │ ├── Footer.scss │ │ ├── index.js │ │ └── Footer.js │ ├── Root │ │ ├── index.js │ │ └── Root.js │ ├── Header │ │ ├── index.js │ │ ├── Header.scss │ │ └── Header.js │ ├── Loading │ │ ├── index.js │ │ ├── Loading.js │ │ └── Loading.scss │ └── Forms │ │ └── LoginForm │ │ ├── index.js │ │ ├── LoginForm.scss │ │ └── LoginForm.js ├── static │ ├── styles │ │ ├── vendor │ │ │ └── .gitkeep │ │ ├── core.scss │ │ ├── module │ │ │ └── _panel.scss │ │ └── base │ │ │ └── _normalize.scss │ ├── robots.txt │ ├── logo.png │ ├── favicon.ico │ ├── redux.icns │ └── humans.txt ├── routes │ ├── Home │ │ ├── UserList │ │ │ ├── UserList.scss │ │ │ ├── index.js │ │ │ ├── modules │ │ │ │ ├── reducers.js │ │ │ │ └── actions.js │ │ │ ├── components │ │ │ │ ├── User.scss │ │ │ │ └── User.js │ │ │ └── UserList.js │ │ ├── Report │ │ │ ├── index.js │ │ │ ├── Report.scss │ │ │ └── Report.js │ │ └── index.js │ ├── Login │ │ ├── index.scss │ │ ├── LoginForm │ │ │ ├── index.js │ │ │ ├── modules │ │ │ │ └── actions.js │ │ │ └── LoginForm.js │ │ └── index.js │ ├── NotFound │ │ └── index.js │ └── index.js ├── layouts │ └── CoreLayout │ │ ├── CoreLayout.scss │ │ ├── index.js │ │ └── CoreLayout.js ├── index.html ├── store │ ├── reducers.js │ ├── createStore.js │ └── reducers │ │ └── currentUser.js ├── modules │ ├── refetch.js │ ├── currentUser.js │ └── fetch.js └── main.js ├── cli ├── theme │ ├── font-awesome.config.less │ ├── font-awesome.config.js │ ├── font-awesome.config.prod.js │ └── extract-style-loader.js ├── server.js ├── client.js ├── webpack.dev.js ├── webpack.test.js ├── webpack.prod.js └── webpack.config.js ├── postcss.config.js ├── .gitignore ├── .babelrc ├── .eslintrc.json ├── README.md ├── .bootstraprc ├── .stylelintrc └── package.json /tests/routes/Home/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/routes/Login/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Footer/Footer.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/static/styles/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/store/createStore.spec.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cli/theme/font-awesome.config.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/routes/Home/UserList/UserList.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/routes/Home/UserList/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /src/static/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /src/routes/Login/index.scss: -------------------------------------------------------------------------------- 1 | .login { 2 | overflow: auto; 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /dist 3 | /build 4 | /coverage 5 | *.swp 6 | *.swo 7 | -------------------------------------------------------------------------------- /src/components/Root/index.js: -------------------------------------------------------------------------------- 1 | import Root from './Root' 2 | 3 | export default Root 4 | -------------------------------------------------------------------------------- /src/layouts/CoreLayout/CoreLayout.scss: -------------------------------------------------------------------------------- 1 | .mainContainer { 2 | padding: 20px 0; 3 | } 4 | -------------------------------------------------------------------------------- /src/components/Footer/index.js: -------------------------------------------------------------------------------- 1 | import Footer from './Footer' 2 | 3 | export default Footer 4 | -------------------------------------------------------------------------------- /src/components/Header/index.js: -------------------------------------------------------------------------------- 1 | import Header from './Header' 2 | 3 | export default Header 4 | -------------------------------------------------------------------------------- /src/routes/Home/Report/index.js: -------------------------------------------------------------------------------- 1 | import Report from './Report' 2 | 3 | export default Report 4 | -------------------------------------------------------------------------------- /src/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MQuy/redux-boilerplate/HEAD/src/static/logo.png -------------------------------------------------------------------------------- /src/components/Loading/index.js: -------------------------------------------------------------------------------- 1 | import Loading from './Loading' 2 | 3 | export default Loading 4 | -------------------------------------------------------------------------------- /src/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MQuy/redux-boilerplate/HEAD/src/static/favicon.ico -------------------------------------------------------------------------------- /src/static/redux.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MQuy/redux-boilerplate/HEAD/src/static/redux.icns -------------------------------------------------------------------------------- /src/components/Forms/LoginForm/index.js: -------------------------------------------------------------------------------- 1 | import LoginForm from './LoginForm' 2 | export default LoginForm 3 | -------------------------------------------------------------------------------- /src/layouts/CoreLayout/index.js: -------------------------------------------------------------------------------- 1 | import CoreLayout from './CoreLayout' 2 | 3 | export default CoreLayout 4 | -------------------------------------------------------------------------------- /src/routes/Home/UserList/index.js: -------------------------------------------------------------------------------- 1 | import UserList from './UserList' 2 | 3 | export default UserList 4 | -------------------------------------------------------------------------------- /src/routes/Login/LoginForm/index.js: -------------------------------------------------------------------------------- 1 | import LoginForm from './LoginForm' 2 | 3 | export default LoginForm 4 | -------------------------------------------------------------------------------- /src/static/styles/core.scss: -------------------------------------------------------------------------------- 1 | :global { 2 | @import "base/normalize"; 3 | @import "module/panel"; 4 | } 5 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env", "react", "stage-0"], 3 | "plugins": ["transform-runtime", "transform-decorators-legacy"] 4 | } 5 | -------------------------------------------------------------------------------- /tests/testHelper.js: -------------------------------------------------------------------------------- 1 | import spies from 'chai-spies' 2 | import chaiAsPromised from 'chai-as-promised' 3 | 4 | chai.use(spies) 5 | chai.use(chaiAsPromised) 6 | -------------------------------------------------------------------------------- /src/components/Footer/Footer.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export const Footer = () => ( 4 | 6 | ) 7 | 8 | export default Footer 9 | -------------------------------------------------------------------------------- /src/static/humans.txt: -------------------------------------------------------------------------------- 1 | # Check it out: http://humanstxt.org/ 2 | 3 | # TEAM 4 | 5 | -- -- 6 | 7 | # THANKS 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/routes/Home/Report/Report.scss: -------------------------------------------------------------------------------- 1 | .panelRight { 2 | margin: 0 0 0 20px; 3 | } 4 | 5 | .chart { 6 | padding: 28px 4px 28px 0; 7 | } 8 | 9 | .avatar { 10 | width: 60%; 11 | } 12 | -------------------------------------------------------------------------------- /cli/theme/font-awesome.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | styles: { 3 | mixins: true, 4 | core: true, 5 | icons: true, 6 | larger: true, 7 | path: true, 8 | animated: true, 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /src/static/styles/module/_panel.scss: -------------------------------------------------------------------------------- 1 | .panel { 2 | background-color: white; 3 | border: 1px solid #e6e6e6; 4 | 5 | .title { 6 | padding: 28px 28px 8px 28px; 7 | font-size: 16px; 8 | font-weight: bold; 9 | text-transform: uppercase; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Boilerplater 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /src/routes/Home/UserList/modules/reducers.js: -------------------------------------------------------------------------------- 1 | import { CHANGE_ACTIVE_USER } from './actions' 2 | 3 | export function activeUser(state = {}, action) { 4 | switch(action.type) { 5 | case CHANGE_ACTIVE_USER: 6 | return { ...action.user }; 7 | default: 8 | return state; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/routes/Home/UserList/modules/actions.js: -------------------------------------------------------------------------------- 1 | export const CHANGE_ACTIVE_USER = 'CHANGE_ACTIVE_USER'; 2 | 3 | export function activeUser(user) { 4 | return { 5 | type: CHANGE_ACTIVE_USER, 6 | user 7 | } 8 | } 9 | 10 | export function changeActiveUser(user) { 11 | return (dispatch) => dispatch(activeUser(user)); 12 | } 13 | -------------------------------------------------------------------------------- /src/components/Header/Header.scss: -------------------------------------------------------------------------------- 1 | .nav { 2 | height: 64px; 3 | font-size: 16px; 4 | border-bottom: 1px solid #e3e3e3; 5 | background-color: white; 6 | box-shadow: 0 0 6px -2px rgba(0, 0, 0, 0.1); 7 | } 8 | 9 | .logo { 10 | height: 40px; 11 | } 12 | 13 | .navRight { 14 | margin: 14px 0; 15 | } 16 | 17 | .icon { 18 | cursor: pointer; 19 | } 20 | -------------------------------------------------------------------------------- /tests/components/Footer/Footer.spec.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { shallow } from 'enzyme' 3 | import { Footer } from '$root/components/Footer/Footer' 4 | 5 | describe("(Component) Footer", () => { 6 | let _wrapper; 7 | 8 | beforeEach(() => { 9 | _wrapper = shallow(