Skip to content

Sartori-RIA/ubuteco_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uButeco

Build Status Maintainability Test Coverage Rails Style Guide Paypal Bitcoin Pix GitHub GitHub all releases GitHub Repo stars

Requirements

  • Frontend

  • Swagger Docs

  • With Docker

    • Docker
    • Docker compose
  • Without Docker

    • Postgres
    • Rails 7.1.x
    • Ruby 3.2.2

Quick Start

  1. cp config/application.yml.example config/application.yml -> create environment file
  2. docker-compose up -d -> start docker environment
  3. docker exec -it ubuteco_api /bin/bash -> enter in docker container
  4. rails db:setup -> create tables and database updates
  5. rails db:migrate -> create tables and database updates
  6. rails db:seed -> populate database with real data
  7. rails db:populate -> populate database with fake data
  8. rspec -> run all tests
  9. bundle exec rails parallel:setup -> setup the db for parallel specs
  10. bundle exec rails parallel:spec -> run all specs in parallel
  11. rails s -b 0.0.0.0 -> start server

Swagger

  • http://localhost:3000/api-docs

REST and WebSocket Connection

  • ws://localhost:3000/api/cable -> websocket
  • http://localhost:3000/api/v1 -> api endpoint
  • http://localhost:3000/auth -> api auth endpoint

WebSockets Channels

  • Channels:

    • KitchenChannel
  • Broadcasts:

    • "kitchens_#{organization_id}"

Default users in db:populate

Contributing

  • Fork it
  • Write your changes
  • Commit
  • Send a pull request

Supporters

https://jb.gg/OpenSource