Giter Site home page Giter Site logo

hexa's Introduction

Maintainability Test Coverage

What is Hexa?

Hexa can be considered a light way Framework.

It is optimized for the appliance of best practices (BDD, TDD, Design, easier to refactor).
Well, actually all depends on you but at least it doesn't limit you (you know, usually your logic depends on the framework when should be the opposite).
I encourage you to see this keynote which was the starting motivation of Hexa

Embrace separation of concerns
Its primary design mission is to keep side-effects, business-logic, and presentation-logic separated from each other.

It is Use-Case centered
A use-case is defined as a set of actions reflecting user-intentions coming from the browser to the system.

In order to allow features scalability without making your code a mess. This "framework" divides the whole application into smaller applications. Each of these smaller applications represents just one use case.

Folders-DSS

These small applications follow a hexagonal architecture
So each use-case has its own API - BusinessLogic - DBAccess within a small scope that you can easily navigate.

The fact that is use-case centered suggests that you can take advantage of documenting your DSS I know, maintaining that is a pain in the ass, but working on a big project with many other devs is the high-level picture that you would wish to have.

Starting up the application

Starts a web server connected to a database

$> docker-compose up --build

IRB console

Loads gems, files under /lib

$>  ./bin/console

Database Console

$> ./bin/db/console

Sequel Console

$> ./bin/sequel_console

Create/Destroy Database

$> ./bin/db/create
$> ./bin/db/drop

Environment Variable

RACK_ENV sets the current environment .env variables are loaded into ENV Check .env.template

Migrations

Running Migrations

$> bin/db/migrate
START Running Migrations ...
...
FINISH Running Migrations ...

If you want to rollback you need to specify the version to which you want to rollback

$> ./bin/db/rollback 20201011091343

Dumping Schema

$> ./bin/db/dump
$> cat db/schema.rb

Running tests

Tests recreate a sqlite in memory db when running them.

$> bundle exec rspec

Load Seed Data

$> ./bin/db/seed

List Tables

$> ./bin/db/tables

Deploying to Heroku

Requires environment variable APP_ROOT='/app' in heorku.

$> git push heroku master

Docker

Running docker

$> docker compose up --build

Login to docker

$> docker exec -it hexa_rack bash -l

hexa's People

Contributors

delbetu avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.