Code Monkey home page Code Monkey logo

react-bootstrap-webpack-starter's Introduction

React, Bootstrap & SwaggerAPI Starter

Starter project for React, Bootstrap and Swagger-generated API, built with Webpack.

Motivation

There are many tutorials for simple React scaffolds. But, in real life and in a real project you need a few extra bits and bogs. Building those bits and bogs for the browser is a lot of pain that the simple tutorials don’t prepare people for.

Presenting here a strong React starter project that’s used in our latest real life frontend projects. It adds pretty Bootstrap templates and modals, works with the backend API, and is deployed to Netlify with zero effort.

In the box:

  • React and Webpack
  • A Swagger-generated API library, to consume backend services. You can of course generate your own API’s frontend library on editor.swagger.io (or using swagger-codegen).
  • Bootstrap including jQuery and support for custom templates
  • Build command that can be used to deploy the project on Netlify (or Amazon S3), for simple CI/CD
  • Development server with hot reload
  • ESLint with ES6 settings and built-in support for VSCode

Getting started

1. Install dependencies

$ yarn install

2. Optional: setup VSCode with eslint

cp -R ./.vscode.example ./.vscode

3. Run the development server (hot reload is enabled)

$ yarn dev

4. Build the project (will be copied to the dist folder)

$ yarn build

Others

1. Linting without VSCode

You can point any other IDE's to the eslint config in .eslintrc, or just use eslint from console:

$ ./node_modules/.bin/eslint <JS_FILE_PATH> --fix

2. Generating the API code

The current dummy backend is localted under lib/api. Replace this with other API generated here.

3. CI/CD

If you set up a CI/CD (for example using S3 or Netlify: simply build with yarn build and then copy all static files from dist/ to the bucket or service.)

License

MIT, do-with-the-code-whatever-you-please License

About

Richard Dancsi

react-bootstrap-webpack-starter's People

Contributors

dependabot-preview[bot] avatar wimagguc avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.