Skip to content

antonylion/orbital_ei

Repository files navigation

Orbital_EI 🛰

Orbital_EI is a fictional RESTful API designed for searching and ordering satellite images. It enables users to interact with a database of satellite imagery and place orders for specific images.

Live Demo

A production instance of Orbital_EI is running on Render. You can interact with the API using:

Example API Requests

Get orders filtered by payment method:

curl "https://orbital-ei.onrender.com/api/orders?paymentMethod=Credit%20Card"

Search Sentinel-2 images within Seoul's area (bounding box filtering):

curl "https://orbital-ei.onrender.com/api/images?sensor=SEN2&bbox=126.850,37.438,127.138,37.651"

Create a new order:

curl -X POST https://orbital-ei.onrender.com/api/orders \
  -H "Content-Type: application/json" \
  -d '{
    "image_id": 1,
    "customer_email": "[email protected]",
    "payment_method": "PayPal"
  }'

Installation

Prerequisites

Before getting started, ensure you have installed:

Environment Setup

  1. Clone the repository:

    git clone https://github.com/antonylion/orbital_ei.git
    cd orbital_ei
  2. Create an environment file:

    # Create .env file in project root with the following content:
    DB_USER="postgres"
    DB_HOST="localhost"
    DB_NAME="postgres"
    DB_PSWD="mysecretpassword"
    DB_PORT=5432

Running the Application on localhost

There are two ways to run Orbital_EI: Production mode and Development mode.

Production Mode

If you just want to run the application:

  1. Build the Docker image:

    docker build -t orbital-ei .
  2. Start the services:

    docker compose up

The application will be available at http://localhost:3000.

Development Mode

If you're planning to modify the code:

  1. Install dependencies locally:

    npm install
  2. Start only the database container:

    docker compose up db

    And open a new terminal.

  3. Run unit tests:

    npm run test
  4. Run the application in development mode:

    npm run dev

The application will be available at http://localhost:3000.

Verifying the Installation

Test if the API is running properly:

curl http://localhost:3000/api/images

About

RESTful API for managing satellite images and orders

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages