Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

realstorypro/macron-1

Repository files navigation

MACRON-1

codecov

Local Development

Setting Up Database

You can import the database from an existing Heroku application with pg:pull command.

heroku pg:pull heroku_db_name aquarius_development --app heroku_app_name
foreman run rake components:setup

Setting up Hypershield

Locally

On Heroku

Setting Environment Variables

The environmental variables are stored in a .env file. They can be pulled down from an existing Heroku app.

heroku config -s -a heroku_app_name > .env

Setting up Mailcatcher

We're using the mailcatcher to catch the mail send in development environment.

Install the gem by running

  gem install mailcatcher

Start the mail catcher server with

  mailcatcher

You can read sent mail by at http://127.0.0.1:1080/

Running It

./bin/webpack-dev-server
foreman run sidekiq -C config/sidekiq.yml --verbose
foreman run rails s

Pull Requests

All changes must come in ways of pull requests and never committed directly to master.

The must be precompiled locally prior to submitting a PR. This can be done by running the following command.

rm -rf public/packs; foreman run rake assets:precompile; git add .; gcam 'precompiled assets'

Framework

Authentication

The authentication is driven by the auth.yml file located under core/auth.yml and is structured as follows

roles:
abilities:
actions:
permissions:
    - role:
        - ability

Site Settings

Every implementation of the platform can have its own settings stored in the database. We refer to them as "Site Settings".

Modules

The Site Setting modules are configured under /core/site_settings.yml

site_settings_theme_branding:
    klass: 'SiteSettings::Theme::Branding'
    path: 'admin_settings_theme_branding'
    enabled: true

The site settings are stored under SiteSettings namespace and include the Autoloadable module.

## Article Settings

module SiteSettings::Theme
  class Article < Setting
    include Autoloadable
  end
end

Menus

In order for the modules to be viewable on the backend they must be enabled in the settings under core/menus/site_settings

menu:
  settings:
    - section:
      - name: General
        hint: Set name, description, and url
        path: admin_settings_general
        icon: setting
        enabled: true

Components

All components are defined under components.yml

Areas

There are 3 areas in the application, which are defined under under /app/models/areas/.

  • Header
  • Content
  • Footer

Every component can have those areas enabled. By default none are enabled.

  discussions:
    klass: 'Discussion'
    path: 'discussions'
    enabled: true
    areas:
      - content

Elements

  • Elements are defined in components.yml (change that )
  • The Menu Elements are also defined in menu/elements.yml (maybe change that)

Helpful Documents

Documentation that may be useful to developers.

Testing
Security
Deployment