Convert Figma logo to code with AI

locomotivecms logoengine

A platform to create, publish and edit sites

2,313
625
2,313
92

Top Related Projects

ComfortableMexicanSofa is a powerful Ruby on Rails 5.2+ CMS (Content Management System) Engine

12,911

An open source eCommerce platform giving you full control and customizability. Modular and API-first. Build any eCommerce solution that your business requires. Developed by @vendo-dev

1,685

Radiant is a no-fluff, open source content management system designed for small teams.

A Rails engine that helps you put together a super-flexible admin dashboard.

The administration framework for Ruby on Rails applications.

Quick Overview

LocomotiveCMS Engine is an open-source content management system (CMS) built on Ruby on Rails. It provides a flexible and powerful platform for creating and managing websites, with a focus on developer-friendly features and a clean, intuitive interface for content editors.

Pros

  • Flexible and customizable, allowing developers to create unique website structures
  • Built-in multi-site and multi-language support
  • Content types and custom fields for structured content management
  • API-first approach, enabling headless CMS functionality

Cons

  • Steeper learning curve compared to some other CMS options
  • Smaller community and ecosystem compared to more popular CMS platforms
  • Limited themes and plugins available out-of-the-box
  • Requires Ruby on Rails knowledge for advanced customization

Code Examples

  1. Defining a content type:
# app/models/article.rb
class Article
  include Locomotive::ContentType

  field :title, type: :string
  field :content, type: :text
  field :published_at, type: :date
end
  1. Creating a custom Liquid tag:
# app/models/locomotive/liquid/tags/my_custom_tag.rb
module Locomotive
  module Liquid
    module Tags
      class MyCustomTag < ::Liquid::Tag
        def render(context)
          "Hello from my custom tag!"
        end
      end

      ::Liquid::Template.register_tag('my_custom_tag', MyCustomTag)
    end
  end
end
  1. Using the LocomotiveCMS API:
require 'locomotive/coal'

client = Locomotive::Coal::Client.new('https://mysite.com', email: 'admin@example.com', api_key: 'your-api-key')

# Fetch all pages
pages = client.pages.all

# Create a new content entry
client.content_entries('articles').create(title: 'New Article', content: 'Lorem ipsum...')

Getting Started

  1. Install LocomotiveCMS Engine:
gem install locomotivecms_engine
  1. Create a new Rails application with LocomotiveCMS:
rails new my_cms_site
cd my_cms_site
  1. Add LocomotiveCMS to your Gemfile:
gem 'locomotivecms', '~> 4.0'
  1. Run the LocomotiveCMS installation generator:
bundle install
rails generate locomotive:install
  1. Set up the database and start the server:
rails db:create db:migrate
rails server

Visit http://localhost:3000 to access your new LocomotiveCMS site.

Competitor Comparisons

ComfortableMexicanSofa is a powerful Ruby on Rails 5.2+ CMS (Content Management System) Engine

Pros of Comfortable Mexican Sofa

  • Simpler setup and configuration process
  • More intuitive user interface for content management
  • Better documentation and community support

Cons of Comfortable Mexican Sofa

  • Less flexibility in terms of customization options
  • Limited multilingual support compared to Engine
  • Fewer built-in features for complex site structures

Code Comparison

Engine:

Locomotive::Site.create!(
  name: 'My Website',
  subdomain: 'my-website',
  domains: ['www.my-website.com']
)

Comfortable Mexican Sofa:

Comfy::Cms::Site.create!(
  label: 'My Website',
  identifier: 'my-website',
  hostname: 'www.my-website.com'
)

Both Engine and Comfortable Mexican Sofa are Ruby on Rails-based content management systems. Engine focuses on providing a flexible and powerful platform for building custom websites, while Comfortable Mexican Sofa aims for simplicity and ease of use.

Engine offers more advanced features for multilingual sites and complex content structures, making it suitable for larger, more complex projects. Comfortable Mexican Sofa, on the other hand, excels in its user-friendly interface and straightforward setup process, making it ideal for smaller to medium-sized websites or projects with simpler content management needs.

The code comparison shows similarities in site creation, with Engine using slightly different terminology (e.g., "subdomain" vs. "identifier"). Both systems integrate well with Ruby on Rails applications, allowing developers to extend functionality as needed.

12,911

An open source eCommerce platform giving you full control and customizability. Modular and API-first. Build any eCommerce solution that your business requires. Developed by @vendo-dev

Pros of Spree

  • More comprehensive e-commerce solution with features like inventory management, order processing, and payment gateway integrations
  • Larger and more active community, resulting in more frequent updates and third-party extensions
  • Better documentation and resources for developers

Cons of Spree

  • Steeper learning curve due to its complexity and extensive feature set
  • Potentially slower performance for simpler e-commerce needs due to its comprehensive nature
  • May require more server resources to run efficiently

Code Comparison

Spree (Ruby on Rails):

Spree::Config.configure do |config|
  config.use_static_preferences!
  config.currency = 'USD'
  config.checkout_zone = 'North America'
end

LocomotiveCMS (Ruby on Rails):

Locomotive.configure do |config|
  config.enable_logs = true
  config.host = 'mywebsite.com'
  config.mailer_sender = 'support@mywebsite.com'
end

Both projects use Ruby on Rails and have similar configuration approaches. However, Spree's configuration is more focused on e-commerce-specific settings, while LocomotiveCMS's configuration is geared towards content management and site-wide settings.

1,685

Radiant is a no-fluff, open source content management system designed for small teams.

Pros of Radiant

  • Simpler and more lightweight CMS solution
  • Longer project history and established community
  • Built-in support for Markdown and Textile markup languages

