Course Martini is based on Ruby on Rails. Before running our codes on localhost, you have to set the environment first. About how to set the environment, please refer to this tutorial
As the framework of ruby on rails is relatively rare, this section will introduce the structure of the framework to provide a better understanding to our codes.
Devise is a huge user managing module that is used on rails. It creates a huge MVC structure for user, many parts in our code related to users are generated by this module. Click here to know more about devise
The controllers are placed at:
/app/controllers
Only the users folder is generated by the devise module
The models are placed at:
/app/models
The model part is for seting up validations(e.g. length) for data creation, and implementing functions for data manipulation.
The views are placed at:
/app/views
All of our views are implemented based on bootstrap to serve users with differen screen sizes.
The stylesheets are placed at:
/app/assets/stylesheets
The file format is "scss" rather than "css" in rails. The stylesheets are all shared among pages regardless of name, it is seperated to different files for different priority in different views.
The javascripts are placed at:
/app/assets/javascript/packs
Ruby on rails is not a pure js based framework in terms of coding. The application.js in this directory links to all required js files (e.g. jquery, bootstrap's js) that are hidden in the rails framework.
The route file is placed at:
/config/routes.rb
This file controls the response towards html requests for routing
The database related files are placed at:
/db
Our project uses sqlite as our database. The table and columns are defined in the file schema.rb in the above directory. Creating and manipulating tables are through options using terminal commands, and changes will be shown under the folder:
/db/migrate
The database data is stored at
/db/development.sqlite3
Gemfiles are ruby packages that helps development of website. The list of used gems are listed in (It is a file, not folder):
/Gemfile
Packages such as bootstrap, jquery are all listed inside, and a bundler will help install the package to our software.






