{"id":13469699,"url":"https://github.com/infinitered/ignite-bowser","last_synced_at":"2025-03-26T07:31:02.138Z","repository":{"id":41463467,"uuid":"130737909","full_name":"infinitered/ignite-bowser","owner":"infinitered","description":"Bowser is now re-integrated into Ignite CLI! Head to https://github.com/infinitered/ignite to check it out.","archived":true,"fork":false,"pushed_at":"2023-01-13T20:10:30.000Z","size":6590,"stargazers_count":615,"open_issues_count":32,"forks_count":140,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-10-29T23:55:46.762Z","etag":null,"topics":["boilerplate","cli","mobx","mobx-state-tree","mst","navigator","react","react-hooks","react-native","react-navigation","reactjs","reactotron","typescript"],"latest_commit_sha":null,"homepage":"https://infinite.red/ignite","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/infinitered.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-23T18:13:51.000Z","updated_at":"2024-10-06T15:46:29.000Z","dependencies_parsed_at":"2023-02-09T17:01:30.712Z","dependency_job_id":null,"html_url":"https://github.com/infinitered/ignite-bowser","commit_stats":null,"previous_names":["infinitered/ignite-ir-boilerplate-bowser"],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitered%2Fignite-bowser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitered%2Fignite-bowser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitered%2Fignite-bowser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitered%2Fignite-bowser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infinitered","download_url":"https://codeload.github.com/infinitered/ignite-bowser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245610874,"owners_count":20643728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","cli","mobx","mobx-state-tree","mst","navigator","react","react-hooks","react-native","react-navigation","reactjs","reactotron","typescript"],"created_at":"2024-07-31T15:01:51.422Z","updated_at":"2025-03-26T07:31:01.819Z","avatar_url":"https://github.com/infinitered.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Previous Boilerplates"],"sub_categories":["./test directory"],"readme":"## Why is this archived?\n\nWe 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](https://github.com/infinitered/ignite), which includes the latest version of our boilerplate. Feel free to fork this library and continue on its legacy if you want. \n\nNOTE: 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.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"http://ir_public.s3.amazonaws.com/projects/ignite/ignite-bowser-launch-screen.png\" alt=\"logo\" width=\"414px\"\u003e\u003c/p\u003e\n\n# Ignite Bowser - the hottest React Native boilerplate\n\n\u003ca href=\"https://badge.fury.io/js/ignite-bowser\" target=\"_blank\"\u003e\u003cimg src=\"https://badge.fury.io/js/ignite-bowser.svg\" alt=\"npm version\" height=\"20\"\u003e\u003c/a\u003e\n\n## Infinite Red's latest and greatest React Native boilerplate\n\n_**Important note:** Bowser is now [re-integrated](https://github.com/infinitered/ignite/releases/tag/v4.0.0) 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._\n\nOnce you've installed [React Native](https://shift.infinite.red/painless-react-native-setup-for-mac-windows-linux-956c23d2abf9) and the [Ignite CLI](https://github.com/infinitered/ignite), you can get started with this boilerplate.\n\nThis is the boilerplate that the [Infinite Red](https://infinite.red) team recommends and uses on a day-to-day basis. Prior art includes [Ignite Andross](https://github.com/infinitered/ignite-andross).\n\nIncludes:\n\n- React Native\n- React Navigation 5\n- MobX State Tree [(Why MST?)](#About-The-Stack)\n- TypeScript\n- Reactotron (requires 2.x)\n- And more!\n\nTo see it in action, check out the blog post by Robin Heinze here: [Creating a Trivia App with Ignite Bowser](https://shift.infinite.red/creating-a-trivia-app-with-ignite-bowser-part-1-1987cc6e93a1).\n\nYou can also watch a [live coding demo](https://www.youtube.com/watch?v=OgiFKMd_TeY) at React Live Amsterdam, where Jamon Holmgren codes an Ignite Bowser app in less than 30 minutes.\n\n## Quick Start\n\nPrerequisites:\n\n- For classic React Native: [install the React Native CLI](https://facebook.github.io/react-native/docs/getting-started) -- choose React Native CLI\n- For Expo: [install the Expo CLI](https://facebook.github.io/react-native/docs/getting-started) -- choose Expo CLI\n  - _Note:_ Expo support is experimental.\n\nFirst, install Ignite CLI globally:\n\n```\nnpm install -g ignite-cli@3\n# or\nyarn global add ignite-cli@3\n```\n\n**Note:**\nMake sure you have [CocoaPods](https://guides.cocoapods.org/using/getting-started.html) installed because otherwise, React Native installation will fail.\n\nThen spin up a new Bowser-powered React Native app:\n\n```\nignite new MyApp -b bowser\n```\n\n`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).\n\nYou should see an app that looks like the screenshot above!\n\nNext 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\n\n## Generators\n\nThe 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.\n\n```\nignite generate\n```\n\nWill give you information on what generators are present.\n\n### Component generator\n\nThis is the generator you will be using most often. There are two flavors:\n\n- Wrapped with mobx-react-lite's `observer` function - you need this if you\n  pass any mobx-state-tree objects as props to the component, and the component\n  will dereference properties of those objects.\n- Plain, not wrapped with `observer`. If you're only passing plain values or\n  non-MST objects, this is fine.\n\n```\nignite generate component awesome-component\n```\n\n- Creates the component/function\n- Creates a style file\n- Creates a storybook test\n- Will make the required additions to configuration files.\n\nYou can also bypass the choice by providing which component type you want to create:\n\n```\nignite generate component awesome-component --function-component\n```\n\nOr\n\n```\nignite generate component awesome-component --stateless-function\n```\n\n### Screen generator\n\nGenerates a \"hooks enabled\" screen.\n\n```\nignite generate screen awesome-screen\n```\n\n- Creates the screen\n\n### Model generator\n\nCreates a Mobx-State-Tree model.\n\n```\nignite generate model awesome-model\n```\n\n- Creates the model\n- Creates a unit test file\n- Will make the required additions to configuration files.\n\n### Advanced\n\nThe 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.\n\nPlease refer to the [documentation on how to create your own generators.](https://github.com/infinitered/ignite/blob/master/docs/advanced-guides/creating-generators.md)\n\n## Explanation of folder structure\n\nThe Ignite Bowser boilerplate project's structure will look similar to this:\n\n```\nignite-project\n├── app\n│   ├── components\n│   ├── i18n\n│   ├── models\n│   ├── navigation\n│   ├── screens\n│   ├── services\n│   ├── theme\n│   ├── utils\n│   ├── app.tsx\n│   ├── environment-variables.ts\n|   ├── assets/fonts/\n├── storybook\n│   ├── views\n│   ├── index.ts\n│   ├── storybook-registry.ts\n│   ├── storybook.ts\n├── test\n│   ├── __snapshots__\n│   ├── storyshots.test.ts.snap\n│   ├── mock-i18n.ts\n│   ├── mock-reactotron.ts\n│   ├── setup.ts\n│   ├── storyshots.test.ts\n├── README.md\n├── android\n├── ignite\n│   ├── ignite.json\n│   └── plugins\n├── index.js\n├── ios\n└── package.json\n```\n\n### ./app directory\n\nIncluded in an Ignite boilerplate project is the `app` directory. This is a directory you would normally have to create when using vanilla React Native.\n\nThe inside of the `app` directory looks similar to the following:\n\n```\napp\n│── components\n│── i18n\n├── models\n├── navigation\n├── screens\n├── services\n├── theme\n├── utils\n├── app.tsx\n```\n\n**components**\nThis 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.\n\n**i18n**\nThis is where your translations will live if you are using `react-native-i18n`.\n\n**models**\nThis 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.\n\n**navigation**\nThis is where your `react-navigation` navigators will live.\n\nFor 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](https://shift.infinite.red/getting-started-with-the-new-react-navigation-v5-and-ignite-bowser-v5-31fb4a57f2b9).\n\n**screens**\nThis 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.\n\n**services**\nAny services that interface with the outside world will live here (think REST APIs, Push Notifications, etc.).\n\n**theme**\nHere 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/](./boilerplate/assets/fonts/custom-fonts.md).\n\n**utils**\nThis 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.\n\n**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.\n\n### ./ignite directory\n\nThe `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.\n\n### ./storybook directory\n\nThis is where your stories will be registered and where the Storybook configs will live.\n\n### ./test directory\n\nThis directory will hold your Jest configs and mocks, as well as your [storyshots](https://github.com/storybooks/storybook/tree/master/addons/storyshots) test file. This is a file that contains the snapshots of all your component storybooks.\n\n# About The Stack\n\n## Why this stack?\n\nIf 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).\n\n### Some Highlights of MST\n\nMST is...\n\n- Intuitive\n  - With concepts like `props` and `actions`, it feels familiar for React developers\n  - Updating your data means calling functions on objects, rather than dispatching actions.\n  - Feels similar to relational databases, with concepts like `identifiers` (primary keys), `references` (foreign keys), and `views` (calculated fields)\n- Streamlined\n  - No more `actionTypes`, `actionCreators`, or `reducers`\n  - You don't have to declare your usage intentions with `mapStateToProps`; they are inferred\n  - Side-effects are built-in; no need for 3rd party libraries like `redux-saga`, `redux-observable`, or `redux-thunk`\n  - Immutability is built-in - no need for `immutable.js` or `seamless-immutable`\n  - `types.compose` and `model.extend` allow for easy code-sharing of common patterns\n- More than state management\n  - Lifecycle hooks like `afterCreate`, `preProcessSnapshot`, and `beforeDestroy` let you have control over your data at various points in its lifecycle\n  - Dependency injection with `getEnv` allows you to reference your environment (like API or other services)\n- Performant\n  - Round-trip store writes are much faster\n  - Computed values (views) are only calculated when needed\n  - `mobx-react-lite` makes React \"MobX-aware\" and only re-renders when absolutely necessary\n- Customizable\n  - MST ships with pre-built middlewares, including one which allows for [Redux interoperability](https://github.com/mobxjs/mobx-state-tree/blob/master/packages/mst-middlewares/README.md#redux). These middlewares can also serve as examples to create your own!\n\n### Downsides\n\nWe also recognize no state management solution is perfect. MST has some known downfalls:\n\n- Integration with TypeScript is clunky at times. MST's own typing system is sometimes at odds with what TypeScript wants\n- `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](https://github.com/infinitered/reactotron), which has `mobx-state-tree` support built-in, helps a lot). The [MobX docs](https://mobx.js.org/) can also help illumitate some of the magic.\n- The user base is small, so finding help on GitHub or Stack overflow is less convenient (however, the [Infinite Red Slack Community](http://community.infinite.red), as well as the [MobX State Tree Spectrum channel](https://spectrum.chat/mobx-state-tree) are both very helpful)\n- Fatal errors are sometimes too-easily triggered, and error messages can be verbose and hard to grok\n- The API has a large surface area and, the docs tend to be technical and unfriendly\n\n## Learning MobX State Tree\n\nMobX 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:\n\n- Be sure to check out the official [Getting Started](https://mobx-state-tree.js.org/intro/getting-started) guide for MobX State Tree.\n\n- There is also a free [egghead.io course](https://egghead.io/courses/manage-application-state-with-mobx-state-tree).\n\n- For a great explanation and walkthrough of the basics, check out [State Management with MobX State Tree](https://medium.com/react-native-training/state-management-with-mobx-state-tree-373f9f2dc68a) by React Native Training.\n\n- And for more in-depth reading, the [official documentation](https://github.com/mobxjs/mobx-state-tree/blob/master/README.md) is a great resource.\n\n- The official docs for [MobX](https://mobx.js.org/) are another important resource since MST is built on MobX.\n\n- For help from real people in the community, make sure to check out the [Infinite Red Community Slack](https://community.infinite.red) as well as the [MobX State Tree spectrum channel](https://spectrum.chat/mobx-state-tree).\n\n- To see example codebases using Bowser (and MST), check out these repositories:\n- https://github.com/jamonholmgren/PlayerPopularity (simple implementation)\n- https://github.com/jamonholmgren/TrailBlazers (simple implementation with hooks)\n- https://github.com/infinitered/ChainReactApp2019 (more in-depth implementation)\n\n## Upgrade\n\nTo keep your React Native app updated:\n\n- [React Native Upgrade Helper](https://react-native-community.github.io/upgrade-helper/) great web-based tool\n- [rn-diff-purge](https://github.com/react-native-community/rn-diff-purge)\n\nTo keep your Ignite Bowser based app updated:\n\n- [ignite-bowser-diff-purge](https://github.com/nirre7/ignite-bowser-diff-purge) To help you see the diffs between versions\n\n## TypeScript\n\nIn addition to `redux` --\u003e `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.\n\nIn Bowser, TypeScript is fully set up, so if you know TS, all you need to do is start coding!\n\n### Resources\n\nIf you are new to TypeScript, here are some of our favorite resources:\n\n- [TypeScript in 5 minutes](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) for a quick read\n- [TypeScript in 50 minutes](https://youtu.be/WBPrJSw7yQA) for a longer watch\n- [Execute Program -- TypeScript course](https://www.executeprogram.com/course/typescript) -- free course by Gary Bernhardt\n- [TypeScript and VSCode](https://code.visualstudio.com/docs/typescript/typescript-tutorial) for awesome developer tools\n- [Official Docs](https://www.typescriptlang.org/docs/home.html)\n\n## Previous Boilerplates\n\n- [2017 aka Andross](https://github.com/infinitered/ignite-andross)\n- [2016 aka Ignite 1.0](https://github.com/infinitered/ignite-ir-boilerplate-2016)\n\n## Contribute\n\n#### [Contribute to Ignite Bowser](https://github.com/infinitered/ignite-bowser/blob/master/.github/CONTRIBUTING.md) - Getting up and running for your first pull request\n\n_Bowser is now [re-integrated](https://github.com/infinitered/ignite/releases/tag/v4.0.0) 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._\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitered%2Fignite-bowser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfinitered%2Fignite-bowser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitered%2Fignite-bowser/lists"}