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_migrationsto 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.migrateto 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 | bashecho 'eval "$(direnv hook bash)"' >> ~/.bashrcorecho 'eval "$(direnv hook zsh)"' >> ~/.zshrc- Restart your terminal or run
source ~/.bashrcorsource ~/.zshrc
To start your Phoenix server:
- Run
mix guardian.gen.secretto generate API secret - Set the API secret in the
.envrcfile like this:export API_SECRET_KEY=+wUAu+Hizgp+rIBZdK8wM2HKYkHT1V6PvrYEoGJybMeH7/VqerwfF8Inw1Cq083W
- Run
direnv allowto load the environment variables - Run
mix setupto install and setup dependencies - Start Phoenix endpoint with
mix phx.serveror 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.