Git Product home page Git Product logo

bsk-mastersound's Introduction

React Template App

This app is meant to serve as the basis for my future React apps. It has my preferred technologies, testing frameworks, and project structure pre-configured so that I don't have to set up the same boilerplate with every project. If you're curious about my opinions and preferences when it comes to frontend development, this is a great place to look!

To Copy*:

  1. Clone this project if it is not already on your machine.
  2. When you want to create a new app based on this template, create a new directory for the project with mkdir [new-project-name-here]
  3. Copy/paste this repo's files & folders into the new directory.
    • Make sure you copy the hidden .eslintrc.js and .gitignore files. (Display these in Finder by hitting Command + Shift + . ) However, you probably don't want to copy the .git or node_modules/ directories.
  4. Install packages with npm i
  5. Confirm everything is working as expected by running npm run test
  6. Setup the new project's git repo with git init
    • At this point, if you don't want to commit a bunch of CHANGE_ME variable names, you should change these values. See "To Customize" below.
  7. Create an initial commit with git add . && git commit -m "Initial commit from template app".
  8. Create a new remote repository for the app on your preferred host (GitHub, Bitbucket, etc.)
  9. Add the remote origin with git remote add origin [url-provided-by-repo]
  10. Commit to remote with git push -u origin master
  11. Begin development!

*If these instructions seem overly specific, it's because I don't trust my own memory--not because I don't trust your capabilities. I've been burned one too many times by telling myself "Surely I'll remember how to do this forever!" As a result I lean toward excess specificity in things like this, just in case.

To Customize:

There are several fields which will be different for every app, like site title, footer copyright owner, site icon, etc. Find these by searching for CHANGE_ME across the entire app directory, including file names. Change these fields/files.

To Develop:

  • Install packages: npm i
  • Start app: npm start
  • Start app in background using pm2: npm run start-background
  • Kill background app process: npm run kill-background
  • Run all tests (unit, visual, integration, and lint): npm run test
  • Run CI-only tests (all except visual): npm run test:ci
  • Run unit tests: npm run jest
  • Run lint: npm run lint
  • Run visual regression tests: npm run backstop:test
  • Open integration tests: npm run cypress:open

Project Structure

The app's JSX files are categorized into pages and components. Redux actions and reducers are housed in their own directories as well. The app's overall styles are set in index.scss and its style constants are defined in globals.scss. Each .scss file should import globals.scss. Linter preferences are defined in .eslintrc.js and unit test setup is performed in setupTests.js. Backstop and Cypress tests are configured in their own top-level directories.

Technologies

  1. UI Framework: React (using Create React App)
  2. State Manager: Redux
  3. Package Manager: NPM
  4. Routing: React-Router-Dom
  5. CSS Processor: SASS

Testing Frameworks

  1. Unit Tests: Jest/Enzyme
  2. Linter: ESLint
  3. Visual Regression Tests: BackstopJS
  4. Integration Tests: Cypress

bsk-mastersound's People

Contributors

ac3charland avatar

Watchers

James Cloos avatar  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.