All Projects → thetribeio → node-react-starter-kit

thetribeio / node-react-starter-kit

Licence: MIT license
A quick starter kit to bootstrap NodeJS/ReactJS app

Programming Languages

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

Projects that are alternatives of or similar to node-react-starter-kit

simple-react-native-starter
Simple ReactNative starter with an opinionated folder structure for mobile development.
Stars: ✭ 73 (+170.37%)
Mutual labels:  starter-kit
wakib-emacs
Emacs Starter Kit based on Wakib keybindings
Stars: ✭ 28 (+3.7%)
Mutual labels:  starter-kit
hbuild
⚔repaid build web/vue/react project starter kit with cli
Stars: ✭ 37 (+37.04%)
Mutual labels:  starter-kit
gw-starter-kit
PEPELAC - Современный инструментарий для вёрстки и создания статичных сайтов с использованием Webpack
Stars: ✭ 30 (+11.11%)
Mutual labels:  starter-kit
frontend-starter-kit-with-gulp
Frontend Starter Kit with Gulp for either Themeforest Projects or customizable projects.
Stars: ✭ 34 (+25.93%)
Mutual labels:  starter-kit
tm-nextjs-starter
React + Nextjs + MobX starter
Stars: ✭ 49 (+81.48%)
Mutual labels:  starter-kit
laravel-startkit
Laravel Admin Dashboard, Admin Template with Frontend Template, for scalable Laravel projects. It is to save your time when You start with new scalable Laravel projects with many features Bootstrap, cooreui, infyom admin Generator, roles and permissions, translatable models, spatie media and much more
Stars: ✭ 55 (+103.7%)
Mutual labels:  starter-kit
webpack-starter
'Just Add Water' Webpack 2, babel and glslify gourmet mix.
Stars: ✭ 13 (-51.85%)
Mutual labels:  starter-kit
puppeteer-jest-starter
A starter-kit quipped with the minimal requirements for Puppeteer + Jest, making E2E testing a breeze.
Stars: ✭ 17 (-37.04%)
Mutual labels:  starter-kit
beego-vuejs-starter-kit
Beego (GOLANG), Webpack, Sass, Vue.js, Vuex, Buefy
Stars: ✭ 32 (+18.52%)
Mutual labels:  starter-kit
wordpress-project
Generic project structure for WordPress website industrialisation.
Stars: ✭ 28 (+3.7%)
Mutual labels:  starter-kit
react-admin
基于React + ant-design的用作后台管理项目的脚手架
Stars: ✭ 96 (+255.56%)
Mutual labels:  starter-kit
nest-typescript-starter
Nest framework TypeScript starter (node.js)
Stars: ✭ 35 (+29.63%)
Mutual labels:  starter-kit
react-native-ultimate-starter
A React Native Ultimate Starter - react-navigation v5 + redux-toolkits + dark and light theme and more.
Stars: ✭ 16 (-40.74%)
Mutual labels:  starter-kit
progressive-web-app-starter
Preact based starter kit for making a Progressive Web App (PWA).
Stars: ✭ 19 (-29.63%)
Mutual labels:  starter-kit
starter-kit-doogie-browser
Statamic Starter Kit: Doogie Browser
Stars: ✭ 39 (+44.44%)
Mutual labels:  starter-kit
discord-py-heroku
Starter kit for hosting a Discord bot on Heroku
Stars: ✭ 85 (+214.81%)
Mutual labels:  starter-kit
commercejs-chopchop-demo
A Commerce.js starter kit for Next.js. A beautifully designed elegantly developed, end to end commerce experience for developers and agencies. Pre-integrated with Stripe. One-click deploy to Vercel.
Stars: ✭ 129 (+377.78%)
Mutual labels:  starter-kit
fractal-starter-kit
Starter kit for Fractal with SCSS, Webpack, XO, sass-lint and Gulp
Stars: ✭ 22 (-18.52%)
Mutual labels:  starter-kit
saas-react-starter-kit-boilerplate
SaaStr is a React SaaS boilerplate to kickstart your new SaaS adventure as fast as possible. Built on top of Adonis JS for the BackEnd and React Starter Kit for the Front-End
Stars: ✭ 100 (+270.37%)
Mutual labels:  starter-kit

