Skip to content

Feather is a modern Swift-based content management system powered by Vapor 4.

License

Notifications You must be signed in to change notification settings

nonfungibletunji/feather

 
 

Repository files navigation

Feather CMS

Feather CMS 🪶

Feather is a modern Swift-based content management system powered by Vapor 4.

Click to join chat on Discord.

Requirements

To use Feather it is recommended to install Swift 5.3 or greater.

If you need help installing Swift, then you should follow the instructions on swift.org.

Docker

Feather is available on DockerHub

docker pull feathercms/feathercms:latest

You can also build your own images using docker-compose for more information check the docker folder

Installation

  • Clone or download the source files.
git clone https://github.com/FeatherCMS/feather.git
  • Setup the .env.development file using the make env command or config the following values by hand:
# the base url of your web server
BASE_URL="http://localhost:8080"

# the base path (absolute) of the working directory
BASE_PATH="/path/to/feather/" 
  • Run the make run command from the project directory (aka. working directory).

Using Xcode

  • ⚠️ Warning: DO NOT USE the swift package generate-xcodeproj command.
  • Make sure that you open the project by double clicking the Package.swift file.
  • ⚠️ Set the custom working directory for the Feather scheme to the root of the project directory.
  • If needed setup a post-action script to automatically shut-down previous server instances.
  • Build and run the project as usual and enjoy your Feather powered site.

Configuration

Using nginx as a reverse proxy

Setup nginx as a reverse proxy server.

If you prefer nginx as a static file server for your public files, you can disable the file middleware inside the configure.swift file.

Please note that nginx is the preferred way of hosting Feather-based apps.

Database drivers

By default Feather uses the SQLite driver, but it is possible to use PostgreSQL, MySQL (MariaDB) or even MongoDB as your database through the Fluent framework.

You should follow the instructions using the official Vapor docs to setup the right driver, but please note that the preferred drivers are PosgreSQL and SQLite for really small projects and development purposes.

File storage drivers

The Liquid framework is an abstract file storage library that works with a local file storage driver, but it is also possible to use Amazon S3 as a cloud-based solution.

You can replace the default local driver with the S3 driver, which is powered by the Soto for AWS SDK.

Core Feather Modules

Feather is a modular CMS system, this means that you can add new modules as Swift Package dependencies and build custom ones using the Feather Core framework.

Feather core gives you just a few standard modules that you can also disable (e.g you only need an API, without web frontend or admin interface), but it is recommended to keep them around.

  • System - System functionalities, variables, run modes (install) and (later on) module management.
  • User - User authentication and role & permission based access control system.
  • Api - The API module is responsible for hooking up the public and private API endpoints.
  • Admin - This module contains standard admin related interface elements and tools.
  • Frontend - Provides the frontend layout including web page and menu management.

Every other module can be completely removed (just alter the SPM dependency & configuration file), feel free to build your own configuration for your needs.

Using Feather CMS

Admin credentials

You can log in to the admin interface using the [email protected] & FeatherCMS account. For security reasons, please change the default email & password using the admin user menu ASAP.

Other Feather modules

Under the official GitHub organization you'll find the following modules:

  • Redirect - This module is responsible for dynamic URL redirects.
  • Blog - This module is responsible for providing a simple blog platform.
  • Markdown - This module is responsible for displaying markdown via a content filter.
  • Swifty - This module is responsible for Swift related syntax highlights using a content filter.
  • Sponsor - This module is responsible for displaying a sponsorship box.
  • Analytics - This module is reponsible for providing basic analytics for Feather.

Feel free to build & share your own modules to extend the functionality of the core system.

Contributions and support

Feather is an open source software and your contributions are more than welcome.

If you wish to make a change, please open a Pull Request.

Please don't hesitate to send your feedbacks, thoughts and ideas about Feather.

Known issues

Bcrypt segfault (running from cli using Swift 5.2 & macOS)

When running the app using the command line under macOS Catalina & Swift 5.2 the install process fails with a segmentation fault error. Some users were able to install the system, but the login method caused the exact same error message, these issues are related to a Swift bug.

Please check this issue for more details.

Debugging Feather

If you see a Segmentation fault: 11 error or something similar, you can start the server through the lldb debugger to find out the reason.

lldb ./.build/debug/Run
process launch serve

# print backtrace
bt
# look up a symbol
image lookup -a 0x1000 

Start the debugger and launch the serve command. Then try to repeat the steps that caused the crash. You can print out the backtrace using the bt command, this can help you to identify the problem.

Credits

License

WTFPL

About

Feather is a modern Swift-based content management system powered by Vapor 4.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 63.2%
  • Dockerfile 28.8%
  • Makefile 6.7%
  • Shell 1.3%