DOCS LLMs

Your new admin tools

RailsFast ships with a few admin tools to help you manage your entire app and see key metrics. Of course, those are only accessible to admins, so the first thing we need to do is create you an admin user.

Create an admin user

First, just sign up to your own app as any other user would:

Signing up will send you an email to verify your account before you're able to do anything else:

  • If you're in development, emails don't actually get sent anywhere, so you need to use mailcatcher to see emails in development mode (run gem install mailcatcher, then run mailcatcher to launch the daemon, and then visit 127.0.0.1:1080 to see your "development inbox")
  • If you're in production and have correctly configured Amazon SES in the Configuration section, you should actually get the confirmation email in the address you signed up with

After confirming your email, launch a Rails console:

rails c

And in the Rails console, update your user grant it admin rights:

User.find_by_email("[email protected]").update!(admin: true)

That's it! You now have a user with admin rights. You may have to do this both in development and production, so you have an admin user in each environment.

Your admin superpowers

There are many things you can do as an admin. Let's give you a tour of your new superpowers.

Get an overview of your business

Visit /admin to see the general admin overview of your entire project:

MRR dashboard in RailsFast

See and moderate your users

From the admin sidebar, you can access different screens to see and moderate different models in your application. Visit /admin/dashboard/users to see a list of all your users. You can ban users, and admin / moderate any individual record. We leverage the madmin gem for this.

RailsFast admin panel with all tools needed to see a list of all your users and moderate them

See your MRR dashboard and business valuation

Visit /admin/profitable to view your current estimated business valuation, current MRR, and a few other SaaS metrics that will come in handy. We use the profitable gem for this, which draws from your pay data (in your own database, without having to make calls to Stripe)

MRR dashboard in RailsFast

Monitor background jobs and scheduled tasks (Cron)

Visit /admin/jobs to see the status of all async background jobs and scheduled jobs (cron-like)

You can see the status and logs of all executed jobs, whether succeeded or failed, you can pause, discard, or retry individual jobs and entire queues, and see when the next scheduled jobs will get triggered, and what happened when they last got triggered. We leverage the mission_control-jobs gem.

Background jobs and cron jobs monitoring in RailsFast