ScalesCms
ScalesCMS is a plugin CMS for the Phoenix Framework
that is developed by Fish on Fire
and allows you to manage the content of either applications or websites easily.
It provides a set of JSON endpoints for headless usage. Alongside the CMS we also provide a set of
React Native
components that can be used to easily integrate the CMS into your application.
Build Status
Prerequisites
- Elixir 1.14
- Phoenix 1.7.17 and higher
How to set up in your project
- Add to the list of dependencies in
mix.exs
- Add the following lines to your config.exs file
This will allow the CMS to use your application's endpoint and repo.config :scales_cms, endpoint: CmsDemoWeb.Endpoint config :scales_cms, repo: CmsDemo.Repo
- Run
mix scales_cms.generate_migrations
to generate the migrations for the CMS. These migrations are now part of your application. You could modify them, but no modifications are supported currently. - Run
mix ecto.migrate
to run the migrations.
React Native Renderer
More info on https://github.com/fishonfire/react-native-scales-renderer
Development setup
Prerequisites:
direnv is used to manage environment variables. You can install it by running:
curl -sfL https://direnv.net/install.sh | bash
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
orecho 'eval "$(direnv hook zsh)"' >> ~/.zshrc
- Restart your terminal or run
source ~/.bashrc
orsource ~/.zshrc
To start your Phoenix server:
- Run
mix guardian.gen.secret
to generate API secret - Set the API secret in the
.envrc
file like this:export API_SECRET_KEY=+wUAu+Hizgp+rIBZdK8wM2HKYkHT1V6PvrYEoGJybMeH7/VqerwfF8Inw1Cq083W
- Run
direnv allow
to load the environment variables - Run
mix setup
to install and setup dependencies - Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser.
Contributors
- Simon de la Court (https://github.com/simondelacourt)
- Alexey Pikulik (https://github.com/alexeyfof)
Copyright and Licence
Copyright (c) 2024, Fish on Fire.
Phoenix source code is licensed under the GPL License
.