Giter Site home page Giter Site logo

adonis's Introduction

Promart Challenge

Promart challenge, developed in AdonisJS as part of personal learning.

Description project

This project is a challenge for Promart, it is developed in AdonisJS, it is a REST API that allows you to manage clients and reports of KPIs. Both have microservices that allow you to manage the data of each one.

  • The client microservice allows you to manage the data of the clients, such as:
    • name
    • surname (paternal surname)
    • mothers_surname (maternal surname)
    • birthdate.
  • The data analysis microservice allows you to manage the data of the KPIs, such as:
    • average_age (average age)
    • age_std_deviation (standard deviation of the age)

Technologies used

  • AdonisJS
  • NodeJS
  • MySQL
  • Docker
  • Docker Compose
  • Git
  • GitHub
  • Postman

Installation

  • Clone the repository
# SSH
git clone [email protected]:migerick/adonis.git

# HTTPS
git clone https://github.com/migerick/adonis.git
  • Install dependencies
cd clients
npm install

cd dataanalysis
npm install
  • Create the .env file

Each microservice has its own .env file, you must copy the .env.example file and rename it to .env

cp .env.example .env

Docker

  • Run the container

In clients microservice, you must create the database and run the migrations and seeds.

Docker: Init database for then run migrations.

docker-compose up

Usage

In clients microservice, you must create the database and run the migrations and seeds.

  • Run migrations
node ace migration:run
  • Run seeds
node ace db:seed
  • Run the project

In each microservice run the following command:

cd clients
node ace serve --watch

cd dataanalysis
node ace serve --watch

Routes

Client routes

Method Route Description
GET /clients Get all clients
GET /clients/?page=1 Get all clients with pagination
GET /clients/:id Get a client by id
POST /clients Create a client
PUT /clients/:id Update a client by id
DELETE /clients/:id Delete a client by id

Data analysis routes

Method Route Description
GET /data-analysis Get all data analysis

API Documentation

License

MIT

Author

adonis's People

Contributors

migerick avatar

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.