r/reactnative • • Mar 16 '20

Built a react native app for aurora enthusiasts, called hello aurora

366 Upvotes

75 comments sorted by

19

u/jeremybarbet Mar 16 '20 edited Mar 16 '20

Hi!

I just wanted to share with you a mobile application I’m working on during my free time, called hello aurora. It’s made for aurora amateurs and enthusiasts that want to know when northern lights are showing up. There is a lot of features available, here is a quick list:

  • Real-time and forecast data for northern lights from different stations around the world

  • Last aurora data that happened during the last sun rotation

  • Shared location on the map from other users when spotted aurora

  • Cloud coverage, weather alerts, road conditions on the map (for Iceland only at the moment)

  • Aurora oval on the map as well

  • Notifications when users share locations, conditions are good for an aurora display or weathers alerts are in progress

  • Weather forecast for your location

  • Using different sources depending on your location to give the best results possible

There are multiple packages running the whole app:

  • A scheduler to create cloud coverage layers (for Iceland only at the moment)

  • Firebase function running every minute saving every fluctuation of the aurora (in Norway, Sweden, Finland, Iceland, Canada, Alaska) to be able to get the time where it was the stronger

  • Firestore to save users location when they spot the aurora

  • A graphql API that unifies more than 10 differents API together to provide data to the app

  • And the react native app, running the whole thing

You can visit www.hello-aurora.com to find more details or download the app on the App Store and the Play Store.

Cheers 👌🏻

5

u/vertigo_101 Mar 16 '20

Amazing stuff mate, can you tell us how did you animate the splash screen?

11

u/jeremybarbet Mar 16 '20

Thanks! After effect + Bodymovin + react-native-lottie

3

u/vertigo_101 Mar 16 '20

Great, are you thinking about opensourcing this?

4

u/jeremybarbet Mar 16 '20

I thought about it, but not for the moment

4

u/adilp Mar 16 '20

How do you get the listview elements to animate up on load.

3

u/jeremybarbet Mar 16 '20

It's basically 6 differents views that have different Animated.Value triggered in parallel with a small delay between each

1

u/vertigo_101 Mar 16 '20

Oh wait I knew I recognised your name from somewhere, wanted to say I love react-native-modalize

2

u/jeremybarbet Mar 16 '20

Thanks man!

3

u/mirocosic Mar 16 '20

jeremybarbet

+1

3

u/_TRN_ Mar 17 '20

How long did it take you to make this? This is some super cool stuff.

3

u/jeremybarbet Mar 17 '20

Thank you! A couple of months. I git init the project in March last year. I had couple of months off because of work. But I’m super active on it and I still have a lot to do to reach my ideal app goal. So in short a lot of time

1

u/janithaR Mar 16 '20

A graphql API that unifies more than 10 differents API together to provide data to the app

If you have more information to share on this I'm all ears.

2

u/jeremybarbet Mar 16 '20

Well, not sure what you want to know exactly. But basically I have resolvers for space, weather, road and magnetometers.

I get data for the weather from 4 differents APIs: MET, Vedurstofa, Belgingur, OpenWeather and for each of them I'm creating and returning the same structure of data, so depending on the users' location I can just expose the needed object.

I then do the same for magnetometers, where I get data from 5 different APIs, return the same object, and expose to the user depending on its location.

1

u/janithaR Mar 16 '20

I'd like to know how to unify multiple REST APIs into one and create a GraphQL API out of it. How to host it, test it etc.

2

u/jeremybarbet Mar 16 '20

Well, most of the APIs for magnetometers are super old and I only have csv/xml files that I have to parse. So it's really custom depending on the API.

To do short, I designed the app first and then created the graphql schema to fit the design. Then I shaped the data out of each API to fit the graphql schema.

Just as an example I have API 1 that returns { data: { aurora: 4 } } and API 2 that returns { data: { superApi: { space: { aurora: '4' } } } }. Then I just parse this result and make them fit an unique object to return { aurora: 4 }. It's a very simple example, but you probably have to work case by case depending on the API you work with.

