@binarapps/expo-ts-template
v2.1.0
Published
Expo template ready to develop mobile apps
Downloads
44
Maintainers
Readme
@binarapps/expo-ts-template
This is a template to be used with react native and expo. It includes all the necessary stuff to start working with expo framework. It has the most popular packages included, so it's easier to start coding the app itself without all the necessary boilerplate setup.
Documentation
Check out our documentation page, it contains:
- Bootstraping project - tutorial how to easy setup from scrath
- Deploying app
- Tutorials
- How to manage environment variables
- Use jotai as state management tool
Why to use?
We know there are a lot of project starters for react native, but we have some good features:
- Fully works with EXPO GO
- Good for start the project and later you can switch to expo-dev-client
- Fully works on WEB
- If you want to develop apps both on web and mobile this starter is good choice for you
- Code generators (create new screen / create new component)
- Fully + Strong typed
- App deployment documentation (currently in progress, but it will be added in near future)
How it looks?
Check this recording of how it look like:
How to use?
We have prepared a detailed documentation for how to run project with this template - Bootstrap docs
It's great for production project, but if you want to just test it, you can follow the quick steps (on the bottom).
Quick steps:
npx create-expo-app --template=@binarapps/expo-ts-template name_of_your_app
cd name_of_your_app
yarn bootstrap
- the cli will ask you some questinos about your app (you can fill all this data later)
What's inside?
Implemented custom features
- generators:
- create screen -
yarn generate:screen
- create component -
yarn generate:component
- create screen -
- support of multiple environments
- production, staging, qa
- eas configuration
- update, build, submit
- verifying code on pull request - pipelines
- when creating pull request on github, there are tests, linters and types checks. If there will be some error you will be notified that something is wrong.
- custom fonts
- wait to load fonts and all the assets
- dark / light theme support
- color scheme detection (dark / light mode toggle)
- navigation
- screen tracking hook
- state persistence on development mode
- prevent go back (to be used on forms for example)
- strong types, prevent issues in future
- auth flow ready for implementation details
- using expo-secure-store module to save user token
- right now it has simple signIn/signOut flow
- animations with
reanimated
andmoti
Implemented libraries
- TypeScript
- app is fully typed
- Expo v49
- React Navigation v6
- Prettier and eslint
- code formatting
- code checking
- Babel-module-resolver
- unified imports
- jest and @testing-library/react-native
- unit tests
- i18next
- translations
- language detection
@gorhom/bottom-sheet
- Expo-notifications
- You can read how to configure them here
- Reactotron
- used for debugging
- Reanimated v2
- Axios + React query
- Fetching data from backend
What is planned in the future?
- add some state management tool - in progress
- write docs (app deployment, app setup and more) - in progress
- tutorial on how to use features
- navigation
- deeplinking
- auth flows
- components
- react query
- api calls
- state management tool
- Add desings (figma) and redesing whole app
- Updating expo versions (in future)
- Deploy app to appstore and playstore
- Create sample app and document the process of deployment
- Improve mock server logic
- add commit lint
- add script that display last update information (eas update)
Implementations to add
How to contribute?
Contributions are always welcome!
See CONTRIBUTING.md for ways to get started.
Please adhere to this project's code of conduct
.
How to run locally?
Clone the project
git clone https://github.com/binarapps/expo-ts-template.git
Go to the project directory
cd expo-ts-template
Install dependencies
yarn
Start the expo server
yarn start
Icons
This template uses Remix icon set
It is added to the app as a font generated by icomoon app.
Adding new icons
- Find
assets/icomoon/selection.json
file in your machine - Import this file to this page (icomoon app):
- Make sure there are no other icons imported there
- Download icon which need to be added to the app as svg file.
- Make sure new icon name is unique (already not used).
- Add svg file to icomoon app.
- Go to generate font tab - icomoon app.
- Make sure that all icons that you have added have correct names
- Download font - icomoon app
- Replace old files with downloaded ones
- ./selection.json => assets/icomoon/selection.json
- ./fonts/icomoon.ttf => assets/icomoon/icomoon.ttf
- Generate new types for icons
- run script generating icon types
yarn generate:icon:types
Adding jotai as state management tool
This starter doesn't go with any state management tool, but we have created separate branch with jotai setup, maybe in the future we will add more tools support.
To use jotai with this starter you can check bootstrap docs: Bootstrap docs
License
Feedback
If you have any feedback, please reach out to me at [email protected]
Contributors
- Kacper Grzeszczyk - @kacgrzes
- Mateusz Rostkowski - @MateuszRostkowski
- Michał Szalowski - @MSzalowski
- Jakub Zagórski - @zagoorland
- Łukasz Patalan - @lukasz
- Mario Gliwa - @mario688
- Michał Baumruck - @micbaumr
- Andrzej Zaborski - @AnMiZa
- Bartłomiej Sworzeń - @Sworzen1
- Karol Andracki - @karol-andracki
- Weronika Grzeszczyk - @vercia
- Mateusz Świerczyński - @MatiSwierczynski
Similar packages
- https://github.com/obytes/react-native-template-obytes
- https://github.com/infinitered/ignite
- https://github.com/wataru-maeda/react-native-boilerplate
Outdated (not maintained anymore)
- https://github.com/kacgrzes/expo-typescript-template (our repo is fork of this one - we keep maintaing this)
- https://github.com/codingki/react-native-expo-template
- https://github.com/flatlogic/react-native-starter
- https://github.com/mcnamee/react-native-expo-starter-kit