This is a minimal setup of a Rails 7.1 API application with authentication. I created this to be able to clone it whenever I'm starting a new project without having to recreate everything from scratch.
Made with :
- Rails 7.1.3
- Ruby 3.1.2
- Devise
As for the authentication, I'm using devise-jwt and a short-lived tokens revocation strategy.
Inspired by this awesome tutorial.
git clone
this repobundle install
- create a new
master.key
by runningrails credentials:edit
rails db:create db:migrate
I'm using Bruno which is an incredible alternative to Postman. Just edit the bruno/bruno.json
file and open the bruno folder in the dedicated application.
You can then run the different requests in the app, don't forget to launch your server with rails s
๐