Thanks to visit codestin.com
Credit goes to github.com

Skip to content

floresv/rails-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Rails PoC - FoodAPI

This API provides a comprehensive interface for managing food-related data, including meal categories, individual meals, orders and payments. It serves as a backend system for applications requiring structured food information management and order processing. Built with Ruby on Rails, this API implements RESTful principles and includes thorough documentation of all endpoints.

Features

Key features:

  • RESTful API endpoints for managing meals and categories
  • Order creation and payment processing
  • Wishlist management endpoints for saving favorite items
  • Admin interface for managing all resources
  • User authentication and authorization
  • Pagination and filtering support
  • Comprehensive error handling
  • API documentation

API_URL=https://rails-poc-k1uu.onrender.com/api/v1

Admin API docs: https://rails-poc-k1uu.onrender.com/api-docs username: apifood password: password

ActiveAdmin: https://rails-poc-k1uu.onrender.com/admin username: [email protected] password: password

How to use with Docker

To run this API locally with Docker Compose:

  1. Clone the repository
  2. Copy the .env.example file to .env and configure environment variables:
    cp .env.example .env
  3. Build the Docker images:
    docker-compose build
  4. Start the services:
    docker-compose up
  5. Create and setup the database:
    docker-compose exec web rails db:create db:migrate
  6. Optionally seed the database with sample data:
    docker-compose exec web rails db:seed

The API will be available at http://localhost:3000

See Docker docs for more info

Dev scripts

This template provides a handful of scripts to make your dev experience better!

  • bin/bundle to run any bundle commands.
    • bin/bundle install
  • bin/rails to run any rails commands
    • bin/rails console
  • bin/web to run any bash commands
    • bin/web ls
  • bin/rspec to run specs
    • bin/rspec .
  • bin/dev to run both Rails and JS build processes at the same time in a single terminal tab.
    • bin/dev

You don't have to use these but they are designed to run the same when running with Docker or not. To illustrate, bin/rails console will run the console in the docker container when running with docker and locally when not.

Gems

API Docs

See API documentation docs for more info

Code quality

With bundle exec rails code:analysis you can run the code analysis tool, you can omit rules with:

Monitoring

In order to use New Relic to monitor your application requests and metrics, you must setup NEW_RELIC_API_KEY and NEW_RELIC_APP_NAME environment variables. To obtain an API key you must create an account in the platform.

Configuring Code Climate

  1. After adding the project to CC, go to Repo Settings
  2. On the Test Coverage tab, copy the Test Reporter ID
  3. Set the current value of CC_TEST_REPORTER_ID in the GitHub secrets and variables

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published