Code Monkey home page Code Monkey logo

cmr-staging's Introduction

CMR Staging API

Instructions

To start the solution you can, being located in the project directory, run:

./run.sh

That's all! this command will start the solution using docker-compose and will run the tests!

The services

Besides the staging API, the repository contains additional services to complement the solution. Here is a list of the services and an explanation of them:

service mapped port description
staging 8000 The main service. This is the staging API.
core_mock - This is the mock of the core API used for testing and development
integration_test - This is a small application used only for running the integration tests and is stopped by the run.sh script after that.
swagger-ui 8001 a swagger service with the definition of the staging API

About the development

The Staging API was developed using Slim Framework and following onion architecture. Here is an explanation of the directories:

public

It's the directory served by apache and only contains a very simple index.php.

config

This directory contains basic files used to start and configure the app. Here you can find the routing, dependencies injection, middlewares registering and a class which provide some test tokens.

infrastructure

After config, this is the most external layer, here you can find request handling middlewares and some adapter for interfaces defined inside the application.

Middlewares

See slim documentation for more details.

Adapters

Adapters that allow communicating with external services (supposing external even the configured tokens).

app

Here are the files that belong to the application itself. It contains the core files, and also the controllers and consumers.

Controllers

The application controllers

Consumers

The classes used to consume external resources

Security

Here is where the token validation occurs

Core

Contains the business logic and domain entities.

Business

Business logic files.

UseCases

Business logic executed by the controllers

Repositories

Interface of the repositories used to consume external resources

Entities

Domain entities.

tests

Unit tests, they replicate the files structure of the rest of the application.

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.