Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

SpacEd - Space Education Web Application

Table of Contents

  1. Introduction
  2. Setup
  3. Testing
  4. Deployment
  5. Acknowledgments
  6. Additional Information

Introduction

Welcome to SpacEd, a web application dedicated to space exploration and education! This project provides access to NASA's APOD (Astronomy Picture of the Day), EPIC (Earth Polychromatic Imaging Camera), and Mars Rover Photos APIs. Explore stunning images and information about space phenomena right from your browser.

Live Demo

You can access the live demo of the SpacEd web application from following links :

Setup

To set up the project locally, follow these steps:

Prerequisites

Ensure you have the following prerequisites installed:

  • Node.js
  • npm

Installation

To set up the project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/your-username/spaced.git
  2. Navigate to the project directory:

    cd spaced
  3. Install dependencies:

    npm install

Configuration

Before running the application, you need to obtain an API key from NASA and configure Firebase for authentication and hosting. Follow these steps:

  1. Obtain NASA API Key:

  2. Configure Firebase:

    • Go to the Firebase Console: https://console.firebase.google.com/.
    • Create a new project and follow the setup instructions.
    • Enable Authentication and choose the authentication methods( email/password, Google sign-in ).
    • Obtain your Firebase configuration settings from the Firebase project settings.
  3. Add API Key to Environment Variables:

    • Create a .env file in the project root.
    • Add the following environment variables:
    VITE_NASA_API_KEY=your-nasa-api-key
    VITE_FIREBASE_API_KEY=your-firebase-api-key
    VITE_FIREBASE_AUTH_DOMAIN=your-firebase-auth-domain
    VITE_FIREBASE_PROJECT_ID=your-firebase-project-id
    VITE_FIREBASE_APP_ID=your-firebase-app-id
    VITE_FIREBASE_STORAGE_BUCKET=your-firebase-storage-bucket
    VITE_FIREBASE_MESSAGING_SENDER_ID=your-firebase-massaging-sender-id
    VITE_FIREBASE_MEASUREMENT_ID=your-firebase-measurement-id
    
    • Replace your-nasa-api-key with the API key obtained from NASA.
    • Replace your-firebase-api-key , firebase-auth-domain, your-firebase-project-id , your-firebase-app-id , firebase-storage-bucket ,your-firebase-massaging-sender-id , your-firebase-measurement-id with your Firebase configuration settings.

Usage

To run the project locally:

npm run dev

This will start the development server

Build

To build the project for production:

npm run build

This will generate the production build in the dist directory.

Testing

This project utilizes Jest for testing. To run the tests, use the following command:

npx jest 

This will execute the test suites and provide feedback on the code's functionality and correctness.

Deployment

To deploy the project to Firebase Hosting:

  1. Install Firebase CLI globally:

    npm install -g firebase-tools    
  2. Log in to Firebase:

    firebase login

This will redirect to firebase login. login using you account.

  1. Initialize Firebase in your project:

    firebase init

Follow the prompts to select Firebase Hosting and choose your project.

  1. Deploy the project:

    firebase deploy

After deployment, you will get the hosting URL where your app is hosted.

Acknowledgments

This project acknowledges the following resources:

API Endpoint Details

Documentation for the NASA APIs used in this project can be found at the following links:

Additional Information

  • For detailed information on each API endpoint, refer to the API Endpoint Documentations.

  • Make sure to configure environment variables properly for testing environments to avoid errors.

  • Editor : IT21271182 - Rathnayake R M U V

    • More info available in SpacEd Report.pdf

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages