Skip to content

Modern React Native app that displays SpaceX rocket launches with best practices and clean coding

Notifications You must be signed in to change notification settings

Babazon/rocket-launch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rocket Launch Tracker

Rocket Launch Tracker is a user-friendly mobile application designed to keep users updated on SpaceX launches. Leveraging the SpaceX public API, the app provides real-time information about upcoming and past launches. Users can conveniently navigate through launches, view launch details, and watch launch videos with ease.

  1. Rocket Launch Tracker
  2. Key Features
  3. Project Structure
  4. Quality of Life Improvements
  5. Future Improvements
  6. Screenshots
  7. Installing and running the app
  8. Congratulations!
  9. Troubleshooting
  10. Learn More

Key Features

Launch Tracking:

Utilizes the SpaceX public API to fetch launch data and presents it in an organized manner.

Intuitive Interface:

Features a performant SectionList for efficient navigation and a "scroll to top" button for seamless user experience.

Launch Status Visualization:

Employs a color-coded system to visually represent the success or failure of launches, enhancing user comprehension.

Image Handling:

Provides placeholder images from the assets folder to ensure a consistent user interface and utilizes FastImage for efficient image caching.

Optimized Performance:

Implements custom hooks to streamline logic in views and thoroughly tests utility functions for reliability. Make use of memoised variables and functions throughout the SectionList in order to optimise re-rendering cost.

Webview Integration:

Seamlessly integrates launch videos via Webview using YouTube links obtained from the API responses.

Project Structure

The project follows a structured layout for easy navigation and maintenance. Folders such as state, translations, context, (or containers, molecules..) can be added when the project gets larger.

/src
  /components
  /screens
  /services
  /assets
  /hooks
  /utils
  /navigation
  App.tsx
  constants.ts
__tests__
__mocks__

Quality of Life Improvements

The package.json file includes scripts for linting, formatting, type-checking, and running unit tests, promoting code quality and maintainability.
$ npm run check-types $ npm run lint-fix $ npm run test $ npm run format

Future Improvements

While the current version offers essential functionality, potential future enhancements include implementing push notification services for upcoming launches and introducing a "Live Launch Countdown" feature displaying live YouTube streams with integrated chat functionality. Had SpaceX api offered paging, or graphql, smaller requests could be made on home screen which would ease the burden on the network usage and calculation costs on the device. Finally, a real designer could design a futuriistic, atom-age style design that provides a real ROCKET APP feeling.

Screenshots

Android

Screenshot_20240324_160949 Screenshot_20240324_161047

IOS

simulator_screenshot_0083A262-BD0F-403C-9E0E-B3FBB4FBC897 simulator_screenshot_B9D8324D-DDA9-4977-BBAF-C4B13B8532F2 simulator_screenshot_16323FCA-F9DB-4B0B-8EDA-88D3ED0CE2C9 simulator_screenshot_D7989D04-C55A-4D1B-8DB1-F6DE09379F7E simulator_screenshot_6DD0B5C8-F923-4C47-9CA5-A6CEC5535472

This is a new React Native project, bootstrapped using @react-native-community/cli.

Getting Started

Note: Make sure you have completed the React Native - Environment Setup instructions till "Creating a new application" step, before proceeding.

Step 1: Start the Metro Server

First, you will need to start Metro, the JavaScript bundler that ships with React Native.

To start Metro, run the following command from the root of your React Native project:

# using npm
npm start

# OR using Yarn
yarn start

Step 2: Start your Application

Let Metro Bundler run in its own terminal. Open a new terminal from the root of your React Native project. Run the following command to start your Android or iOS app:

For Android

# using npm
npm run android

# OR using Yarn
yarn android

For iOS

# using npm
npm run ios

# OR using Yarn
yarn ios

If everything is set up correctly, you should see your new app running in your Android Emulator or iOS Simulator shortly provided you have set up your emulator/simulator correctly.

This is one way to run your app β€” you can also run it directly from within Android Studio and Xcode respectively.

Step 3: Modifying your App

Now that you have successfully run the app, let's modify it.

  1. Open App.tsx in your text editor of choice and edit some lines.

  2. For Android: Press the R key twice or select "Reload" from the Developer Menu (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes!

    For iOS: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes!

Congratulations! πŸŽ‰

You've successfully run and modified your React Native App. πŸ₯³

Now what?

Troubleshooting

If you can't get this to work, see the Troubleshooting page.

Learn More

To learn more about React Native, take a look at the following resources:

About

Modern React Native app that displays SpaceX rocket launches with best practices and clean coding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published