• Stars
    star
    496
  • Rank 88,807 (Top 2 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Rockpack is a simple solution for creating React Application with Server Side Rendering, bundling, linting, testing within 5 minutes

Rockpack

Rockpack is a simple solution for creating React Application with Server Side Rendering, bundling, linting, testing.

Rockpack The main goal is to reduce project setup time from weeks to 5 minutes.

Getting Started:

Rockpack will help if:

  • Beginners. With the help of Rockpack, any newbie to React can deploy a project of any complexity in a few minutes, with configured webpack, eslint, jest, etc. Rockpack supports the most popular types of React application with the project structure, Server Side Rendering, optimizations, and has the necessary dependencies.
  • Large projects from scratch. Rockpack supports most of the webpack best practices configurations, eslint rules, jest, typescript and will work great even on large projects
  • Startup. If you need to quickly check an idea without wasting time on unfolding and setting up the project.
  • Library or React Component. If you want to write a UMD library or React component, with support for the esm/cjs build as well as the minified version.

Fast setup

  • Legacy projects or modular use. Rockpack is a modular platform, you can only use what you need. Please see every modules' readme.

Also, pay attention to module iSSR. This tiny module helps you to move your React application to Server-Side Rendering. Please see articles:


Motivation

Working on many React projects, we are faced with the same type of routine tasks. We answer questions every time:

  • How to set up an efficient build system with support for many formats and Typescript we need
  • Which linter's rules should be on the project for comfortable work
  • How to set up Jest that it works with Babel or Typescript
  • How to make server-side rendering to work with existing solutions - Redux, Apollo and other
  • How to set up Webpack for server-side rendering and get production ready artifact and cool dev server

Every time we spend weeks on these routine tasks.

Usual flow

Using Rockpack you can deploy your project in minutes and start writing really useful code.

Rockpack flow

Rockpack modules overview

Rockpack consists of modules. Let's consider them in more detail:

@rockpack/starter

this is create-react-app on steroids.

Rockpack provides the best practice to set up your application. Project structure has feature based approach (see article here).

Supports the following types of applications:

  • React SPA - Redux, Thunk, React-Router, CSS Modules, @loadable, project structure etc.
    • React-Router
    • Redux
    • Redux Toolkit
    • Redux-Thunk
    • React-Helmet
    • @loadable/components is being used for split your code into SSR application
  • React SPA + SSR - SSR, SEO, Redux, Thunk, React-Router, CSS Modules, @loadable, project structure etc.
    • Koa is being used for the server
    • iSSR is being used for effect handling in the server side
    • React-Router
    • Redux
    • Redux Toolkit
    • Redux-Thunk
    • React-Helmet-Async
    • @loadable/components is being used for split your code into SSR application
  • React Component - Configured webpack to create React component (for NPM publishing).
  • UMD Library - Configured webpack to create UMD library (vanilla JS, for NPM publishing).

All types of applications support:

  • Import of many file formats. List of formats
  • Image optimization, SVG Optimization
  • Loading SVG files as React components
  • CSS/SCSS/Less modules
  • Babel or TS; TS support for CSS/SCSS/Less modules
  • PostCSS Autoprefixer
  • SEO Optimizations, React optimizations, Antd optimizations
  • Support for settings via Dotenv and Dotenv safe
  • Bundle Analyzer, Statoscope
  • GraphQL support

Full list of features see here

Additionally, for each type of application, you can install:

More details...


@rockpack/compiler

This is React bundler (based on Webpack) using a set of necessary loaders, plugins and using the best practices out of the box.

@rockpack/compiler can help you with:

  • Compile your React application (TS/Babel)
  • Compile React Component or VanillaJS UMD library (TS/Babel)
  • Nodejs backend (TS/Babel)
  • Markup html files
  • Compile isomorphic (Server-side rendering) application (TS/Babel)
  • Bundle Analyzer, Statoscope (TS/Babel)

More details...


@rockpack/tester

This is Jest with cool config, add-ons and fully compatible with TS / Babel.

More details...


@rockpack/codestyle

This is an efficiently customized Eslint with many best practical rules and additions.

More details...


In order to get more detailed info please follow each module links.

Rockpack is completely free project. We are always open to collaboration and contributors.

Alternatives

The Rockpack project was inspired by:

Why do we need Rockpack...?

...if we have create-react-app or other?

  • Rockpack provides a very easy way to get started with @rockpack/starter. Just one command allows you to set up your application with support for TypeScript, Jest, Eslint, SSR and more.
  • Rockpack is very flexible. You can design the architecture as you like, use different libraries and solutions, for example, for state management.
  • Rockpack doesn't add any magic. This is a set of best practices and libraries for automating the start of a project.
  • Rockpack has the option of modular integration into legacy project.
  • Rockpack has the ability to modify the webpack.config without "eject" with the ability to update Rockpack.
  • Rockpack uses only existing modules and approaches and don't reinventing the wheel.

The MIT License

Copyright (c) Aleksandrov Sergey

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

issr

The easiest way to move your React application to Server-Side Rendering. Handles Side Effects and synchronizes State.
HTML
96
star
2

rocket

Boilerplate for React and Backbone
CSS
80
star
3

react-customscroll

This is a tiny React component for scroll bar customization, without dependencies but with a lot of features.
CSS
50
star
4

logrock

Can help you build Error Tracking & Crash Reporting system
JavaScript
31
star
5

react-switch-case

Switch statement in React components
JavaScript
22
star
6

rocket-next

React + Redux, Isomorhic boilerplate
JavaScript
8
star
7

Angular_MEAN

Angular MEAN Stack Boilerplate (Gulp, Bower, MEAN, jsdoc, mocha, chai)
JavaScript
8
star
8

localazer

TypeScript
7
star
9

EasyParallaxPlugin

JavaScript
7
star
10

eslint-plugin-file-extension-in-import-ts

JavaScript
7
star
11

rocket-starter

Webpack config generator
JavaScript
4
star
12

Space-Invaders-Python-game

Python
3
star
13

ts-tricks

TypeScript
2
star
14

valid-types

TypeScript
2
star
15

koa-boilerplate

TypeScript
2
star
16

lambda-experiments

TypeScript
1
star
17

codeformat-node-module

JavaScript
1
star
18

react-2022

TypeScript
1
star
19

nextjs-starter

JavaScript
1
star
20

kafka-recipes

1
star
21

serverless-crud-authorizer

TypeScript
1
star
22

virtual-dom-example

JavaScript
1
star
23

react-redux-logger

react+redux logger
JavaScript
1
star
24

python-starter

Simple python 3 boilerplate
Python
1
star
25

nodejs-logging

TypeScript
1
star
26

react-i18next-example

JavaScript
1
star
27

react-testing

1
star
28

lambda-di-experiments

TypeScript
1
star
29

mongo

TypeScript
1
star
30

multimedia-manager

First pet project for my "Smart House"
JavaScript
1
star
31

git-is-ready-to-push

Simple script to check is GIT has untracked files or not
JavaScript
1
star
32

nodejs-next-features

TypeScript
1
star
33

my_presentations

JavaScript
1
star
34

nest-kafka

Test kafka integration to Nestjs
TypeScript
1
star
35

react-router-examples

TypeScript
1
star
36

testing-recipes

TypeScript
1
star
37

type-module-cjs-browser

Correct way to compile type module
JavaScript
1
star
38

codeformat-node-commonjs

JavaScript
1
star
39

rabbitmq-recipes

TypeScript
1
star
40

codeformat-react-typescript

TypeScript
1
star