Skip to content

AmineAML/fadayiy-api

Repository files navigation

Fadayiy API

An API for Fadayiy App, a platform for exploring space.

EtymologyKey FeaturesAPIArchitecture DiagramHow to useBuilt withLicense

Ethymology

Fadayiy meaning 'a space thing' in arabic, comes originally from my willingness to build this application with content in that language but wasn't satisfied with the translation options or they didn't offer a translation that was enough without having to proof read it for mistakes, which means going through hundreds of pages, a more than a one man's job.

Key Features

The principal key features to keep note of are:

  • Explore space stations
  • Explore astronauts
  • Explore space agencies
  • Recent earth picture from space
  • Astronomy picture of the day
  • Upcomming launches
  • Newsletter

How to use

Requirements

This project is built using NestJS, with Node.js v14+ and NPM v8+, you can use Yarn or any other package manager after doing the required changes.

Developing

Rename .env.example into .env and add your environment variables.

npm install

npm run start:dev

Which will start the server on http://localhost:3000 with the GraphQL client at http://localhost:3000/graphql

Deploying

npm run docker:prod:up

Sample queries

Once you have the GraphQL client running on your machine, you can verify things are working by executing these queries:

Get the astronomy picture of the day

{
  astronomyPictureOfTheDay {
    explanation,
    hdurl,
    media_type,
    title,
    copyright
  }
}

Get space stations

{
  stations {
    name,
    status {
      name
    },
    type {
      name
    },
    image_url,
    description,
    founded,
    deorbited,
    orbit,
    owners {
      name,
      abbrev
    },
    id
  }
}

Built with

License

This project is under the MIT license.