All Projects β†’ infinitered β†’ Ignite Bowser

infinitered / Ignite Bowser

Licence: mit
Bowser is now re-integrated into Ignite CLI! Head to https://github.com/infinitered/ignite to check it out.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Ignite Bowser

Create Elm App
πŸƒ Create Elm apps with zero configuration
Stars: ✭ 1,650 (+181.57%)
Mutual labels:  cli, boilerplate
Extension Create
Create modern cross-browser extensions with no build configuration.
Stars: ✭ 167 (-71.5%)
Mutual labels:  cli, boilerplate
Manage Fastapi
πŸš€ CLI tool for FastAPI. Generating new FastAPI projects & boilerplates made easy.
Stars: ✭ 163 (-72.18%)
Mutual labels:  cli, boilerplate
Forge Node App
πŸ› πŸ“¦πŸŽ‰ Generate Node.js boilerplate with optional libraries & tools
Stars: ✭ 90 (-84.64%)
Mutual labels:  cli, boilerplate
Create Graphql
Command-line utility to build production-ready servers withΒ GraphQL.
Stars: ✭ 441 (-24.74%)
Mutual labels:  cli, boilerplate
Cookiecutter Fastapi
Cookiecutter template for FastAPI projects using: Machine Learning, Poetry, Azure Pipelines and Pytests
Stars: ✭ 89 (-84.81%)
Mutual labels:  cli, boilerplate
Pollinate
Template your base files and generate new projects from Git(Hub).
Stars: ✭ 213 (-63.65%)
Mutual labels:  cli, boilerplate
Saas
Build your own SaaS business with SaaS boilerplate. Productive stack: React, Material-UI, Next, MobX, WebSockets, Express, Node, Mongoose, MongoDB. Written with TypeScript.
Stars: ✭ 2,720 (+364.16%)
Mutual labels:  boilerplate, mobx
React Mobx Typescript Boilerplate
A bare minimum frontend boilerplate with React 16.7, Typescript 3.2 and Webpack 4
Stars: ✭ 378 (-35.49%)
Mutual labels:  boilerplate, mobx
Superplate
Performance-oriented frontend application creator with popular tools.
Stars: ✭ 368 (-37.2%)
Mutual labels:  cli, boilerplate
Boilr
⚑️ boilerplate template manager that generates files or directories from template repositories
Stars: ✭ 1,268 (+116.38%)
Mutual labels:  cli, boilerplate
React Mobx React Router4 Boilerplate
React, React-Router 4, MobX and Webpack 2-boilerplate with async routes.
Stars: ✭ 566 (-3.41%)
Mutual labels:  boilerplate, mobx
Samples Viewer Generator
πŸŽ‰ A CLI utility tool to generate web app of data visualization samples for presentation purpose
Stars: ✭ 13 (-97.78%)
Mutual labels:  cli, boilerplate
Rust Cli Boilerplate
Rust project boilerplate for CLI applications
Stars: ✭ 108 (-81.57%)
Mutual labels:  cli, boilerplate
Diskonaut
Terminal disk space navigator πŸ”­
Stars: ✭ 856 (+46.08%)
Mutual labels:  cli, navigator
Ignite
Infinite Red's cutting edge React Native project boilerplate, along with a CLI, component/model generators, and more!
Stars: ✭ 13,296 (+2168.94%)
Mutual labels:  cli, boilerplate
React Hooks Mobx State Tree
React Hooks + MobX State Tree + TypeScript = πŸ’›
Stars: ✭ 169 (-71.16%)
Mutual labels:  boilerplate, mobx
Expo Native Firebase
πŸ”₯ Native Firebase Expo App (iOS, Android) Demo for Firestore, Notifications, Analytics, Storage, Messaging, Database 🚨
Stars: ✭ 197 (-66.38%)
Mutual labels:  boilerplate, react-navigation
react-native-navigation-mobx-demo
React native Navigation with MobX demo. Blog post write up ->
Stars: ✭ 32 (-94.54%)
Mutual labels:  react-navigation, mobx
Curriculum
Dive into our 7-month web development program covering HTML, CSS, Javascript, Node, and React!
Stars: ✭ 453 (-22.7%)
Mutual labels:  cli, mobx

logo

Ignite Bowser - the hottest React Native boilerplate

npm version

Infinite Red's latest and greatest React Native boilerplate

Important note: Bowser is now re-integrated into Ignite CLI as of version 4.0.0! Head to https://github.com/infinitered/ignite to check it out. This version will continue to work on Ignite 3.x and be supported by the community.

Once you've installed React Native and the Ignite CLI, you can get started with this boilerplate.

This is the boilerplate that the Infinite Red team recommends and uses on a day-to-day basis. Prior art includes Ignite Andross.

Includes:

  • React Native
  • React Navigation 5
  • MobX State Tree (Why MST?)
  • TypeScript
  • Reactotron (requires 2.x)
  • And more!

