Skip to content

eliacharfe/nasa-api

Repository files navigation

nasa-api

Eliachar Feig

Email1: efeig15@gmail.com
Email2: eliacharfe@edu.hac.ac.il

Execution

Run npm install in Terminal
Open console, execute : node bin/www

Then open your browser at http://localhost:3000

In order to enter to the home page where you can extract Nasa photos and then save/delete/clear
all photos, you first need to register and then log in.
In the 1st form you need register a correct format email, a 1st name and last name using
only letters. If the email is already registered in the database you will be notified to
to correct this, else you will be redirected to the 2nd form where you'll have only 1 minute
to register (after confirmation) a password (at least 8 character). if you succeed that
then you will be registered as a new user and redirected to the login page, where you can
log in. When the user log in the program will open a unique session to the particular user
so if the user is saving some images and log out, and later he will log in again he will see
his saved photos (each user have his own list of save photos). When a user is logged in
he cannot be able to access the pages of login/register/password pages.
After the user is logged in the program is executing a connection to NASA API server. The goal is to get mars
photos according to user inputs which includes a date, a mission and a camera.
First it uses 3 fetches to get basic data about the 3 missions (landing date, max
earth date and max sol) and save those in variables. If the fetch is does not work
due to Server break down (404, 504 etc) will insert default data about the missions.
This program open a html page which has a form where the user to insert a valid date
or Sol, a mission name and a camera name. Then, when the user is submitting the
form, do validation and inform the user what is wrong under the particular input field.
If all the inputs are correct then executes another fetch with the data to get the mars
photos and show them in 3 columns with details about each photo and with 2 buttons, 1 button
save the image in a list of saved images (with it details and an option to full screen
mode of the image in a new tab), and 1 button that shows the
photo at full screen mode (in another tab). An image can be saved only once, if the user
tries to save an image that is already saved will get a message throughout a pop up modal
that appears on the screen without the need of scrolling up or down.
There is a button that shows a display bootstrap carousel of the current photos that
displays at the DOM.
There is option to delete photos one by one and all in once as well. There is also a carousel
for displaying all photos.
There is a button that open a modal with my personal details.

Assumptions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published