Skip to content

AlyBadawy/Securial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

109 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Securial Gem

Gem Version Downloads Tests Coveralls

License Documentation Wiki


Overview

πŸ›‘οΈ What is Securial?

Securial Logo

Securial is a mountable Rails engine that provides robust, extensible authentication and access control for Rails applications. It supports:

  • πŸ”‘ JWT-based authentication
  • β†ͺ️ API session tokens, with refresh tokens
  • 🀳 Simple integration with web and mobile apps
  • 🧹 Clean, JSON-based API responses
  • 🧍 User management with roles
  • πŸ«™ Database-agnostic support

πŸ‘€ Why Securial?

Securial was built to offer a clean, modular, and API-first authentication system for Rails developers who want full control without the black-box complexity. Whether you're building for the web, mobile, or both, Securial gives you the flexibility to implement exactly what you need β€” from simple JWT authentication to more advanced setups involving sessions, API tokens, and role-based access.

It follows familiar Rails conventions, stays lightweight and database-agnostic, and keeps security at the core. With fully customizable controllers, serializers, and logic, Securial is designed to grow with your project β€” making it an ideal choice for everything from side projects to production-grade APIs.

πŸš€ Installation

Securial can be installed on an existing Rails application or use the securial new app_name command to create a new Securial-ready Rails app.

Installation on an existing Rails app:

Add Securial to an existing Rails app is as simple as 1..2..3:

  • Add gem "securial" to your GemFile

  • Run bundle install

  • Run rails generate securial:install

  • Mount the Securial engine in your Rails application config/routes.rb file:

    Rails.application.routes.draw do
      mount Securial::Engine => "/securial"
    
      # The rest of your routes
    end
  • Run the migrations by running the command: rails db:migrate

πŸ’‘ Full installation steps are available in the Wiki β€Ί Installation.

βš™οΈ Configuration

Securial generates an initializer with sensible defaults and full control over logging, mailers, session settings, and roles.

For all configuration options and examples, refer to the Wiki β€Ί Configuration

πŸ“¦ Usage

After installation and mounting, Securial exposes endpoints like:

  • GET /securial/status β€” Check service availability
  • POST /securial/sessions β€” Sign in (JWT or session)
  • DELETE /securial/sessions β€” Sign out
  • GET /securial/accounts/cool_username β€” Get a user profile by username
  • GET /securial/admins/roles β€” View roles

Securial returns consistent JSON API responses.

Full details, including authentication flows and protected routes, are available in the Wiki β€Ί Authentication module docs.

🧩 Modules

Securial is organized into modular components including:

  • Authentication
  • User Management
  • Generators
  • Identity concern
  • Configuration

Explore all modules in the Wiki.

πŸ›  Development & Testing

  • Clone the repo on your computer
  • Run bundle install
  • Start coding right away πŸƒβ€β™‚οΈ

To run the test suite:

$ bin/test

View the coverage report:

$ open coverage/index.html

🀝 Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/alybadawy/securial.

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-feature)
  3. Commit your changes (git commit -am 'Add my feature')
  4. Push to the branch (git push origin my-feature)
  5. Open a Pull Request

βš–οΈ License

The gem is available as open source under the terms of the MIT license.


logo-e9f16c9b 1

About

Securial is a mountable Rails engine that provides robust, extensible authentication and access control for Rails applications. It supports JWT, API tokens, session-based auth, and is designed for easy integration with modern web and mobile apps.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Contributors

Languages