/Rails-api

schematize the request that a user sends to the server to receive a response. customize the app so that rswager is the main controller so that it responds in all environments

Primary LanguageRuby

build & test & quality Ruby Style Guide Ruby Version Rails Version Swagger documentation

Rails API Boilerplate

cover

How to Works?

flowchart TD
  R[Request] --> C[Application Controller]
  C --> O[Application Operation]
  O -- Validate Params --> AC[Application Contract]
  O -- Application Contract returned success?--> S[Application Service]
  AC -- Validation success? --> O[Application Operation]
  AC -- Validation failed? --> E[Contract Errors]
  E --> RE
  S -- Process successful? --> RS[Resource]
  S -- Process failed? --> OE[Resource Errors]
  OE --> RE[Response]
  RS --> RE
  RE -- Returns --> C
Loading

Documentations

Installation

Prerequisites

Installation

  • Install GEM dependencies:

    bundle install
  • Create database, migrate tables and run the seed data:

    rails db:create
    rails db:migrate
    rails db:seed
  • If you are setting up again, when you already have previous databases:

    rails db:reset

    reset is equivalent of rails db:drop & rails db:setup.

  • Run the server

    ./bin/dev