/nasa-apod-frontend

Frontend for Astronomica - NASA APOD infinite feed with authorization project.

Primary LanguageTypeScript

Astronomica 🪐 - NASA APOD Infinite Feed With Authorization

Introduction

This fullstack project made for better representation of NASA APOD API. APOD stands for Astronomy Picture Of the Day. Server logic located in this repo - nasa-apod-backend. Try this app live via GitHub Pages here.

Functionality

In this application I've implemented:

  • Infinite feed - when you scroll down to the end of the chunk (1 chunk - 10 posts) - another chunk will be loaded automatically
  • JWT authorization (token TTL is 1 hour), password encryption
  • Favourites section where you can store posts which you've liked, their identificators are saved in the DB (MongoDB) so they will be automatically refetched even if you will close this page and come back later
  • Responsive layout and hamburger menu for mobile devices
  • Show more / show less buttons for long posts and other small features for better UI / UX

This is how login and registration pages are look like:

login page

registration page

Infinite feed and favourites section:

feed page

favourites page

favourites empty page

Hamburger menu and warning for devices with small width:

hamburger menu

orientation warning

And you may see some warnings like these below if your token has expired or you were not authorized:

not auth feed

not auth favourites

Tech stack

  • React + TypeScript
  • Bulma + SCSS for interface and layout
  • ReactQuery (useQuery, useMutation)
  • Usehooks TS (useIntersectionObserver)
  • Axios

Future plans

  • Optimize feed, delete / hide content chunks which are far from current scroll position and fetch them again if necessary
  • Make UI developments