Preview | Tecnologies | Project | API Docummentation | How to deploy it with docker | License
You could see this project on the link MetOcean - Challlenge
This project was developed with the following tecnologies:
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.
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.
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.
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.
The API was developed using the REST API framework without JWT authentication. It has a resource with two methods that can be consumed.
There is currently only one resource below that you can manipulate through the methods. GET, POST:
- Data (data)
All data sent and received by the API must be in JSON format (application/json).
Currently none of the methods require authentication.
API BASE URL https://metocean-challenge.herokuapp.com/api
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
- Example response body
This method returns data from the database in which it is also possible to filter the data by entering some parameters via query strings.
- 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
This project is under MIT license. See the LICENSE for more details.