Asteria: Asteroids approaching Earth today

Valeria - Jan 3 '22 - - Dev Community

Overview

This project shows a list of asteroids and other objects that are approaching Earth today 😱

Worry not though, most of them will miss our planet by dozens of millions of kilometers 😅

Preview

See live: https://asteria-gccgo.mongodbstitch.com/

Submission Category:

Choose Your Own Adventure

Link to Code

GitHub logo ValeriaVG / asteria

Asteroids approaching Earth today MongoDB Hackathon Winner

How it works

  • Realm function fetchNEOFeed uses NASA API to fetch a list of approaching near-Earth objects, transforms them to a more appropriate form and upserts them to a MongoDB collection:
    Neo collection

  • Scheduled Realm trigger runs this function every hour:
    Trigger scheduled to 1/* * * *

  • Filled collection is used to generate Realm GraphQL schema:
    GraphQL schema

  • Realm Hosting hosts minimalistic web page that fetches data from GraphQL server and renders it:
    Realm Hosting

Hope you like it! And let's hope we shall never see this:
Fake collision state

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player