Cons of Radiant

  • Less actively maintained (last commit over 2 years ago)
  • Fewer built-in features compared to Locomotive CMS
  • Limited support for modern web development practices

Code Comparison

Radiant (Ruby):

class Page < ActiveRecord::Base
  acts_as_tree order: 'virtual, title ASC'
  has_many :parts, -> { order(:id) }, dependent: :destroy
  accepts_nested_attributes_for :parts, allow_destroy: true
end

Locomotive CMS (Ruby):

class Locomotive::Page
  include Locomotive::Mongoid::Document
  include Concerns::Page::Tree
  include Concerns::Page::EditableElements
  include Concerns::Page::Layout
  field :title, localize: true
end

Both projects are Ruby-based CMS solutions, but Locomotive CMS uses MongoDB (Mongoid) for data storage, while Radiant uses ActiveRecord with traditional relational databases. Locomotive CMS appears to have more modern features and a more active development community, while Radiant offers a simpler, more traditional approach to content management.

A Rails engine that helps you put together a super-flexible admin dashboard.

Pros of Administrate

  • More lightweight and focused solely on admin panel generation
  • Easier to customize and extend with a simpler architecture
  • Better documentation and community support

Cons of Administrate

  • Less feature-rich compared to Engine's full CMS capabilities
  • Limited to admin panel functionality, lacking content management features
  • Requires more manual setup for complex data relationships

Code Comparison

Administrate dashboard configuration:

class UserDashboard < Administrate::BaseDashboard
  ATTRIBUTE_TYPES = {
    id: Field::Number,
    name: Field::String,
    email: Field::String,
    created_at: Field::DateTime,
  }
  # ... more configuration
end

Engine content type definition:

class ContentType
  field :title, type: :string
  field :body, type: :text
  field :published_at, type: :date
  # ... more fields and validations
end

Both repositories offer solutions for managing backend data, but they serve different purposes. Administrate focuses on generating admin panels for Rails applications, while Engine provides a full-featured CMS solution. Administrate is more suitable for developers who need a quick and customizable admin interface, while Engine is better for projects requiring comprehensive content management capabilities.

The administration framework for Ruby on Rails applications.

Pros of Active Admin

  • More popular and widely adopted, with a larger community and ecosystem
  • Offers a comprehensive set of features for building admin interfaces out-of-the-box
  • Seamless integration with Ruby on Rails applications

Cons of Active Admin

  • Can be overkill for simpler projects or when custom admin interfaces are needed
  • Less flexible for creating custom content management systems
  • Steeper learning curve for developers new to the DSL

Code Comparison

Active Admin:

ActiveAdmin.register Post do
  permit_params :title, :body, :published_at

  index do
    selectable_column
    column :title
    column :published_at
    actions
  end
end

Locomotive CMS:

class Post
  include Locomotive::Wagon::Liquid::Drops::Base

  field :title, type: :string
  field :body, type: :text
  field :published_at, type: :date
end

The code snippets demonstrate the different approaches:

  • Active Admin uses a DSL to define admin interfaces
  • Locomotive CMS uses a more traditional Ruby class definition with custom fields

Both repositories provide solutions for content management, but they cater to different use cases. Active Admin is better suited for quickly building admin interfaces in Rails applications, while Locomotive CMS offers a more flexible approach for creating custom content management systems.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Locomotive

Build Status Code Climate Coverage Status Join the chat at https://gitter.im/locomotivecms/engine

Locomotive is an open source platform to create, publish and edit sites (CMS). It is designed to save time and help you focus on what matters: front-end technology, standard development process and a very low learning curve for your clients.

Locomotive relies on a very original workflow:

  • Sites are coded locally using our open source tool: Wagon.
  • Sites are deployed to the platform (engine) thanks to our internal API.
  • A back-office for the end-users is automatically generated based on the custom models and editable regions described by the developers.

Locomotive

Visit the Locomotive official website here for more information.

Features

  • Multi-sites natively supported
  • Uses Liquid, a simple and clean templating language
  • Easy to add custom sections, content types, no SQL needed
  • Beautiful and intuitive editing interface
  • Can fully localize all the content and pages
  • Embed a Restful API to manage every site
  • Develop and preview sites locally with your favorite tools (Wagon)
  • Support for Webpack, SASS, HAML and Coffee Script (Wagon)

Instructions and help

Contribute

Have a look at our Trello board to see what's next or see where you can help out.

Technologies

Here is a list of the main gems used to power the Locomotive platform:

  • Ruby 3+
  • Rails 7 - web framework
  • Bootstrap - UI framework
  • Mongoid 7 - Object-Document-Mapper for MongoDB 6
  • Devise 4 - Authentication
  • Carrierwave - Upload
  • Pundit - Permissions

Translating the back-office

By default, the Locomotive back-office is fully translated in English, Dutch and Greek.

Adding a new language is pretty straightforward since we now manage all our I18n translation keys in Transifex, a platform dedicated to this kind of task.

Here is our Transifex portal page: https://www.transifex.com/locomotive/locomotive-engine. Feel free to sign up and translate!

How to contribute

Locomotive is an open source project, we encourage contributions. If you have found a bug and want to contribute a fix, or have a new feature you would like to add, follow the steps below to get your patch into the project:

  • Install ruby, mongoDB and phantomjs
  • Clone the project git clone git@github.com:locomotivecms/engine.git
  • Setup a virtual host entry for locomotive.local to point to localhost
  • Start mongodb if it is not already running
  • Run the tests bundle exec rake
  • Write your failing tests
  • Make the tests pass
  • Create a GitHub pull request

Contact

Feel free to contact me at didier at nocoffee dot fr.

Copyright (c) 2010-2024 NoCoffee, released under the MIT license