Skip to content

Ruby on Rails (RoR) application using the --api flag with Graphql

License

Notifications You must be signed in to change notification settings

Grigore-George-Mihai/graphql_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graphql Template

This repository serves as a default template for a Ruby on Rails (RoR) application using the --api flag with the Graphql gem. It includes a pre-configured setup with essential gems and tools to streamline API development.

Table of Contents

Installation

  1. Clone:
git clone https://github.com/Grigore-George-Mihai/graphql_template

Customize

  • Update the project name to reflect your application.
  • Modify or remove the settings for Scout APM and Rollbar as needed, based on your performance, error tracking, and database monitoring requirements.
  • Run the following rake task to create your environment files:
    rake env:setup
    • After running the task, open the newly created .env.development and .env.test files to modify them with the appropriate environment-specific variables as needed.
  • Create DB and seed:
    rails db:create db:migrate db:seed

Gems

API Framework

  • GraphQL: GraphQL implementation for Ruby, providing query execution and schema building tools.

Pagination

  • Pagy: A fast, efficient, and lightweight pagination gem for Rails, providing easy customization and flexibility with minimal overhead.

Background Processing

  • Sidekiq: Efficient background processing for Ruby applications.
  • Sidekiq-Scheduler: Extends Sidekiq to support scheduled and recurring jobs using a simple configuration.
  • Redis: In-memory data structure store used by Sidekiq for managing background job queues, scheduling, and retries.

Performance Monitoring

  • Scout APM: Application monitoring tool.
  • Bullet: Detects N+1 queries and unused eager loading.

Error Tracking

  • Rollbar: Real-time error tracking and reporting.

Debugging

  • Byebug: Debugging tool for Ruby applications.

Code Quality & Linting

  • Rubocop Rails Suite: A custom suite that bundles Rubocop with various plugins for Rails projects.

Testing

Security

  • Brakeman: Static analysis tool for finding security vulnerabilities in Rails applications.
  • Bundler Audit: Scans your Gemfile for known vulnerabilities.

Environment Management

Rake Tasks

Security Check

  • Run the following rake task to check for security risks in your application:

    rake security:check
    • This task runs tools like Brakeman and Bundler Audit to ensure your application is secure.

Docker Setup

  • If you prefer to run the application inside a Docker container, follow these steps:
  1. Build the Docker image:

    docker-compose build
  2. Start the Application and services:

    docker-compose up
  3. Stop the Application:

    docker-compose down
  4. Remove named Volumes:

    docker-compose down --volumes

Contact

For questions or further information, feel free to reach out via LinkedIn.

About

Ruby on Rails (RoR) application using the --api flag with Graphql

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published