Yancy - The Best Web Framework Deserves the Best CMS
version 1.060
use Mojolicious::Lite;
use Mojo::Pg; # Supported backends: Pg, MySQL, SQLite, DBIx::Class
plugin Yancy => {
backend => { Pg => Mojo::Pg->new( 'postgres:///myapp' ) },
read_schema => 1,
};
Yancy is a simple content management system (CMS) for administering content in a database. Yancy accepts a configuration file that describes the data in the database, builds a website that lists all of the available data, and allows a user to edit data, delete data, and add new data.
Yancy uses JSON Schema to describe the data in a database and configure forms and applications. The schema is added to an OpenAPI specification which creates a REST API for your data.
Yancy can be run in a standalone mode (which can be placed behind a proxy), or can be embedded as a plugin into any application that uses the Mojolicious web framework.
Yancy can manage data in multiple databases using different backends (Yancy::Backend modules). Backends exist for Postgres via Mojo::Pg, MySQL via Mojo::mysql, SQLite via Mojo::SQLite, DBIx::Class, a Perl ORM, and even static YAML and Markdown files using Yancy::Backend::Static.
Yancy is primarily a Mojolicious plugin to ease development and management of Mojolicious applications. Yancy provides:
- An administrative application that allows editing and managing your site's content. This app is highly customizable using additional JavaScript.
- Controllers which you can use to easily list data, display data, modify data, and delete data.
- Helpers to access data, validate forms
- Templates which you can override to customize the Yancy editor's appearance
For information on how to use Yancy as a Mojolicious plugin, see Mojolicious::Plugin::Yancy.
The Yancy Git repository on Github includes some example applications you can use to help build your own websites. View the example application directory.
Yancy comes with plugins to enhance your website.
- The Editor plugin allows for customization of the Yancy editor application, including adding your own components and editors.
- The File plugin manages files uploaded to the site via the editor or via a controller.
- The Auth plugin provides an API that allows you to enable multiple authentication mechanisms for your site, including users creating website accounts, or users using their Github login or other OAuth2 authentication.
- The Form plugin can generate forms for the configured schema, or for individual fields. There are included form generators for Bootstrap 4.
More development will be happening here soon!
Yancy can also be run as a standalone app in the event one wants to develop applications solely using Mojolicious templates. For information on how to run Yancy as a standalone application, see Yancy::Help::Standalone.
This application creates a REST API using the standard
OpenAPI API specification. The API spec document
is located at /yancy/api
.
Yancy is working on support for translating all internal text. See Yancy::I18N for more information. Translations and other help will be greatly appreciated!
- Yancy::Help::Config - How to configure Yancy
- Yancy::Help::Auth - How to authenticate and authorize users
- Yancy::Help::Standalone - How to use Yancy without writing code
- Yancy::Help::Upgrading - How to upgrade from previous versions
- Yancy::Help::Cookbook - How to cook various apps with Yancy
This project bundles some other projects with the following licenses:
- jQuery (version 3.2.1) Copyright JS Foundation and other contributors (MIT License)
- Bootstrap (version 4.3.1) Copyright 2011-2019 the Bootstrap Authors and Twitter, Inc. (MIT License)
- Popper.js (version 1.13.0) Copyright 2017 Federico Zivolo (MIT License)
- FontAwesome (version 4.7.0) Copyright Dave Gandy (SIL OFL 1.1 and MIT License)
- Vue.js (version 2.5.3) Copyright 2013-2018, Yuxi (Evan) You (MIT License)
- marked (version 0.3.12) Copyright 2011-2018, Christopher Jeffrey (MIT License)
The bundled versions of these modules may change. If you rely on these in your own app, be sure to watch the changelog for version updates.
Doug Bell [email protected]
- Ed J [email protected]
- Erik Johansen [email protected]
- Mohammad S Anwar [email protected]
- Pavel Serikov [email protected]
- Rajesh Mallah [email protected]
- William Lindley [email protected]
- Wojtek Bażant <[email protected]>
This software is copyright (c) 2020 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.