All Projects → rootstrap → Rails_api_base

rootstrap / Rails_api_base

Licence: mit
API boilerplate project for Ruby On Rails 6

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Rails api base

Laravel Api Boilerplate
A Boilerplate Project For Laravel API's (NOT MAINTAINED)
Stars: ✭ 113 (-34.3%)
Mutual labels:  api, hacktoberfest, boilerplate
Laravel Api Boilerplate
Laravel API Boilerplate | Please consult the Wiki !
Stars: ✭ 300 (+74.42%)
Mutual labels:  api, hacktoberfest, boilerplate
Saas Boilerplate
SaaS boilerplate built in Laravel, Bootstrap 4 and VueJs.
Stars: ✭ 152 (-11.63%)
Mutual labels:  api, boilerplate
Express Mongodb Rest Api Boilerplate
A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose).
Stars: ✭ 153 (-11.05%)
Mutual labels:  api, boilerplate
Blinkpy
A Python library for the Blink Camera system
Stars: ✭ 174 (+1.16%)
Mutual labels:  api, hacktoberfest
Bandcamp Scraper
A scraper for https://bandcamp.com
Stars: ✭ 137 (-20.35%)
Mutual labels:  api, hacktoberfest
Smoke
💨 Simple yet powerful file-based mock server with recording abilities
Stars: ✭ 142 (-17.44%)
Mutual labels:  api, hacktoberfest
Brain.js
brain.js is a GPU accelerated library for Neural Networks written in JavaScript.
Stars: ✭ 12,358 (+7084.88%)
Mutual labels:  api, hacktoberfest
Django Init
Project template used at Fueled for scaffolding new Django based projects. 💫
Stars: ✭ 126 (-26.74%)
Mutual labels:  hacktoberfest, boilerplate
Express Graphql Typescript Boilerplate
A starter kit for building amazing GraphQL API's with TypeScript and express by @w3tecch
Stars: ✭ 163 (-5.23%)
Mutual labels:  api, boilerplate
Api guard
JWT authentication solution for Rails APIs
Stars: ✭ 159 (-7.56%)
Mutual labels:  api, ruby-on-rails
Terrastories
Terrastories is a geostorytelling application built to enable local communities to locate and map their own oral storytelling traditions about places of significant meaning or value to them. Check out our Wiki for open source development information.
Stars: ✭ 158 (-8.14%)
Mutual labels:  hacktoberfest, ruby-on-rails
Mailcare
[MIRRORING REPOSITORY] See https://gitlab.com/mailcare/mailcare. MailCare is an open source disposable email address services. Accessible via web browser or API to protect your privacy right now.
Stars: ✭ 136 (-20.93%)
Mutual labels:  api, hacktoberfest
Subzero Starter Kit
Starter Kit and tooling for authoring GraphQL/REST API backends with subZero
Stars: ✭ 136 (-20.93%)
Mutual labels:  api, boilerplate
Core
The server component of API Platform: hypermedia and GraphQL APIs in minutes
Stars: ✭ 2,004 (+1065.12%)
Mutual labels:  api, hacktoberfest
React Next Boilerplate
🚀 A basis for reducing the configuration of your projects with nextJS, best development practices and popular libraries in the developer community.
Stars: ✭ 129 (-25%)
Mutual labels:  hacktoberfest, boilerplate
Nodejs Website Boilerplate
A Node.js website boilerplate that satisfies some common website requirements.
Stars: ✭ 154 (-10.47%)
Mutual labels:  api, boilerplate
Whatsapp Web.js
A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
Stars: ✭ 4,103 (+2285.47%)
Mutual labels:  api, hacktoberfest
Colore
A powerful C# library for Razer Chroma's SDK
Stars: ✭ 121 (-29.65%)
Mutual labels:  api, hacktoberfest
Laravel Hackathon Starter
💻 A hackathon/MVP boilerplate for laravel web applications. Start your hackathons without hassle.
Stars: ✭ 1,589 (+823.84%)
Mutual labels:  api, boilerplate

Rails API Template

CircleCI Code Climate Test Coverage

Rails Api Base is a boilerplate project for JSON RESTful APIs. It follows the community best practices in terms of standards, security and maintainability, integrating a variety of testing and code quality tools. It's based on Rails 6 and Ruby 2.7.

Finally, it contains a plug an play Administration console (thanks to ActiveAdmin).

Features

This template comes with:

  • Schema
    • Users table
    • Admin users table
  • Endpoints
    • Sign up with user credentials
    • Sign in with user credentials
    • Sign out
    • Reset password
    • Get and update user profile
  • Administration panel for users
  • Rspec tests
  • Code quality tools
  • API documentation following https://apiblueprint.org/
  • Docker support
  • Exception Tracking
  • RSpec API Doc Generator

How to use

  1. Clone this repo
  2. Install PostgreSQL in case you don't have it
  3. Run bootstrap.sh with the name of your your project like ./bootstrap.sh my_awesome_project
  4. rspec and make sure all tests pass
  5. rails s
  6. You can now try your REST services!

How to use with docker

  1. Have docker and docker-compose installed (You can check this by doing docker -v and docker-compose -v)
  2. Modify the following lines in the database.yml file:
default: &default
  adapter: postgresql
  encoding: unicode
  pool: 5
  username: postgres
  password: postgres
  host: db
  port: 5432
  1. Generate a secret key for the app by running docker-compose run --rm --entrypoint="" web rake secret, copy it and add it in your environment variables.
  2. Run docker-compose run --rm --entrypoint="" web rails db:create db:migrate.
    1. (Optional) Seed the database with an AdminUser for use with ActiveAdmin by running docker-compose run --rm --entrypoint="" web rails db:seed. The credentials for this user are: email: [email protected] ; password: password.
  3. (Optional) If you want to deny access to the database from outside of the docker-compose network, remove the ports key in the docker-compose.yml from the db service.
  4. (Optional) Run the tests to make sure everything is working with: docker-compose run --rm --entrypoint="" web rspec ..
  5. Run the application with docker-compose up.
  6. You can now try your REST services!

Gems

Optional configuration

  • Set your frontend URL in config/initializers/rack_cors.rb
  • Set your mail sender in config/initializers/devise.rb
  • Config your timezone accordingly in application.rb.

Api Docs

https://railsapibasers.docs.apiary.io/

With Rspec API Doc Generator you can generate the docs after writing the acceptance specs.

Just run:

./bin/docs

An apiary.apib file will be generated at the root directory of the project.

Code quality

With rake code_analysis you can run the code analysis tool, you can omit rules with:

  • Rubocop Edit .rubocop.yml
  • Reek Edit config.reek
  • Rails Best Practices Edit config/rails_best_practices.yml
  • Brakeman Run brakeman -I to generate config/brakeman.ignore
  • Bullet You can add exceptions to a bullet initializer or in the controller

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 circle-ci project env variables

Code Owners

You can use CODEOWNERS file to define individuals or teams that are responsible for code in the repository.

Code owners are automatically requested for review when someone opens a pull request that modifies code that they own.

Credits

Rails Api Base is maintained by Rootstrap with the help of our contributors.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].