js-stack-from-scratch README

The project's README from github.com/verekia/js-stack-from-scratch. As one markdown file: README.md.

JavaScript Stack from Scratch

Build Status Release Gitter

React Redux React Router Flow ESLint Jest Yarn Webpack

Welcome to my modern JavaScript stack tutorial: JavaScript Stack from Scratch.

🎉 This is the V2 of the tutorial, major changes happened since the 2016 release. Check the Change Log!

This is a straight-to-the-point guide to assembling a JavaScript stack. It requires some general programming knowledge, and JavaScript basics. It focuses on wiring tools together and giving you the simplest possible example for each tool. You can see this tutorial as a way to write your own boilerplate from scratch. Since the goal of this tutorial is to assemble various tools, I do not go into details about how these tools work individually. Refer to their documentation or find other tutorials if you want to acquire deeper knowledge in them.

You don't need to use this entire stack if you build a simple web page with a few JS interactions of course (a combination of Browserify/Webpack + Babel + jQuery is enough to be able to write ES6 code in different files), but if you want to build a web app that scales, and need help setting things up, this tutorial will work great for you.

A big chunk of the stack described in this tutorial uses React. If you are beginning and just want to learn React, create-react-app will get you up and running with a React environment very quickly with a pre-made configuration. I would for instance recommend this approach to someone who arrives in a team that's using React and needs to catch up with a learning playground. In this tutorial you won't use a pre-made configuration, because I want you to understand everything that's happening under the hood.

Code examples are available for each chapter, and you can run them all with yarn && yarn start. I recommend writing everything from scratch yourself by following the step-by-step instructions though.

Final code available in the JS-Stack-Boilerplate repository, and in the releases. There is a live demo too.

Works on Linux, macOS, and Windows.

Note: Since the tutorial was last edited in May 2017, a few libraries have slightly changed their APIs. 95% of the tutorial is still perfectly valid, but if you run into something weird, make sure to check out the open issues.

Table of contents

01 - Node, Yarn, package.json

02 - Babel, ES6, ESLint, Flow, Jest, Husky

03 - Express, Nodemon, PM2

04 - Webpack, React, HMR

05 - Redux, Immutable, Fetch

06 - React Router, Server-Side Rendering, Helmet

07 - Socket.IO

08 - Bootstrap, JSS

09 - Travis, Coveralls, Heroku

Coming up next

Setting up your editor (Atom first), MongoDB, Progressive Web App, E2E testing.

Translations

If you want to add your translation, please read the translation recommendations to get started!

V2

Check out the ongoing translations.

V1

Credits

Created by @verekia – verekia.com.

License: MIT

js-stack-from-scratch (verekia/js-stack-from-scratch)

socket-io
Searching Database…

What is this?A step-by-step tutorial that assembles a modern JavaScript web app stack from scratch — from Node and Yarn through React, Redux, and server-side rendering up to deploying on Heroku.
Is this a framework or a library I can install?Neither — it is a written tutorial. Each chapter has runnable code examples, and the final result lives in a separate JS-Stack-Boilerplate repo, so you end up with your own boilerplate.
How do I work through it?Write the code yourself, following the nine step-by-step chapters. Every chapter ships a runnable example — yarn && yarn start gets it going — and everything works on Linux, macOS, and Windows.
Do I need to be an experienced JavaScript developer to follow it?General programming knowledge and JavaScript basics. The tutorial deliberately skips how each tool works internally — it is about wiring them together, so check each tool's docs for depth.
Is the tutorial still current, or has it aged?It was last edited in May 2017, so a few libraries have slightly changed their APIs. The author estimates 95% is still valid and points to the open issues when something looks off.
Is this overkill for a small site, or meant for bigger apps?It targets web apps that scale. For a simple page with a bit of JS the README says Browserify/Webpack + Babel + jQuery is enough, so the full stack would be overkill there.
Why assemble the stack by hand instead of using create-react-app?The README actually recommends create-react-app if you just want to learn React quickly. This tutorial takes the opposite approach: no pre-made config, so you understand everything happening under the hood.
Which tools does the stack cover?Nine chapters: Node/Yarn; Babel, ESLint, Flow, Jest, Husky; Express, Nodemon, PM2; Webpack, React, HMR; Redux, Immutable, Fetch; React Router, SSR, Helmet; Socket.IO; Bootstrap, JSS; Travis, Coveralls, Heroku.
Can I skip to the finished result instead of typing everything?Yes — the final code is in the separate JS-Stack-Boilerplate repo and in the releases, plus a live demo. The author still recommends typing everything yourself, chapter by chapter.
Is the tutorial available in other languages?Yes — V2 has community translations in Bulgarian, Chinese (simplified), French, Italian, and Polish; the older V1 was also translated into Japanese, Russian, and Thai.
Creator
verekia
Size
1.8 MB
Stars
20.1K
Age
10y
Commits · 90 Days