NASA React Gallery is a clean and minimal React app that fetches and displays images from NASA's Astronomy Picture of the Day (APOD) API. Each image is accompanied by its title, date, and explanation — giving users a daily dose of cosmic wonder.
✨ Powered by NASA's public API and built with React.
- 🔭 Fetches the Astronomy Picture of the Day from NASA
- 🖼️ Displays image, title, date, and detailed explanation
- 🔄 Refreshes content with a new random date
- ⚛️ Built with modern React (hooks, functional components)
- 🚀 Deployed via GitHub Pages
See it in action:
👉 https://josgard94.github.io/nasa-react-gallery
Take a look at the clean and responsive user interface built with React:
- Frontend: React (JavaScript, JSX)
- API: NASA APOD API
- Styling: CSS (Flexbox)
- Deployment: GitHub Pages (
gh-pages
)
- Clone the repository:
git clone https://github.com/josgard94/nasa-react-gallery.git
cd nasa-react-gallery/client
- Install dependencies:
npm install
- Create a .env file and add your NASA API Key:
REACT_APP_ROOT_API="https://api.nasa.gov/planetary/apod?api_key=YOUR_API_KEY_HERE&count=6"
- Run the app:
npm run start
To deploy on GitHub Pages:
npm run deploy
This will build the app and push it to the gh-pages branch for live hosting.
Leave a ⭐ if you enjoy it or find it useful!