Giter Club home page Giter Club logo

metocean-challenge's Introduction

MetOcean Challenge

Preview   |    Tecnologies   |    Project   |    API Docummentation   |    How to deploy it with docker   |    License


Preview

You could see this project on the link MetOcean - Challlenge

Endpoint POST DATA Request Body

💻 Tecnologies

This project was developed with the following tecnologies:

🔖 Project

This project was developed with the objective of implementing an api to import data from a txt file and provide them to a frontend where it is possible to visualize and manipulate the data.

Project structure

Currently, the project was implemented following a MVC (Model View Controller) structure, the frontend is inserted within the context of laravel just to facilitate the deployment process for heroku, but it would be possible to remove the frontend from the context of laravel for more versatility.

Infrastructure

Currently the project is implemented in heroku in a dyno-free but the application is distributed over containers using the docker, where it is possible to have stability and proximity to similar environments for development and production.

Frontend

I used the frontend with Vuejs and D3js to render the visualization of the data obtained by the API and using Vuex to manage the app state, centralizing the information in the app state so that the components can benefit from it, reducing the requests for the api.

API

The API was developed using the REST API framework without JWT authentication. It has a resource with two methods that can be consumed.

API - Available resources

There is currently only one resource below that you can manipulate through the methods. GET, POST:

  • Data (data)

API - Data processing

All data sent and received by the API must be in JSON format (application/json).

API - Authentication

Currently none of the methods require authentication.

API - Endpoints

API BASE URL https://metocean-challenge.herokuapp.com/api

Endpoint: /data [POST]

This method allows you to insert or update data in the database, based on the .txt file sent in the body of your request.

  • Example request body

Endpoint POST DATA Request Body

  • Example response body

Endpoint POST DATA Response Body

Endpoint: /data [GET]

This method returns data from the database in which it is also possible to filter the data by entering some parameters via query strings.

Example request Endpoint GET DATA Request Body

Example response body Endpoint GET DATA Response Body

🤔 How to deploy it with docker

  • Install docker
  • Open your terminal and go to the project path
  • Run the command docker-compose up -d
  • Create your database inside the container docker-compose exec mysql bash
  • Create a new file .env with your variables;
  • Install dependencies by running the command docker-compose exec app composer install
  • Run the database migrations by using the command docker-compose exec app php artisan migrate
  • Access your project using the url http//localhost:8081

📝 License

This project is under MIT license. See the LICENSE for more details.

metocean-challenge's People

Watchers

 avatar

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.