About the hosting, it's running on Heroku with Redis Cache.

1

u/tekT4lk Mar 16 '20

I loved your landing page. How you’ve made the mockups ?

3

u/jeremybarbet Mar 16 '20

Thanks man! I must have downloaded on Dribbble "free iPhone mockup".

4

u/Circadian77 Mar 16 '20

There are some supremely talented people in this community and you sir are one of them.

3

u/jeremybarbet Mar 16 '20

Woow, that's really nice. Thank you very much, I really appreciate that!

3

u/grexeo Mar 16 '20

I just get "Hang in there, we almost loaded everything!" endlessly.

Tried reinstalling multiple times. Google Pixel, not rooted, internet and all other apps working fine.

2

u/jeremybarbet Mar 16 '20

Looks like heroku is having outage at the moment. Perfect moment. You can try again to restart the app, it just worked for me now

1

u/rajatrao777 Mar 21 '20 edited Mar 21 '20

Thanks its working now...what backend you used for this project,design tool,state management ,how you managed responsive styles and what other tech stack apart from one mentioned in description.Really liked splash screen and design,clean & smooth :)

2

u/jeremybarbet Mar 21 '20 edited Mar 21 '20

Thank you! sure thing,

I have 6 packages, all using typescript:

- firebase functions (events/notifications/db/...)

