Giter Club home page Giter Club logo

ignite-ir-boilerplate-bowser's Introduction

logo

Ignite IR Boilerplate ("Bowser")

Build Status

The latest and greatest boilerplate for Infinite Red opinions (Beta)

When you've installed the Ignite CLI, you can get started with this boilerplate.

This is the boilerplate that Infinite Red uses as a way to test bleeding-edge changes to our React Native stack.

Currently includes:

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

To see it in action, check out these examples!

Quick Start

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

ignite-project
├── src
│   ├── app
│   ├── i18n
│   ├── lib
│   ├── models
│   ├── navigation
│   ├── services
│   ├── theme
│   ├── views
├── 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
│   ├── app
│   ├── build.gradle
│   ├── gradle
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   ├── keystores
│   └── settings.gradle
├── ignite
│   ├── ignite.json
│   └── plugins
├── index.js
├── ios
│   ├── IgniteProject
│   ├── IgniteProject-tvOS
│   ├── IgniteProject-tvOSTests
│   ├── IgniteProject.xcodeproj
│   └── IgniteProjectTests
└── package.json

The directory structure uses a "feature first, function second" approach to organization. Files are grouped by the feature they are supporting rather than the type of file.

For example: A custom Button component would have the main component file, and test, and any assets or helper files all grouped together in one folder.

This is a departure from the previous boilerplate, which grouped files by type (components together, styles together, tests together, images together, etc.). One feature of this new approach is the use of index files which export specific functions from files in the directory to create a public interface for each "thing", or "feature. You'll see that pattern quite a bit in this boilerplate.

./src directory

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

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

src
├── app
│── i18n
├── lib
├── models
├── navigation
├── services
├── theme
├── views

app This is where a lot of your app's initialization takes place. Here you'll find:

  • root-component.tsx - This is the root component of your app that will render your navigators and other views.

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

lib 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 truely 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.

models This is where your app's models will live. Each model has a directory which will contain the mobx-state-tree model file, test file, and any other supporting files like actions, types, etc.

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

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.

views This is where all of your components will live. Both dumb components and screen components will be located here. Each component will have a directory containing the .tsx file, along with a story file, and optionally .presets, and .props files for larger components.

You may choose to futher break down this directory by organizing your components into "domains", which represent cohesive areas of your application. For example, a "user" domain could hold all components and screens related to managing a user.

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

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

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

Previous Boilerplates

Premium Support

Ignite CLI and Ignite IR Boilerplate, as open source projects, are free to use and always will be. Infinite Red offers premium Ignite CLI support and general mobile app design/development services. Email us at [email protected] to get in touch with us for more details.

ignite-ir-boilerplate-bowser's People

Contributors

gantman avatar skellock avatar jamonholmgren avatar nirre7 avatar robinheinze avatar leonskim avatar kevinvangelder avatar ryanlntn avatar mwarger avatar derekgreenberg avatar jbreuer95 avatar fr33maan avatar ruddell avatar rwoverdijk avatar morgandonze avatar carlinisaacson avatar amurmurmur avatar nonameolsson avatar jankalfus avatar raviqqe avatar twerth avatar guhungry avatar rmevans9 avatar karlingen avatar jbosse avatar gorhom avatar bryanstearns avatar marcelkalveram avatar dustinromey avatar polidoro avatar

Watchers

James Cloos avatar Ed Barahona avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.