Skip to content

Latest commit

 

History

History
executable file
·
80 lines (44 loc) · 1.78 KB

README.md

File metadata and controls

executable file
·
80 lines (44 loc) · 1.78 KB

SOL API

In order for associations and cooperatives to carry out bids for the acquisition of goods, services and works related to their projects, the Governments of the State of Bahia and Rio Grande do Norte developed and made available the SOL purchasing application (Online Bidding Solution).


This repository contains all the API necessary for other applications:

  • sol-admin-frontend;
  • sol-cooperative-frontend;
  • sol-supplier-frontend.

Fast Setup with Docker

use the docker compose inside de folder dockerfastdeploy

Initial setting

The setup executable should do all the necessary work, so just run:

  bin/setup

After the initial configuration of the application, we must run the main task to configure the data (setup:load).

Note: Don't forget to set the uid and secret values ​​generated by the command above in the application that will consult the API.

Access authorization

Authorization of access to the API by the front-end application and the user is carried out using the gem doorkeeper. Then just run:

  bundle exec rake oauth:applications:load

To check the credentials it is necessary to enter the application console, then run the command:

  bundle exec rails c

Finally, list all created credentials, such as command:

  Doorkeeper::Application.all

Starting the server

The system has a Procfile and all its processes can be started by a process manager such as Foreman, simply execute:

 bundle exec foreman start

Tests

The project has the Guard gem that allows you to run tests automatically when editing a test/file, to do this simply run:

 guard

Pre polulate

Need database to be prepopulated with the follwed data:

  • City and states (automatic, rails task)
  • Roles