> For the complete documentation index, see [llms.txt](https://space-axolotls.gitbook.io/space-axolotls-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://space-axolotls.gitbook.io/space-axolotls-docs/readme.md).

# Meteor-Madness-Space-Axolotls

### **Project Overview and Functionality**

This project is an interactive simulation and visualization platform composed of **two main sections**:

1. **Orbiting Objects Section:** This part connects in real-time to **NASA's Asteroids - NeoWs API** to retrieve data on Near-Earth Objects (NEOs) like asteroids and comets. It processes this information to model their orbital trajectories and calculates the probability of impact.
2. **Collision Simulation Section:** This allows users to run a hypothetical impact scenario. They can configure key variables such as the **impact location** on Earth, and the asteroid's **size, density, and velocity**. Based on these parameters, the system simulates and visualizes the physical consequences:
   * The size and depth of the crater.
   * The energy released, equivalent to megatons of TNT.
   * Devastating side effects such as **earthquakes and tsunamis** generated by the impact.

### **Benefits and Intended Impact**

* **Benefits:** It translates complex astronomical data and physics principles into an **easy-to-understand visual experience**. It offers a memorable and interactive learning tool, superior to static teaching methods.
* **Intended Impact:** The main goal is to **foster public interest in science**, astronomy, and the importance of planetary defense. We seek to raise awareness about the risks of asteroid impacts in a tangible way, by showing the magnitude of these events and justifying the need for detection and monitoring programs.

## Deployment

### 1. Installing dependencies

To deploy this project on your local machine you will need to:

#### 1.1 Install Python v3.13

You can download it [here](https://www.python.org/downloads/release/python-3136/)

#### 1.2 Install Node.js v22.20

You can download it [here](https://nodejs.org/en/download)

### 2. Set up environment

#### 2.1 Install Node.js dependencies

1. Open a terminal on the `./front-end` directory
2. Run the `npm install` command and it should automatically install all required dependencies

#### 2.2 Install Python dependencies

1. Open a terminal on the `./back-end` directory
2. Create a new virtual environment by using the command\
   `python -m venv venv`
3. Activate the virtual environment
   1. On Linux/MacOS:\
      `source venv/bin/activate`
   2. On Windows:\
      `venv\Scripts\activate`
4. Run the setup.py:\
   `python setup.py`

### 3. Run the Server

#### 3.1 Run the Python back-end

1. Open a terminal on the `./back-end` directory
2. Activate the previously created virtual environment
3. Run app.py:\
   `python app.py`
4. Keep it running on the background

#### 3.2 Run the Node.js front-end

1. Open a terminal on the `./back-end` directory
2. Run the `npm start` command
3. You can now access the site on [localhost:3000 ](localhost:3000)!
