https://github.com/vic778/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
https://github.com/vic778/rails-api
devise rswag ruby ruby-on-rails uuid-generator
Last synced: 2 days ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/vic778/rails-api
- Owner: vic778
- Created: 2022-10-11T07:12:55.000Z (over 3 years ago)
- Default Branch: develop
- Last Pushed: 2022-10-11T07:14:28.000Z (over 3 years ago)
- Last Synced: 2025-01-18T16:02:08.563Z (over 1 year ago)
- Topics: devise, rswag, ruby, ruby-on-rails, uuid-generator
- Language: Ruby
- Homepage:
- Size: 130 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

[](https://github.com/rubocop/rubocop)


[](docs/SWAGGER.md)
# Rails API Boilerplate

# How to Works?
```mermaid
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
```
# Documentations
- [Swagger](docs/SWAGGER.md)
- [Service generator](docs/SERVICE.md)
- [Contract generator](docs/CONTRACT.md)
- [Search & Filter & Sort](docs/RANSACK.md)
# Installation
## Prerequisites
- [Ruby](https://rvm.io/)
- [PostgreSQL](https://www.postgresql.org/)
- [Redis](https://redis.io/)
## Installation
- Install GEM dependencies:
```bash
bundle install
```
- Create database, migrate tables and run the seed data:
```bash
rails db:create
rails db:migrate
rails db:seed
```
- If you are setting up again, when you already have previous databases:
```bash
rails db:reset
```
`reset` is equivalent of `rails db:drop & rails db:setup`.
- Run the server
```bash
./bin/dev
```