Giter Club home page Giter Club logo

ddd-typescript-api's Introduction

Cluster Node API

Getting started

System requirements

  • git
  • docker
  • docker-compose

Startup

A Makefile provides a couple of commands

$ make
Usage:
 make [target]

Available targets:
 help:            Help
 start:           starts platform
 recreate:        destroys containers and recreates platform

To startup the project just run make start. Wait a bit for the containers to start and then browse http://localhost:3000/api and you should see a Swagger UI

Screenshot

Authentication

username: john.doe
password: password
curl --request POST 'http://localhost:3000/api/v1/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "john.doe",
    "password": "password"
}'

it will give an access token that should be used to access other APIs

{
    "access_token": "<THE GENERATED TOKEN>"
}
curl --request GET 'http://localhost:3000/api/v1/<some endpoint>' \
--header 'Authorization: Bearer <THE GENERATED TOKEN>'
What it does

A simple API to manage nodes of computing clusters.

There are two possible types of end users for this API: an unauthenticated one, and an authenticated one. "Anonymous user" and "Privileged user" respectively. The privileged user can implicitly also do everything the anonymous user can.

  • As an anonymous user, I shall be able to access The API remotely.
  • As an anonymous user, I shall be able to read a list of features The API offers.
  • As an anonymous user, I shall be informed when trying to use a feature that is only available to privileged users.
  • As a privileged user, I shall be able to search for nodes, either by node name or by cluster name.
  • As a privileged user, I shall be able to create/read/update/delete nodes.
  • As a privileged user, I shall be able to issue power-on/shutdown/reboot commands to a single node.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.