File Structure

Metronic Rails comes with a flexible file structure that can be easily used for small to large scope projects. This section will explain the entire file structure and how to adapt it to your project.
File/Folder Description
starterkit The root folder that contains Metronic Rails folder.
_keenthemes This is a Core folder for Keenthemes products.
src The source folder which located the raw version of HTML templates. The assets will be used for assets bundling.
tools The build tools for assets.
app It organizes your application components. It's got subdirectories that hold the view (views and helpers), controller (controllers), and the backend business logic (models).
assets This folder contains static files required for application's front-end grouped into folders based on their type.
channels A channel encapsulates a logical unit of work, similar to what a controller does in a typical MVC setup.
controllers All the controller files are stored here. A controller handles all the web requests from the user.
helpers It contains all the helper functions to assist MVC.
jobs
mailers It contains mail specific functions for the application.
models It contains the models and data stored in our application's database.
config This directory contains the small amount of configuration code that your application will need, including your database configuration (in database.yml), your Rails environment structure (environment.rb), and routing of incoming web requests (routes.rb). You can also tailor the behavior of the three Rails environments for test, development, and deployment with files found in the environments directory.
db Usually, your Rails application will have model objects that access relational database tables. You can manage the relational database with scripts you create and place in this directory.
lib You'll put libraries here, unless they explicitly belong elsewhere (such as vendor libraries).
assets An asset is typically a static file such as JS files, image files, CSS files. A bundle is when those files are then compressed together into a single file. Metronic assets files are located in this folder.
log Error logs go here. Rails creates scripts that help you manage various error logs. You'll find separate logs for the server (server.log) and each Rails environment (development.log, test.log, and production.log).
public Like the public directory for a web server, this directory has web files that don't change, such as JavaScript files (public/javascripts), graphics (public/images), stylesheets (public/stylesheets), and HTML files (public).
test The tests you write and those that Rails creates for you, all goes here. You'll see a subdirectory for mocks (mocks), unit tests (unit), fixtures (fixtures), and functional tests (functional).
tmp Rails uses this directory to hold temporary files for intermediate processing.
vendor Libraries provided by third-party vendors (such as security libraries or database utilities beyond the basic Rails distribution) go here.
.gitattributes A gitattributes file is a simple text file that gives attributes to pathnames.
.gitignore A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected
config.ru Rack configuration for Rack based servers used to start the application.
Gemfile Here all your app's gem dependencies are declared. It is mandatory as it includes Rails core gems among other gems.
Gemfile.lock It holds gems dependency tree including all versions for the app.
Rakefile It locates and loads tasks that can be run from the command line.
.gitignore A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected
documentation.html The documentation file.
README.md README file as a quick guide that gives a detailed description
Preview Get Help Buy Now