Ticketmaster-events is a mobile app built with React-Native and consumes Ticketmaster API to fetch events.
You need to have node
and yarn
installed. After cloning the repository you might want to run yarn install
on root folder.
Some warnings may appear after running on development mode. This is due to the icons library I used here that is outdated. Forking it and opening a Pull Request should fix the issue
- Expo
- React-Navigation
- Jest
- React-test-rendderer
- ESLint (with AirBnB configuration)
- React Hooks
- Context API
- StyleSheet
- @react-native-async-storage/async-storage (AsyncStorage)
api
- Folder with network layer content.components
- Folder with components used by screens.screens
- Folder containing the Routes config and the screens components.context
- Folder containing Context components responsible to share data between components. In this case, we used to store and access WishList.scripts
- Folder containing scripts to improve work time.storage
- Folder containing files to access storage.__tests__
- Folder with tests
- List Events ordered by Relevance Desc
- Infinite Scrolling with FlatList component
- Search Events by Keyword
- WishList: Add events to WishList
- Clone this repository and run
yarn install
to install dependencies. - Create a
.env
file on root folder with the following data: -TICKETMASTER_API_KEY=<your_api_key>
You can run the app through expo
with the following commands:
yarn expo:start
- Will build JS and generate bundle to be loaded through Expo App on your device. You need to install Expo app on your device and scan QR Code generated by Expo on terminal to launch the app.yarn web
- Will try to run the app through expo as a Web app. Some features may not work.yarn start
- Starts the server that communicates with connected devices.yarn android
- Will run app through Android device or emulator. If it doesn't go as expected, you should see troubleshooting here. Make sure the React-native server is started.yarn ios
- Will run app through iOS device or emulator. If it doesn't go as expected, you should see troubleshooting here. Make sure the React-native server is started.
There are other useful commands about testing, checking lint and creating new commands automatically:
yarn test
- Run all tests and prints code coverage. Current coverage: ~94%.yarn test:watch
- Run all tests and watches for changes on files to run again automatically.yarn lint
- Checks lint formatting for all js files on project.yarn lint:fix
- Runs lint and try to fix the formatting automatic fixable issues.yarn create:component <component_name>
- Creates a new empty component on components folder, its test file on components/_tests_ folder and exports it to be used on screens or other components.