To see it in action, check out the blog post by Robin Heinze here: Creating a Trivia App with Ignite Bowser.

You can also watch a live coding demo at React Live Amsterdam, where Jamon Holmgren codes an Ignite Bowser app in less than 30 minutes.

Quick Start

Prerequisites:

First, install Ignite CLI globally:

npm install -g [email protected]
# or
yarn global add [email protected]

Note: Make sure you have CocoaPods installed because otherwise, React Native installation will fail.

Then spin up a new Bowser-powered React Native app:

ignite new MyApp -b bowser

cd into your new app and run react-native run-ios or react-native run-android (note: in Android, you'll need an Android emulator running or an Android phone attached).

You should see an app that looks like the screenshot above!

Next step -- follow this tutorial to learn how to create a trivia app with Ignite Bowser: https://shift.infinite.red/creating-a-trivia-app-with-ignite-bowser-part-1-1987cc6e93a1

Generators

The true gem of Ignite Bowser. Generators help you scaffold your app very quickly, be it for a proof-of-concept, a demo, or a production app. Generators are there to save you time, keep your code consistent, and help you with the basic structure of your app.

ignite generate

Will give you information on what generators are present.

Component generator

This is the generator you will be using most often. There are two flavors:

  • Wrapped with mobx-react-lite's observer function - you need this if you pass any mobx-state-tree objects as props to the component, and the component will dereference properties of those objects.
  • Plain, not wrapped with observer. If you're only passing plain values or non-MST objects, this is fine.
ignite generate component awesome-component
  • Creates the component/function
  • Creates a style file
  • Creates a storybook test
  • Will make the required additions to configuration files.

You can also bypass the choice by providing which component type you want to create:

ignite generate component awesome-component --function-component

Or

ignite generate component awesome-component --stateless-function

Screen generator

Generates a "hooks enabled" screen.

ignite generate screen awesome-screen
  • Creates the screen

Model generator

Creates a Mobx-State-Tree model.

ignite generate model awesome-model
  • Creates the model
  • Creates a unit test file
  • Will make the required additions to configuration files.

Advanced

The built-in generators aren't enough? Fret not, you can create your own generators that suit your project/company. These generators can live with the default ignite-bowser generators.

Please refer to the documentation on how to create your own generators.

Explanation of folder structure

The Ignite Bowser boilerplate project's structure will look similar to this:

ignite-project
β”œβ”€β”€ app
β”‚   β”œβ”€β”€ components
β”‚   β”œβ”€β”€ i18n
β”‚   β”œβ”€β”€ models
β”‚   β”œβ”€β”€ navigation
β”‚   β”œβ”€β”€ screens
β”‚   β”œβ”€β”€ services
β”‚   β”œβ”€β”€ theme
β”‚   β”œβ”€β”€ utils
β”‚   β”œβ”€β”€ app.tsx
β”‚   β”œβ”€β”€ environment-variables.ts
|   β”œβ”€β”€ assets/fonts/
β”œβ”€β”€ storybook
β”‚   β”œβ”€β”€ views
β”‚   β”œβ”€β”€ index.ts
β”‚   β”œβ”€β”€ storybook-registry.ts
β”‚   β”œβ”€β”€ storybook.ts
β”œβ”€β”€ test
β”‚   β”œβ”€β”€ __snapshots__
β”‚   β”œβ”€β”€ storyshots.test.ts.snap
β”‚   β”œβ”€β”€ mock-i18n.ts
β”‚   β”œβ”€β”€ mock-reactotron.ts
β”‚   β”œβ”€β”€ setup.ts
β”‚   β”œβ”€β”€ storyshots.test.ts
β”œβ”€β”€ README.md
β”œβ”€β”€ android
β”œβ”€β”€ ignite
β”‚   β”œβ”€β”€ ignite.json
β”‚   └── plugins
β”œβ”€β”€ index.js
β”œβ”€β”€ ios
└── package.json

./app directory

Included in an Ignite boilerplate project is the app directory. This is a directory you would normally have to create when using vanilla React Native.

The inside of the app directory looks similar to the following:

app
│── components
│── i18n
β”œβ”€β”€ models
β”œβ”€β”€ navigation
β”œβ”€β”€ screens
β”œβ”€β”€ services
β”œβ”€β”€ theme
β”œβ”€β”€ utils
β”œβ”€β”€ app.tsx

components This is where your React dumb components will live. Each component will have a directory containing the .tsx file, along with a story file, and optionally .presets and .props files for larger components. The app will come with some commonly used components like Button.

i18n This is where your translations will live if you are using react-native-i18n.

models This is where your app's models will live. Each model has a directory that will contain the mobx-state-tree model file, test file, and any other supporting files like actions, types, etc. There's also an extensions directory with useful shared extensions that you can include in your models like .extend(withRootStore) or .extend(withEnvironment) to access the root store or environment, respectively.

navigation This is where your react-navigation navigators will live.

For a walkthrough about how React Navigation v5 works, check out Harris Robin's post: Getting Started with the New React Navigation v5 and Ignite Bowser v5.

screens This is where your screen components will live. A screen is a React component that will take up the entire screen and be part of the navigation hierarchy. Each screen will have a directory containing the .tsx file, along with any assets or other helper files.

services Any services that interface with the outside world will live here (think REST APIs, Push Notifications, etc.).

theme Here lives the theme for your application, including spacing, colors, and typography. For help with adding custom fonts to your application, check out the readme in ./assets/fonts/.

utils This is a great place to put miscellaneous helpers and utilities. Things like date helpers, formatters, etc. are often found here. However, it should only be used for things that are truly shared across your application. If a helper or utility is only used by a specific component or model, consider co-locating your helper with that component or model.

app.tsx This is the entry point to your app. This is where you will find the main App component, which renders the rest of the application. This is also where you will specify whether you want to run the app in storybook mode.

./ignite directory

The ignite directory stores all things Ignite, including CLI and boilerplate items. Here you will find generators, plugins, and examples to help you get started with React Native.

./storybook directory

This is where your stories will be registered and where the Storybook configs will live.

./test directory

This directory will hold your Jest configs and mocks, as well as your storyshots test file. This is a file that contains the snapshots of all your component storybooks.

About The Stack

Why this stack?

If you've used Ignite Andross (the first Ignite stack), you know we formerly used Redux for state management, as does much of the community. However, we encountered some pain points with Redux so we went in search of a different solution to meet our needs and landed on mobx-state-tree. We find that it’s a great middle-ground between completely structured (like redux) and completely freestyle (like mobx). It brings more than just state-management to the table as well (such as dependency injection, serialization, and lifecycle events).

Some Highlights of MST

MST is...

  • Intuitive
    • With concepts like props and actions, it feels familiar for React developers
    • Updating your data means calling functions on objects, rather than dispatching actions.
    • Feels similar to relational databases, with concepts like identifiers (primary keys), references (foreign keys), and views (calculated fields)
  • Streamlined
    • No more actionTypes, actionCreators, or reducers
    • You don't have to declare your usage intentions with mapStateToProps; they are inferred
    • Side-effects are built-in; no need for 3rd party libraries like redux-saga, redux-observable, or redux-thunk
    • Immutability is built-in - no need for immutable.js or seamless-immutable
    • types.compose and model.extend allow for easy code-sharing of common patterns
  • More than state management
    • Lifecycle hooks like afterCreate, preProcessSnapshot, and beforeDestroy let you have control over your data at various points in its lifecycle
    • Dependency injection with getEnv allows you to reference your environment (like API or other services)
  • Performant
    • Round-trip store writes are much faster
    • Computed values (views) are only calculated when needed
    • mobx-react-lite makes React "MobX-aware" and only re-renders when absolutely necessary
  • Customizable
    • MST ships with pre-built middlewares, including one which allows for Redux interoperability. These middlewares can also serve as examples to create your own!

Downsides

We also recognize no state management solution is perfect. MST has some known downfalls:

  • Integration with TypeScript is clunky at times. MST's own typing system is sometimes at odds with what TypeScript wants
  • mobx and mobx-state-tree both seem to have "magic" or "sorcery" that makes issues less straightforward to debug because you don't always have a clear picture of what's happening (but using Reactotron, which has mobx-state-tree support built-in, helps a lot). The MobX docs can also help illumitate some of the magic.
  • The user base is small, so finding help on GitHub or Stack overflow is less convenient (however, the Infinite Red Slack Community, as well as the MobX State Tree Spectrum channel are both very helpful)
  • Fatal errors are sometimes too-easily triggered, and error messages can be verbose and hard to grok
  • The API has a large surface area and, the docs tend to be technical and unfriendly

Learning MobX State Tree

MobX and MobX State Tree can be a lot to learn if you're coming from Redux, so here are a few of our favorite resources to learn the basics:

Upgrade

To keep your React Native app updated:

To keep your Ignite Bowser based app updated:

TypeScript

In addition to redux --> mobx-state-tree, we've also transitioned to using TypeScript vs plain JavaScript. We find that TypeScript streamlines the developer experience by catching errors before you hit refresh on that simulator and prevents costly bugs by enforcing type safety.

In Bowser, TypeScript is fully set up, so if you know TS, all you need to do is start coding!

Resources

If you are new to TypeScript, here are some of our favorite resources:

Previous Boilerplates

Contribute

Contribute to Ignite Bowser - Getting up and running for your first pull request

Bowser is now re-integrated into Ignite CLI as of version 4.0.0! Head to https://github.com/infinitered/ignite to check it out. This version will continue to work on Ignite 3.x and be supported by the community.

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].