- website (https://github.com/ueno-llc/create-ueno-app with gatsby starter and styled-components/...)

- dashboard (same stack as website)

- api (graphql/express/apollo-server-express/sentry/redis/...)

- app (react-native/sentry/firebase/mobx/styled-components/...) (there is the full package json in one of the comment I posted)

- clouds (imagemagick/bash/scheduler/node js/turf/...)

I used Sketch for the design part, and the few stuff I have to manage differently between android and ios, is just isIos ? '10px' : '20px'

1

u/rajatrao777 Mar 21 '20

Thanks for the info, how did you handle styles across different screen sizes like font size,padding ,width,height, which is in dp does it manages itself or you used any library to handle across varying screen sizes?

2

u/jeremybarbet Mar 21 '20

It just manages itself. I didn't do anything specific related to that. I guess if I wanted to improve the design on iPad that something I would need to look at

1

u/rajatrao777 Mar 21 '20

ok cool👍

1

u/rajatrao777 Mar 16 '20

same issue here..

2

u/arhmnsh Mar 16 '20

Really impressive app! What did you use for the splash screen animation? Lottie?

4

u/jeremybarbet Mar 16 '20

Thanks! I created the animation on After Effect, exported it with bodymovin and used react-native-lottie on the app

2

u/LongSleevedPants Mar 16 '20

Wow very impressive! Curious, why did you decide to lowercase the scrolling header at the top with values: "now", "tomorrow", "next day" instead of capitalizing them?

2

u/jeremybarbet Mar 16 '20

That's a good question. When you think about aurora, it's like a continuous line in the sky, moving around and being its own shape, dominating the sky, that inspires the all lowercases headings.

No.. I'm kidding, because it looked good, it felt weird on big font size. The name is also "hello aurora", it felt right 😅

2

u/cechelsea Mar 18 '20

So dope!! Fun fact, I first knew about you through your react-native-modalize library haha. Getting hooked with how beautiful it performs.

One question tho, how did you make your app have such a fast loading time? Is the “splash screen” native one or js one (aka one screen of the app)?

Tks for such inspiration

2

u/jeremybarbet Mar 19 '20

Thank you for using react-native-modalize and glad you like it!

Well, first the splash screen is just a react view, not native. Second, the first loading screen when you ran the app for the first time might be the one that takes more time, because it fetches all the data. After that, the data is persisted on your phone and only new data is refreshed when needed and on the API side, there is a Redis cache layer to avoid requesting web services all the time and making the response time way faster.

1

u/cechelsea Mar 19 '20

Thanks man! Let me try restructuring API call to improve loading time. So you didn't use native splash screen at all? Cuz I heard there's a part of loading time where the app return "white screen" if we don't use native splash screen. Have you experienced such issue before?

Much appreciated 🙏

2

u/jeremybarbet Mar 19 '20

Well, it uses native splash screen, but I'm not doing anything with it. I just replaced the background color to fit the background color of the react-native view for the splash screen so you don't see the transition between the two.

Yes, I saw the "flash" issue before. It's because of my async calls that are executed before I run the react-native-navigation startApp and that it can apply the background color from the first screen { layout: { backgroundColor: 'blue' } }

So basically, native splash (blue background) > async call (no app created yet, white flash) > startApp (blue background). I think it's still happening on Android, but not iOS

2

u/sindr3 Mar 27 '20

Nice work! Going to test this out in northern Norway over the next few weeks.

1

u/jeremybarbet Mar 27 '20

Sure, let me know your experience! The season comes to an end, but there is still a few weeks left to experience aurora

2

u/flumefyre Apr 13 '20

Love the UI!

1

u/deeepanshu98 Mar 16 '20

Hey man! Really great app! Love the animations.

1

u/jeremybarbet Mar 16 '20

Thanks, man, really appreciated!

1

u/lucbas Mar 16 '20

Looks fantastic!

What bottomsheet did you use? Full-page body scroll and the scroll to dismiss looks awesome

5

u/jeremybarbet Mar 16 '20

Thanks for the feedback! I used https://github.com/jeremybarbet/react-native-modalize which I built

2

u/bulby97 Mar 17 '20

I was about to ask about that sweet modal with the scrollable content. This is some amazing work !

1

u/jeremybarbet Mar 17 '20

Thanks! Really appreciate

1

u/lucbas Mar 16 '20

Thanks for the answer! I didn’t know this library, we were using this one so far: https://github.com/osdnk/react-native-reanimated-bottom-sheet

But it doesn’t support virtualized lists, nor pull to dismiss for virtualized lists.

Can you scroll to dismiss from the body, or do you have to swipe from the header section?

1

u/jeremybarbet Mar 16 '20

This is a great library too!

Yeah you can dismiss by scrolling down on the content. It shipped with ScrollView, ListView, SectionList by default and you can wrap it with your own component as well. (WebView for example, which keep the scroll to dismiss on the content)

1

u/marius4896 Mar 16 '20

Very nice app, smooth animations, a general good app to interact with. Hat down to you for the effort, not to say about your plugin which is great !

1

u/jeremybarbet Mar 16 '20

Thank you man for the feedback, really appreciate it!

1

u/steetyj Mar 17 '20

Very nice design. What approach did you use for the “now today next day” lists on the main screen? Is this just a horizontal scroll view with several lists side by side?

2

u/jeremybarbet Mar 17 '20

Thanks!

The whole swiping screen/tabs is using react-native-tab-view. "now/today/..." is part of a custom tab bar passed to react-native-tab-view containing a horizontal scrollview.

1

u/hj1509 Mar 17 '20

How much time did it take for you to gain such knowledge? Your app looks amazing

2

u/jeremybarbet Mar 17 '20

Thanks for the message!

I was UI/UX designer before for 4 years and I was already doing development during my free time, on useless small apps, websites, web app just to practice and have fun. I moved 3.5 years ago as a front-end dev. So to sum-up, it took me ~8 years as a whole thing.

But I don't think you need this whole path to be able to do amazing stuff. The most important is to practice and create small projects to keep you up-to-date and be able to explore new stuff.

1

u/Sancty Mar 18 '20

Love this demo. What did you do to record this?

1

u/jeremybarbet Mar 18 '20

I just used the iOS record function, and then imported it into after effect to add the box-shadow/border-radius around the screen record

1

u/khuznain Mar 19 '20

Hi, can you show just package.json file so we can look into what packages are you using ! I'm inerested in the modal from bottom ! thanks mate

2

u/jeremybarbet Mar 19 '20

Sure, here is the full list of dependencies (I didn't put dev ones)

The bottom modal is using the library I built react-native-modalize.

"@babel/plugin-transform-react-jsx-source": "7.8.3",
"@react-native-community/async-storage": "1.8.1",
"@react-native-community/geolocation": "2.0.2",
"@react-native-community/netinfo": "5.5.1",
"@react-native-mapbox-gl/maps": "8.0.0-rc1",
"@sentry/react-native": "1.3.2",
"@turf/helpers": "6.1.4",
"apollo-cache-inmemory": "1.6.5",
"apollo-client": "2.6.8",
"apollo-link": "1.2.13",
"apollo-link-context": "1.0.19",
"apollo-link-error": "1.1.12",
"apollo-link-http": "1.5.16",
"apollo-link-queue": "2.2.0",
"apollo-link-retry": "2.2.15",
"date-fns": "2.10.0",
"emoji-flags": "1.2.0",
"flipper-plugin-react-native-performance": "0.4.3",
"graphql": "14.6.0",
"graphql-tag": "2.10.3",
"hoist-non-react-statics": "3.3.2",
"jsc-android": "241213.1.0",
"lodash": "4.17.15",
"lottie-ios": "3.1.6",
"lottie-react-native": "3.3.2",
"mobx": "5.15.4",
"mobx-react": "6.1.8",
"mobx-state-tree": "3.15.0",
"react": "16.12.0",
"react-apollo": "3.1.3",
"react-native": "0.62.0-rc.4",
"react-native-code-push": "6.1.0",
"react-native-config": "0.12.0",
"react-native-firebase": "5.6.0",
"react-native-geolocation-service": "4.0.0",
"react-native-gesture-handler": "1.6.0",
"react-native-iap": "4.4.2",
"react-native-linear-gradient": "2.5.6",
"react-native-localize": "1.3.3",
"react-native-modalize": "1.3.7-rc.8",
"react-native-navigation": "5.1.1",
"react-native-permissions": "2.0.9",
"react-native-reanimated": "1.7.0",
"react-native-redash": "9.6.0",
"react-native-svg": "11.0.1",
"react-native-tab-view": "2.13.0",
"react-native-version-number": "0.3.6",
"styled-components": "5.0.1"

1

u/kresogalic8 Jun 03 '20

Hey man nice app, I was just wondering how did you do that staggering animation on home screen?

1

u/jeremybarbet Jun 04 '20

Thanks!

“It's basically 6 differents views that have different Animated.Value triggered in parallel with a small delay between each”

3

u/nebling Mar 16 '20

Looks great! Good job : )

3

u/m3rr1ll Mar 16 '20

It's beautiful and useful well done!

3

u/Xeljawn Mar 16 '20

That looks sweet. Nice work.

2

u/bluey89 Mar 16 '20

Really slick, nice job!

2

u/johnanthony_e Mar 16 '20

Really nice UI 👍

2

u/claudioazevedo85 Mar 16 '20

nice

1

u/nice-scores Mar 16 '20

𝓷𝓲𝓬𝓮 ☜(゚ヮ゚☜)

Nice Leaderboard

1. u/GillysDaddy at 17711 nices

2. u/OwnagePwnage at 11911 nices

3. u/RespectfulNiceties at 8332 nices

...

11257. u/claudioazevedo85 at 4 nices


I AM A BOT | REPLY !IGNORE AND I WILL STOP REPLYING TO YOUR COMMENTS

2

u/grodisattva Mar 17 '20

This looks great! Good job!

2

u/nilsonivano Mar 20 '20

Beautiful app

1

u/kresogalic8 Jun 04 '20

Nice, is it possible to help me somehow to understand it with some code examples?

0

u/AlienSoldier Mar 16 '20

slick af! well done. How long did you worked on it?

1

u/jeremybarbet Mar 16 '20

Thanks man! I don't have an exact number, but I started the project in March last year. I had a couple of months off because of work, but overall, I'm spending a lot of time on it

2

u/[deleted] Mar 17 '20

[removed] — view removed comment

1

u/jeremybarbet Mar 17 '20

Yeah, React Native is great and has a lot of packages developed by great people that make your life easier at any level. There is a package for almost everything you need.