DEV Community

Cover image for Asteria: Asteroids approaching Earth today
Valeria
Valeria

Posted on

Asteria: Asteroids approaching Earth today

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

Top comments (6)

Collapse
 
valeriavg profile image
Valeria

Thank you! You too!

Collapse
 
duranbe profile image
BenoƮt Durand

wow amazing šŸ˜²

Collapse
 
valeriavg profile image
Valeria

Thank you šŸ˜Š

Collapse
 
spiritupbro profile image
spiritupbro

this is kinda like dont look up vibe

Collapse
 
valeriavg profile image
Valeria

Is it a good thing or a bad thing? šŸ¤£