This project utilizes the NASA API to provide users with information about various astronomical phenomena.
- Fetches data from the NASA API to display astronomy details.
- Backend built with Node.js.
- Frontend built with React and Chakra UI CSS framework.
The Astronomy Picture of the Day (APOD) API provides a new astronomy-related image or photograph each day, along with a brief explanation written by a professional astronomer.
The Earth API allows users to retrieve satellite imagery and other data related to Earth observation missions conducted by NASA.
The Mars Rover Photos API provides access to photos taken by NASA's Mars rovers, including Curiosity, Opportunity, and Spirit. Users can browse photos by rover, sol (Martian day), and camera.
To get started with this project, follow these steps:
-
Clone the repository:
git clone https://github.com/ImeshPasinda/AstronX.git
-
Navigate to the backend directory:
cd backend
-
Install dependencies:
npm install
-
Set up MongoDB:
- Install MongoDB on your machine if you haven't already.
- Start MongoDB server.
-
Configure MongoDB connection:
-
Create a
.env
file in thebackend
directory. -
Add the MongoDB connection URI to the
.env
file. Example:MONGO="mongodb+srv://<username>:<password>@<cluster>/<database>" JWT_SECRET=<your_jwt_secret>
-
-
Run the development server:
npm run dev
-
Navigate to the frontend directory:
cd frontend
-
Install dependencies:
npm install
-
Start the development server:
npm start
To build the backend for deployment:
npm run build
To build the frontend for deployment:
npm run build
The application is deployed at: https://astronx.netlify.app/