middleman-komponent aims at implementing an opinionated way of organizing front-end code in Middleman, based on components, similar to what Komponent offers in Rails.
Follow Middleman documentation to Start a New Site.
Then, add middleman-komponent to your Gemfile:
# Gemfile
gem "middleman-komponent"
Activate the extension in your config:
# config.rb
activate :komponent