Skip to content

About

Node.js and React Project from NASA Launch Control. Created This Project for Learning Purpose

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

NASA Mission Control: Full-Stack MERN Application

Node.js Express React MongoDB Jest PM2

A full-stack MERN (MongoDB, Express.js, React, Node.js) app for scheduling, tracking and aborting space missions to potentially habitable exoplanets. It processes NASA Kepler telescope data and syncs historical launch data from the SpaceX REST API.

Features

  • RESTful API built with Node.js and Express.js, with versioned routes (/v1).
  • Data pipeline: streams and parses the NASA Kepler exoplanet CSV dataset with Node.js streams (csv-parse) and filters it down to habitable planets by stellar flux and planetary radius.
  • Third-party API integration: fetches and normalizes historical SpaceX launch data (rockets, payloads, customers) with Axios.
  • MongoDB Atlas persistence through Mongoose schemas and models, using idempotent upserts.
  • Server-side pagination with ?page= and ?limit= query parameters.
  • Input validation and consistent JSON error responses (400/404).
  • React single-page app (React Router, Arwes sci-fi UI) for scheduling launches, viewing upcoming missions and browsing launch history.
  • Automated API testing with Jest and Supertest.
  • Production deployment: the React build is served by Express, and the server can run in cluster mode with PM2 to use all CPU cores.

Tech Stack

Layer Technologies
Frontend React 17, React Router, Arwes, Fetch API
Backend Node.js, Express.js, Morgan (logging), CORS
Database MongoDB Atlas, Mongoose ODM
Data NASA Kepler CSV (Node.js streams), SpaceX REST API (Axios)
Testing Jest, Supertest
DevOps PM2 (clustering/load balancing), Nodemon, npm scripts

Architecture

NASA Mission Control architecture diagram

NASA-Project/
├── client/                 # React front end (Create React App)
│   └── src/
│       ├── hooks/          # API request functions and data-fetching hooks
│       ├── pages/          # Launch, Upcoming, History views
│       └── components/
└── server/                 # Node.js + Express REST API
    ├── data/               # NASA Kepler exoplanet dataset (CSV)
    ├── services/           # MongoDB connection, pagination helpers
    └── src/
        ├── models/         # Mongoose schemas and data-access layer
        └── routes/         # Routers and controllers (planets, launches)

API Reference

Base URL: http://localhost:8000/v1

Method Endpoint Description
GET /planets List habitable Kepler exoplanets
GET /launches List launches (supports ?page= and ?limit=)
POST /launches Schedule a new launch
DELETE /launches/:id Abort a launch by flight number

Example request body for POST /v1/launches:

{
  "mission": "Kepler Exploration X",
  "rocket": "Explorer IS1",
  "launchDate": "December 27, 2030",
  "target": "Kepler-442 b"
}

Getting Started

Prerequisites

  • Node.js 16+
  • A MongoDB database (local instance or a free MongoDB Atlas cluster)

Installation

git clone https://github.com/sagarkpatil3/NASA-Project.git
cd NASA-Project
npm install            # installs both server and client dependencies

Create server/.env from the example and set your MongoDB connection string:

cp server/.env.example server/.env
PORT=8000
MONGO_URL=mongodb+srv://<user>:<password>@<cluster>.mongodb.net/nasa

Run in development

npm run watch          # API on http://localhost:8000, React on http://localhost:3000

Run tests

npm test

Production build

npm run deploy         # builds React into server/public and starts the API
npm run deploy-cluster # same, but runs the server in PM2 cluster mode

Once it's built, the whole app is served from http://localhost:8000.

What I Learned

  • Designing a layered Node.js back end (routes → controllers → models → services)
  • Processing large datasets with Node.js streams
  • Integrating and normalizing third-party REST APIs
  • Data modeling with MongoDB and Mongoose
  • Writing integration tests for Express APIs with Jest and Supertest
  • Scaling Node.js with the cluster model and PM2

Credits

Data sources: NASA Exoplanet Archive (Kepler mission) and the SpaceX API. Built as a learning project to practice production-style Node.js development.

About

Node.js and React Project from NASA Launch Control. Created This Project for Learning Purpose

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages