All Projects → nwaywood → react-fullstack-template

nwaywood / react-fullstack-template

Licence: other
React template with a NodeJS backend

Programming Languages

javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects
HTML
75241 projects

Projects that are alternatives of or similar to react-fullstack-template

elegant-react-ssr
Server-side rendering with create-react-app, React Router v4, Helmet, Redux, and Thunk boilerplate, without ejecting CRA
Stars: ✭ 16 (-11.11%)
Mutual labels:  react-router, css-in-js
React Redux Saga Boilerplate
Starter kit with react-router, react-helmet, redux, redux-saga and styled-components
Stars: ✭ 535 (+2872.22%)
Mutual labels:  react-router, css-in-js
Arc
React starter kit based on Atomic Design
Stars: ✭ 2,780 (+15344.44%)
Mutual labels:  react-router, css-in-js
Registration-and-Login-using-MERN-stack
Simple Registration and Login component with MERN stack
Stars: ✭ 210 (+1066.67%)
Mutual labels:  react-router
stylish-components
A component styling library with minimalism and performance in mind
Stars: ✭ 18 (+0%)
Mutual labels:  css-in-js
quiz
🚀 🤖 Quiz Application With React Javascript
Stars: ✭ 22 (+22.22%)
Mutual labels:  react-router
DM Tools
An open-source Dungeons and Dragons DM helper desktop app built with React.js, Redux, SCSS
Stars: ✭ 41 (+127.78%)
Mutual labels:  react-router
react-router-testing-utils
A collection of utilities to test React Router with React Testing Library (Work in progress 🚧)
Stars: ✭ 34 (+88.89%)
Mutual labels:  react-router
git-issue-react-electronjs
⚙️. ⚛️. A desktop application created with Electronjs and Reactjs to be cross-platform to manage and track GitHub issues.
Stars: ✭ 21 (+16.67%)
Mutual labels:  react-router
gloss
a powerful style system for building ui kits
Stars: ✭ 16 (-11.11%)
Mutual labels:  css-in-js
react-demo
一个实际项目(OA系统)中的部分功能。这个demo中引入了数据库,数据库使用了mongodb。安装mongodb才能运行完整的功能
Stars: ✭ 92 (+411.11%)
Mutual labels:  react-router
web-components-hooks-demo
web components hooks demo
Stars: ✭ 17 (-5.56%)
Mutual labels:  css-in-js
OpenTrivia
Multiplayer quiz game demo using React and Opentdb API
Stars: ✭ 47 (+161.11%)
Mutual labels:  react-router
solid-styled
Reactive stylesheets for SolidJS
Stars: ✭ 92 (+411.11%)
Mutual labels:  css-in-js
rapid-react
A light weight interactive CLI Automation Tool 🛠️ for rapid scaffolding of tailored React apps with Create React App under the hood.
Stars: ✭ 73 (+305.56%)
Mutual labels:  react-router
cnode-react
a web app for cnode.org with react + react-router + react-redux
Stars: ✭ 23 (+27.78%)
Mutual labels:  react-router
kugou
multiple implementations for kugou music
Stars: ✭ 25 (+38.89%)
Mutual labels:  react-router
Questions
Web app inspired by Quora, allowing users ask question and get answers
Stars: ✭ 15 (-16.67%)
Mutual labels:  react-router
Animex
This is a single page application which allows users to browse and view a catalog of anime series and movies. Built with React/Redux.
Stars: ✭ 31 (+72.22%)
Mutual labels:  react-router
react-router-v4-CN
React Router V4 中文文档
Stars: ✭ 806 (+4377.78%)
Mutual labels:  react-router

React Fullstack Template

This repository contains a project template for React/NodeJS development

  1. Features
  2. Getting Started
  3. Application Structure
  4. Development
  5. Deployment
  6. Linting and Formatting
  7. History

Features

Getting Started

Note: node 7.6 or later is required for this template to work since it uses ES6 generators

Setup directory for project:

git clone [email protected]:nwaywood/react-fullstack-template.git <your-project-name>
cd <your-project-name>
rm -rf .git

From the root directory, install the project dependencies and check that it works:

npm install           # install dependencies
npm run serve         # run the server

and then from another terminal:

npm start             # compile and launch

Application Structure

.
├── app                            # Frontend application
│   ├── public                     # Static resources (html, images etc)
│   └── src                        # Source code, which is bundled into the `dist` folder by `webpack`
│       ├── index.js               # The entrypoint for the React application
│       ├── AppErrorBoundary.js    # Generic top level Error Boundary for the application
│       ├── globalCSS.js           # Any global CSS used in the application (should be kept to a minimum)
│       └── ...                    # Domain specific components
├── dist                           # Build directory, which is served by the server as static directory
└── server                         # Root folder for server code

Note: The structure of domain specific components within /src follow the presentational vs component model. Refer to this blog post for more information

Development

npm start

to start the development server. And to communicate with the api:

npm run serve:watch

and the devServer will proxy api calls to the backend koa server... magic!

Deployment

npm run build          # compile project into /dist folder

then you can serve the production app with

npm run serve

By default the production server listens on port 3000

If you want to run the application on port other than 3000, simply define it as environment variable:

PORT=4000 npm run serve

Docker

Build the docker image:

docker build -t YOUR_IMAGE_NAME .

Run the container:

docker run -it -p 3000:3000 --name YOUR_CONTAINER_NAME YOUR_IMAGE_NAME

Linting and Formatting

This project uses prettier integrated with eslint to show formatting errors via eslint. To automatically fix these formatting errors you can run npm run format. However, it is recommended to integrate this functionality with your editor to improve the development workflow.

History

For an overview of the evolution of this template and key design decisions we have made, see here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].