StarterKitBanner

Overview

This repository contains the source code for Node-React-Starter-Kit made by theTribe.io developpers team. The starter kit is built on top of Node.js, Express, React and Redux, containing modern web development tools such as Webpack and Babel.

A solid starting point for both professionals and newcomers to the industry.

Front-end tools Back-end tools Functional Testing Dev Environment Configuration
React Express Selenium Docker
Redux Postgresql Cucumber.js
CSS/SCSS Sequelize Saucelabs

Customization

The master branch of the starter kit does not include advanced integrations. However we do provide variants that you can use as a reference.

Getting Started

Installation

start the app

To run locally the project you should first install the dependencies

# for local environment
yarn install
yarn start

# for docker environment
docker-compose up -d
docker-compose stop app
docker-compose run --rm app yarn install
docker-compose run --rm app sequelize db:migrate
docker-compose start app

You may create a file docker-compose.override.yml at the root to override your configuration. Most likely you might be interested in opening a port on the host, or use your yarn cache in docker containers.

version: '2.4'
services:
  app:
    volumes:
      - ~/.cache/yarn:/home/app/.cache/yarn:rw
    ports:
      - 3000:3000

Configure your user id

The containers are configured tu run with an user with ID 1000 to remove permissions problems, but if your user ID is not 1000 you will need to configure the images to use your user ID.

You can get the your user ID by running id -u

If your user ID is not 1000 you will need to add the following config to your .env

UID=YourUID

And then run docker-compose build to rebuild your containers.

run the linter on your code

# run locally
yarn lint

# run in docker
docker-compose run --rm app lint

build the app

# to build locally
yarn build

# to build a production image (docker)
docker build -f .production/Dockerfile -t [image:tag] .

Run the production image locally

You might try to run the production image locally with docker-compose, to do so, simply create a new directory anywhere and use the following configuration.

version: '2.0'
services:
    app:
        # use the right tag
        image: [image:tag]
        environment:
            DATABASE_HOST: postgres
            DATABASE_NAME: thetribe
            DATABASE_USER: thetribe
            DATABASE_PASSWORD: 424242
            # set the env as you need it
        depends_on:
            - postgres
        ports:
            - 3000:3000
    postgres:
        image: postgres:10.7
        environment:
            POSTGRES_USER: thetribe
            POSTGRES_PASSWORD: 424242

Watch options

You may provide watch options for the compiler simply by writing a file named watchOptions.config.js at the root directory.

module.exports = {
    // Watching may not work with NFS and machines in VirtualBox
    // Uncomment next line if it is your case (use true or interval in milliseconds)
    // poll: true,
    // Decrease CPU or memory usage in some file systems
    // ignored: /node_modules/,
};

Global & module style sheets

You may import style sheets two ways in your app. Firstly, if you important a style sheets from the directories app/components or app/routes, your style will be imported as a module. It means you have to import it and manipulate it that way ;

// import it as a module
import style from './style.css';

// and use it that way
<div className={style.myDiv} />

However if you import a style sheet from elsewhere (node modules or another location in your sources), it wil be imported as a global. It means you have to import it that way ;

import './style.css';

You may either import CSS style sheets or SASS stylesheet (using the extension .scss).

Inject settings to frontend (appData)

The backend renders the HTML entry point for your application. By doing so, it allows you to inject settings into your frontend application.

First you've to push your data into an object on your server side.

// api/index.js
const appData = {
    /* ... */
    myInjectedSettings: 42,
    /* ... */
};

Then you may get those injected settings anywhere in your react scope. You may either use a custom hook.

import { useAppData } from '@app/App';

const MyComponent = () => {
    const { myInjectedSettings } = useAppData();

    /* ... */
};

Or use the context consumer directly.

import { AppDataContext } from '@app/App';

class MyComponent extends Component {
    render() {
        const { myInjectedSettings } = this.context;

        /* ... */
    }
}

MyComponent.contextType = AppDataContext;

The injected settings (we call here appData) are also available in thunk reducers

const asyncActionCreator = () => (dispatch, getState, { appData }) => {
    const { myInjectedSettings } = appData;

    /* ... */
};
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].