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.
- 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.
| 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 |
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)
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"
}- Node.js 16+
- A MongoDB database (local instance or a free MongoDB Atlas cluster)
git clone https://github.com/sagarkpatil3/NASA-Project.git
cd NASA-Project
npm install # installs both server and client dependenciesCreate server/.env from the example and set your MongoDB connection string:
cp server/.env.example server/.envPORT=8000
MONGO_URL=mongodb+srv://<user>:<password>@<cluster>.mongodb.net/nasanpm run watch # API on http://localhost:8000, React on http://localhost:3000npm testnpm run deploy # builds React into server/public and starts the API
npm run deploy-cluster # same, but runs the server in PM2 cluster modeOnce it's built, the whole app is served from http://localhost:8000.
- 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
Data sources: NASA Exoplanet Archive (Kepler mission) and the SpaceX API. Built as a learning project to practice production-style Node.js development.
