• This repository has been archived on 13/Jan/2023
  • Stars
    star
    615
  • Rank 72,947 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 6 years ago
  • Updated almost 2 years ago

Reviews

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

Repository Details

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

Why is this archived?

We really appreciate all the community support in the years since we first released ignite-bowser. Our focus has shifted to the latest version of Ignite, which includes the latest version of our boilerplate. Feel free to fork this library and continue on its legacy if you want.

NOTE: This repo has been renamed from ignite-ir-boilerplate-bowser to ignite-bowser. Although web traffic and git operations for the previous name will be redirected, we recommend you update any links and git urls for this repo.

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 ignite-cli@3
# or
yarn global add ignite-cli@3

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.

More Repositories

1

ignite

Infinite Red's battle-tested React Native project boilerplate, along with a CLI, component/model generators, and more!
TypeScript
17,283
star
2

reactotron

A desktop app for inspecting your React JS and React Native projects. macOS, Linux, and Windows.
TypeScript
14,757
star
3

nsfwjs

NSFW detection on the client-side via TensorFlow.js
JavaScript
7,194
star
4

gluegun

A delightful toolkit for building TypeScript-powered command-line apps.
TypeScript
2,937
star
5

apisauce

Axios + standardized errors + request/response transforms.
JavaScript
2,789
star
6

thesis-phoenix

A lightweight, bolt-on, intuitive content editing system for Elixir/Phoenix websites. Star this repo and follow along with our progress!
Elixir
648
star
7

solidarity

Solidarity is an environment checker for project dependencies across multiple machines.
TypeScript
614
star
8

ignite-andross

The original React Native boilerplate from Infinite Red - Redux, React Navigation, & more
JavaScript
475
star
9

ChainReactApp2017

The official Chain React Conf 2017 App
JavaScript
437
star
10

rmq

RMQ - RubyMotionQuery
HTML
307
star
11

redpotion

We believe iPhone development should be clean, scalable, and fast with a language that developers not only enjoy, but actively choose. With the advent of Ruby for iPhone development the RubyMotion community has combined and tested the most active and powerful gems into a single package called RedPotion
Ruby
234
star
12

cdq

Core Data Query for RubyMotion
Ruby
172
star
13

ChainReactApp2019

The Chain React 2019 Conference App
TypeScript
165
star
14

react-native-mlkit

The definitive MLKit wrapper for React Native and Expo
TypeScript
124
star
15

nsfwjs-mobile

NSFWjs in React Native
JavaScript
112
star
16

ChainReactApp2023

The official Chain React App for #ChainReact2023, written in React Native
TypeScript
110
star
17

reactotron-react-native

Reactotron's react-native client.
TypeScript
110
star
18

ruby-xcdm

Ruby XCDM
Ruby
94
star
19

bluepotion

Like RedPotion, but for Android
Ruby
74
star
20

ProMotion-menu

RubyMotion gem allowing you to easily setup a facebook or Path style hidden slide menu easily with the ProMotion gem.
Ruby
74
star
21

ramdasauce

Ramda smothered in saucy helpers.
JavaScript
69
star
22

awesome-react-testing

React and React Native testing tools and strategies
67
star
23

firebird

Template for Phoenix 1.3 projects
Elixir
66
star
24

phoenix_base

Template project for Phoenix
Elixir
65
star
25

flipper-plugin-reactotron

A plugin for the Flipper desktop application
TypeScript
63
star
26

ignite-cookbook

Ignite Cookbook for React Native
CSS
47
star
27

ignite-example-login

This is an example Ignited app that shows how to integrate a login screen with redux-aware react navigation
JavaScript
47
star
28

solidarity-react-native

Solidarity snapshot plugin for React Native projects
JavaScript
47
star
29

ai-lab

Library of components for TensorFlow.js in web frameworks.
TypeScript
46
star
30

ionicons-version-3-search

Quickly identify IonIcons from version 3, with version 2 names as tags!
JavaScript
41
star
31

apex

Apex: the RubyMotion web framework for OS X.
Ruby
31
star
32

ir-docs

Omnibus Documentation for Infinite Red Opensource
CSS
26
star
33

ignite-ir-boilerplate-2016

[Not supported] A boilerplate for Ignite with best practices we've learned from 2015.
JavaScript
26
star
34

ignite-bowser-examples

This repository is out of date and is archived here for historical purposes only. See current Ignite Bowser for more relevant examples.
TypeScript
26
star
35

maybe

Access Elixir maps and structs, protected from `nil`
Elixir
25
star
36

open-source

Information and Guides for Infinite Red Open Source Projects
24
star
37

thesis-rails

Thesis: A Rails CMS that doesn't hijack your development workflow. [Deprecated]
Ruby
23
star
38

authority

Next-gen Elixir authentication specification
Elixir
22
star
39

babel-plugin-ignite-ignore-reactotron

Strips Reactotron from production builds for Ignite-based apps.
JavaScript
21
star
40

ChainReactApp2022

TypeScript
20
star
41

react-navx

[Experimental] Navigation and state management in one place for your React Native projects, featuring React Navigation and MobX / MST
TypeScript
20
star
42

mst-reference-pool

MST Reference Pool is a MobX-State-Tree extension that allows you to use references to a pool of model instances in any store.
TypeScript
20
star
43

ProMotion-iap

In-app purchases for ProMotion!
Ruby
19
star
44

ProMotion-form

Deprecated -- use ProMotion-XLForm
Ruby
19
star
45

ignite-maps

Painlessly add react-native-maps to your React Native app using Ignite and Ignite Maps.
EJS
19
star
46

ProMotion-push

Push notification support for ProMotion.
Ruby
18
star
47

rmq-example-app-image-browser

An example app for RubyMotionQuery (rmq). The user can query, browse, and zoom photos. Uses RMQ and AFMotion
Ruby
18
star
48

Parsistence

A nice wrapper for your Parse models on RubyMotion, complete with querying and much more.
Ruby
17
star
49

reactotron-react-js

Reactotron's react-dom client.
TypeScript
16
star
50

whitepotion

WhitePotion is just like RedPotion, but for OS X
Ruby
15
star
51

ProMotion-map

ProMotion::MapScreen gem. Extracted from ProMotion core.
Ruby
13
star
52

react-native-ai

13
star
53

motion-scene-kit

SceneKit stuff in RubyMotion
Ruby
13
star
54

middleman-template

A nice default project template for Middleman, the fantastic static site building tool.
CSS
12
star
55

harvest-invision-integration

Install this User Script via TamperMonkey to add Harvest Tracker to Invision Enterprise workflow pages
JavaScript
12
star
56

authority_ecto

Ecto integration for Authority https://github.com/infinitered/authority
Elixir
12
star
57

rmq-slide-over-control

A RubyMotion RMQ control that places a draggable view over another view, allowing the user to show more or less of the main view below
Ruby
12
star
58

keras-model-zoo

Ready to go, downloadable models for Keras
11
star
59

ignite-json-server

Ignite plugin that adds json-server to an Ignited project
JavaScript
10
star
60

reactotron-redux

The redux plugin for reactotron that allows tracking redux actions and state
TypeScript
10
star
61

reactotron-redux-saga

The redux saga plugin for reactotron. Allows for tracking of Redux Sagas
TypeScript
10
star
62

reactotron-core-client

The core client for all reactotron clients
TypeScript
10
star
63

ignite-redux-persist

An Ignite CLI plugin for Redux Persist
JavaScript
9
star
64

addon-storyshots

JavaScript
8
star
65

rmq-template

A template for RubyMotionQuery projects
Ruby
8
star
66

DiveIntoNative

Just scratching the surface of jumping into Native
Objective-C
7
star
67

ignite-dev-screens

Ignite DevScreens plugin for ignite-cli
JavaScript
7
star
68

tensorplayground

Playground for visual tensors and interactive code
JavaScript
7
star
69

mithril_pubsub

A PubSub layer for Mithril-architected apps
Elixir
6
star
70

ignite-animatable

An ignite plugin for react-native-animatable.
JavaScript
6
star
71

reactotron-core-server

The core reactotron server used by the reactotron app
TypeScript
6
star
72

redpotion-template

Ruby
5
star
73

bluepotion-template

Ruby
5
star
74

ignite-vector-icons

An ignite plugin for `react-native-vector-icons`.
JavaScript
5
star
75

jest-preset-ignite

Glues together TypeScript, React Native, and Jest.
JavaScript
5
star
76

ignite-redux-devtools

An Ignite CLI plugin for Redux DevTools
JavaScript
5
star
77

reactotron-mst

Reactotron's mobx-state-tree plugin
TypeScript
4
star
78

ignite-i18n

An ignite plugin for react-native-i18n.
JavaScript
4
star
79

reactotron-core-ui

TypeScript
4
star
80

ueberauth_dwolla

Ueberauth Plugin for OAuth through Dwolla
Elixir
3
star
81

ups

Address validation/normalization against UPS API
Elixir
3
star
82

ignite-ir-boilerplate

Boilerplate Index
3
star
83

whack-a-mole

A game to demonstrate lists, lifecycle methods, and fundamentals of React Native
JavaScript
3
star
84

tutorial-movie

A demo CLI app, powered by Gluegun
TypeScript
3
star
85

ignite-next-js

Ignite Next.js website boilerplate with Next.js, MySQL, and Github authentication
JavaScript
3
star
86

elavon-elixir

Native elixir client for USBank Elavon Converge API
Elixir
3
star
87

ignite-plugins

The Official Ignite Plugin Registry
3
star
88

eversign

Elixir wrapper for Eversign API
Elixir
2
star
89

MarqueeMark

Large text displayer.
Objective-C
2
star
90

reactotron-apisauce

Reactotron's apisauce plugin
TypeScript
2
star
91

msterymeat

mobx-state-tree proclivities
TypeScript
2
star
92

motion-conf

motion-conf is an easy to use configuration class generator for your RubyMotion apps.
Ruby
2
star
93

wpf-base

Base React Native Windows WPF project for bare bones use in upstream
C#
2
star
94

mobx-forge

TypeScript
2
star
95

cr-2024-intermediate-workshop-lessons

TypeScript
2
star
96

cr-2024-intermediate-workshop-template

TypeScript
2
star
97

orb-publish-docs

CircleCI Orb for publishing docs
Shell
1
star
98

TrainingAppDec2018

What we covered in the online Infinite Red Academy training on December 12, 2018
JavaScript
1
star
99

rmq-plugin-template

Template Repo for RMQ
HTML
1
star
100

solidarity-stacks

Community Solidarity files for well known software stacks
1
star