# scales_cms v0.2.0 - Table of Contents

## Pages

- [ScalesCms](readme.md)

## Modules

- [ScalesCms](ScalesCms.md): ScalesCms keeps the contexts that define your domain
and business logic.
- [ScalesCms.Cms](ScalesCms.Cms.md): The Cms context.

- [ScalesCms.Cms.CmsApiTokens](ScalesCms.Cms.CmsApiTokens.md): The CMS API Keys context.

- [ScalesCms.Cms.CmsBlockTemplates](ScalesCms.Cms.CmsBlockTemplates.md): The Cms context.

- [ScalesCms.Cms.CmsDirectories](ScalesCms.Cms.CmsDirectories.md): The Cms context.

- [ScalesCms.Cms.CmsListing](ScalesCms.Cms.CmsListing.md): Combined CMS listing for directory index screens.
- [ScalesCms.Cms.CmsMediaLibrary](ScalesCms.Cms.CmsMediaLibrary.md): The CmsMediaLibrary context.

- [ScalesCms.Cms.CmsPageLocaleLatestVariants](ScalesCms.Cms.CmsPageLocaleLatestVariants.md): The Cms context.

- [ScalesCms.Cms.CmsPageVariantBlocks](ScalesCms.Cms.CmsPageVariantBlocks.md): The Cms context.

- [ScalesCms.Cms.CmsPageVariants](ScalesCms.Cms.CmsPageVariants.md): The Cms context.

- [ScalesCms.Cms.CmsPages](ScalesCms.Cms.CmsPages.md): The Cms context.

- [ScalesCms.Cms.Flows.Blocks.InsertBlock](ScalesCms.Cms.Flows.Blocks.InsertBlock.md): Insert a block in a list and fix the sorting of that list of blocks.
Supports both regular component blocks and template-backed blocks.

- [ScalesCms.Cms.Flows.Blocks.ReorderBlocks](ScalesCms.Cms.Flows.Blocks.ReorderBlocks.md):   Set the new order of blocks after moving them

- [ScalesCms.Cms.Flows.Pages.DeletePage](ScalesCms.Cms.Flows.Pages.DeletePage.md): Deletes a page including its descendants.

- [ScalesCms.Cms.Flows.Pages.FindCorrectVariant](ScalesCms.Cms.Flows.Pages.FindCorrectVariant.md): Find the correct page variant for a specific locale if this is missing.

- [ScalesCms.Cms.Flows.Pages.Publish](ScalesCms.Cms.Flows.Pages.Publish.md): A collections of flows to aid publishing

- [ScalesCms.Cms.Flows.Pages.SelectVersion](ScalesCms.Cms.Flows.Pages.SelectVersion.md): Select the right version of a page variant based on the locale

- [ScalesCms.Cms.Flows.Pages.SetToVersion](ScalesCms.Cms.Flows.Pages.SetToVersion.md): Set a page variant to the latest version per locale. This provides the API of
an easy way to find the latest version of a specific page

- [ScalesCms.Cms.Flows.Pages.StartVersion](ScalesCms.Cms.Flows.Pages.StartVersion.md): Starts a new version based on a give page variant. It copies then
relevant parameters, and duplicates all blocks.

- [ScalesCms.Cms.Helpers.Locales](ScalesCms.Cms.Helpers.Locales.md): The Locales helper offers a list of supported locales and the default locale

- [ScalesCms.Cms.Helpers.S3Upload](ScalesCms.Cms.Helpers.S3Upload.md): A set of helper functions to aid the AWS S3 usage throughout the application

- [ScalesCms.Cms.Helpers.SimpleS3Upload](ScalesCms.Cms.Helpers.SimpleS3Upload.md): Dependency-free S3 Form Upload using HTTP POST sigv4
https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-post-example.html

- [ScalesCms.Cms.Helpers.Slugify](ScalesCms.Cms.Helpers.Slugify.md): A slugify helper thanks to Mudassar (https://mudssrali.com/blog/slugify-a-string-in-elixir)

- [ScalesCms.Constants.Buttons](ScalesCms.Constants.Buttons.md):   Module defining button color variants

- [ScalesCms.Constants.Topics](ScalesCms.Constants.Topics.md):   Module containind topics for pubsub

- [ScalesCms.ErrorHandler](ScalesCms.ErrorHandler.md): Error handler for JWT

- [ScalesCms.ErrorJSON](ScalesCms.ErrorJSON.md)
- [ScalesCms.Guardian](ScalesCms.Guardian.md):   Guardian Implementation to resolve module to user

- [ScalesCms.Guardian.Plug](ScalesCms.Guardian.Plug.md)
- [ScalesCms.Helpers.BlockResolver](ScalesCms.Helpers.BlockResolver.md): Resolves block based on if it has a template assigned to it.

- [ScalesCms.Mailer](ScalesCms.Mailer.md)
- [ScalesCms.Repo](ScalesCms.Repo.md)
- [ScalesCmsWeb](ScalesCmsWeb.md): The entrypoint for defining your web interface, such
as controllers, components, channels, and so on.
- [ScalesCmsWeb.Api.Public.ComponentsController](ScalesCmsWeb.Api.Public.ComponentsController.md)
- [ScalesCmsWeb.Api.Public.ComponentsJSON](ScalesCmsWeb.Api.Public.ComponentsJSON.md)
- [ScalesCmsWeb.Api.Public.DirectoriesJSON](ScalesCmsWeb.Api.Public.DirectoriesJSON.md)
- [ScalesCmsWeb.Api.Public.PagesController](ScalesCmsWeb.Api.Public.PagesController.md)
- [ScalesCmsWeb.Api.Public.PagesJSON](ScalesCmsWeb.Api.Public.PagesJSON.md)
- [ScalesCmsWeb.CmsBlockTemplatesLive.Edit](ScalesCmsWeb.CmsBlockTemplatesLive.Edit.md)
- [ScalesCmsWeb.CmsBlockTemplatesLive.Index](ScalesCmsWeb.CmsBlockTemplatesLive.Index.md)
- [ScalesCmsWeb.CmsBlockTemplatesLive.NewFormComponent](ScalesCmsWeb.CmsBlockTemplatesLive.NewFormComponent.md)
- [ScalesCmsWeb.CmsDirectoryLive.FormComponent](ScalesCmsWeb.CmsDirectoryLive.FormComponent.md)
- [ScalesCmsWeb.CmsDirectoryLive.Index](ScalesCmsWeb.CmsDirectoryLive.Index.md)
- [ScalesCmsWeb.CmsIndexLive.Index](ScalesCmsWeb.CmsIndexLive.Index.md)
- [ScalesCmsWeb.CmsMediaLibraryLive.Index](ScalesCmsWeb.CmsMediaLibraryLive.Index.md)
- [ScalesCmsWeb.CmsMediaLibraryLive.MediaLibraryModal](ScalesCmsWeb.CmsMediaLibraryLive.MediaLibraryModal.md): A modal live component for selecting or uploading media files.
Can be embedded in editors to pick existing media or upload new files.

- [ScalesCmsWeb.CmsMediaLibraryLive.MediaLibraryUtils](ScalesCmsWeb.CmsMediaLibraryLive.MediaLibraryUtils.md): Shared utility functions for the CMS Media Library.
Contains common logic used by both the Index and Modal components.

- [ScalesCmsWeb.CmsPageLive.FormComponent](ScalesCmsWeb.CmsPageLive.FormComponent.md)
- [ScalesCmsWeb.CmsPageLive.Show](ScalesCmsWeb.CmsPageLive.Show.md)
- [ScalesCmsWeb.CmsPageVariantLive.FormComponent](ScalesCmsWeb.CmsPageVariantLive.FormComponent.md)
- [ScalesCmsWeb.CmsPageVariantLive.Index](ScalesCmsWeb.CmsPageVariantLive.Index.md)
- [ScalesCmsWeb.CmsPageVariantLive.Show](ScalesCmsWeb.CmsPageVariantLive.Show.md)
- [ScalesCmsWeb.CmsRouter](ScalesCmsWeb.CmsRouter.md): Macros for defining CMS routes in the host application.
- [ScalesCmsWeb.CmsSettingsLive.ApiKeyFormComponent](ScalesCmsWeb.CmsSettingsLive.ApiKeyFormComponent.md): CMS Settings LiveView component for managing API keys.

- [ScalesCmsWeb.CmsSettingsLive.Index](ScalesCmsWeb.CmsSettingsLive.Index.md)
- [ScalesCmsWeb.CmsStatsController](ScalesCmsWeb.CmsStatsController.md)
- [ScalesCmsWeb.Components.CmsComponents](ScalesCmsWeb.Components.CmsComponents.md): An index of all components and insertable template blocks for the CMS drawer.

- [ScalesCmsWeb.Components.CmsComponents.Button](ScalesCmsWeb.Components.CmsComponents.Button.md): A header component for the CMS

- [ScalesCmsWeb.Components.CmsComponents.Button.ButtonEditor](ScalesCmsWeb.Components.CmsComponents.Button.ButtonEditor.md): Editor for the button component

- [ScalesCmsWeb.Components.CmsComponents.Button.ButtonProperties](ScalesCmsWeb.Components.CmsComponents.Button.ButtonProperties.md): The schema for the MD component

- [ScalesCmsWeb.Components.CmsComponents.ButtonCollection](ScalesCmsWeb.Components.CmsComponents.ButtonCollection.md): A button collection component for the CMS

- [ScalesCmsWeb.Components.CmsComponents.ButtonCollection.ButtonCollectionEditor](ScalesCmsWeb.Components.CmsComponents.ButtonCollection.ButtonCollectionEditor.md): The button collection editor component for the CMS

- [ScalesCmsWeb.Components.CmsComponents.ButtonCollection.ButtonCollectionProperties](ScalesCmsWeb.Components.CmsComponents.ButtonCollection.ButtonCollectionProperties.md): Schema for button collection properties.

- [ScalesCmsWeb.Components.CmsComponents.ButtonCollection.ButtonCollectionWrapper](ScalesCmsWeb.Components.CmsComponents.ButtonCollection.ButtonCollectionWrapper.md): The wrapper that goes around a block that is rendered in the WYSIWYG editor

- [ScalesCmsWeb.Components.CmsComponents.CTAButton](ScalesCmsWeb.Components.CmsComponents.CTAButton.md): A header component for the CMS

- [ScalesCmsWeb.Components.CmsComponents.CTAButton.CTAButtonEditor](ScalesCmsWeb.Components.CmsComponents.CTAButton.CTAButtonEditor.md): Editor for the CTA button component

- [ScalesCmsWeb.Components.CmsComponents.CTAButton.CTAButtonProperties](ScalesCmsWeb.Components.CmsComponents.CTAButton.CTAButtonProperties.md): The schema for the MD component

- [ScalesCmsWeb.Components.CmsComponents.Dev.DevEditor](ScalesCmsWeb.Components.CmsComponents.Dev.DevEditor.md): Editor for the custom component block

- [ScalesCmsWeb.Components.CmsComponents.Dev.DevProperties](ScalesCmsWeb.Components.CmsComponents.Dev.DevProperties.md): The schema for the MD component

- [ScalesCmsWeb.Components.CmsComponents.Header](ScalesCmsWeb.Components.CmsComponents.Header.md): A header component for the CMS

- [ScalesCmsWeb.Components.CmsComponents.Header.HeaderEditor](ScalesCmsWeb.Components.CmsComponents.Header.HeaderEditor.md): Editor for the header component

- [ScalesCmsWeb.Components.CmsComponents.Header.HeaderProperties](ScalesCmsWeb.Components.CmsComponents.Header.HeaderProperties.md): The schema for the MD component

- [ScalesCmsWeb.Components.CmsComponents.Helpers.FileUploader](ScalesCmsWeb.Components.CmsComponents.Helpers.FileUploader.md): A multi use Phoenix LiveView file uploader ready for direct to S3 uploading

- [ScalesCmsWeb.Components.CmsComponents.Helpers.FileUploaderMultiple](ScalesCmsWeb.Components.CmsComponents.Helpers.FileUploaderMultiple.md): A first draft of a fileuploader that can be used more than once in a live view

- [ScalesCmsWeb.Components.CmsComponents.Image](ScalesCmsWeb.Components.CmsComponents.Image.md): An upload to s3 image component

- [ScalesCmsWeb.Components.CmsComponents.Image.ImageEditor](ScalesCmsWeb.Components.CmsComponents.Image.ImageEditor.md): An image components editor

- [ScalesCmsWeb.Components.CmsComponents.Image.ImageProperties](ScalesCmsWeb.Components.CmsComponents.Image.ImageProperties.md): The image upload component schema

- [ScalesCmsWeb.Components.CmsComponents.ImageButton](ScalesCmsWeb.Components.CmsComponents.ImageButton.md): A header component for the CMS

- [ScalesCmsWeb.Components.CmsComponents.ImageButton.ImageButtonEditor](ScalesCmsWeb.Components.CmsComponents.ImageButton.ImageButtonEditor.md): Editor for the image button component

- [ScalesCmsWeb.Components.CmsComponents.ImageButton.ImageButtonProperties](ScalesCmsWeb.Components.CmsComponents.ImageButton.ImageButtonProperties.md): The schema for the MD component

- [ScalesCmsWeb.Components.CmsComponents.ImageButtonCollection](ScalesCmsWeb.Components.CmsComponents.ImageButtonCollection.md): A button collection component for the CMS

- [ScalesCmsWeb.Components.CmsComponents.ImageButtonCollection.ImageButtonCollectionEditor](ScalesCmsWeb.Components.CmsComponents.ImageButtonCollection.ImageButtonCollectionEditor.md): The image button collection editor component for the CMS

- [ScalesCmsWeb.Components.CmsComponents.ImageButtonCollection.ImageButtonCollectionProperties](ScalesCmsWeb.Components.CmsComponents.ImageButtonCollection.ImageButtonCollectionProperties.md): Schema for button collection properties.

- [ScalesCmsWeb.Components.CmsComponents.Lottie](ScalesCmsWeb.Components.CmsComponents.Lottie.md): An upload to s3 lottie component

- [ScalesCmsWeb.Components.CmsComponents.Lottie.LottieEditor](ScalesCmsWeb.Components.CmsComponents.Lottie.LottieEditor.md): A lottie animation components editor

- [ScalesCmsWeb.Components.CmsComponents.Lottie.LottieProperties](ScalesCmsWeb.Components.CmsComponents.Lottie.LottieProperties.md): The lottie component schema

- [ScalesCmsWeb.Components.CmsComponents.Md](ScalesCmsWeb.Components.CmsComponents.Md.md): The markdown component, allowing the user to use a HTML WYSIWYG editor,
transforming that HTML back to MD

- [ScalesCmsWeb.Components.CmsComponents.Md.MdEditor](ScalesCmsWeb.Components.CmsComponents.Md.MdEditor.md): The MD editor, rendering the TipTap WYSIWYG editor for the MD component

- [ScalesCmsWeb.Components.CmsComponents.Md.MdProperties](ScalesCmsWeb.Components.CmsComponents.Md.MdProperties.md): The schema for the MD component

- [ScalesCmsWeb.Components.CmsComponents.Video](ScalesCmsWeb.Components.CmsComponents.Video.md): An upload to s3 video component

- [ScalesCmsWeb.Components.CmsComponents.Video.VideoEditor](ScalesCmsWeb.Components.CmsComponents.Video.VideoEditor.md): A video components editor with media library support

- [ScalesCmsWeb.Components.CmsComponents.Video.VideoProperties](ScalesCmsWeb.Components.CmsComponents.Video.VideoProperties.md): The video component schema

- [ScalesCmsWeb.Components.CmsComponentsRenderer](ScalesCmsWeb.Components.CmsComponentsRenderer.md): The renderer of all the blocks, linking them to the right components

- [ScalesCmsWeb.Components.DashboardTile](ScalesCmsWeb.Components.DashboardTile.md): A struct representing a configurable dashboard tile.
- [ScalesCmsWeb.Components.DashboardTiles](ScalesCmsWeb.Components.DashboardTiles.md): The renderer and config for the dashboard tiles.
- [ScalesCmsWeb.Components.HelperComponents.BlockWrapper](ScalesCmsWeb.Components.HelperComponents.BlockWrapper.md): The wrapper that goes around a block that is rendered in the WYSIWYG editor

- [ScalesCmsWeb.Components.HelperComponents.DrawerComponents](ScalesCmsWeb.Components.HelperComponents.DrawerComponents.md): Shared drawer preview for the component library.
Supports both regular components and template-backed insertables.

- [ScalesCmsWeb.Components.HelperComponents.PageSearch](ScalesCmsWeb.Components.HelperComponents.PageSearch.md): The wrapper that goes around a block that is rendered in the WYSIWYG editor

- [ScalesCmsWeb.Components.HelperComponents.RootComponent](ScalesCmsWeb.Components.HelperComponents.RootComponent.md): A default component base

- [ScalesCmsWeb.Components.LocaleSwitcher](ScalesCmsWeb.Components.LocaleSwitcher.md): A locale switcher component, that provides a PubSub feature throughout the whole
application so they can tag along with locale changes

- [ScalesCmsWeb.Components.MenuItems](ScalesCmsWeb.Components.MenuItems.md): The renderer and config for the menu items.
- [ScalesCmsWeb.ContextMenuComponents](ScalesCmsWeb.ContextMenuComponents.md): Provides a reusable context menu component that can be used across the CMS interface tables.
- [ScalesCmsWeb.CoreComponents](ScalesCmsWeb.CoreComponents.md): Provides core UI components.
- [ScalesCmsWeb.DevEnv.UserLoginLive](ScalesCmsWeb.DevEnv.UserLoginLive.md)
- [ScalesCmsWeb.Endpoint](ScalesCmsWeb.Endpoint.md)
- [ScalesCmsWeb.ErrorHTML](ScalesCmsWeb.ErrorHTML.md): This module is invoked by your endpoint in case of errors on HTML requests.
- [ScalesCmsWeb.ErrorJSON](ScalesCmsWeb.ErrorJSON.md): This module is invoked by your endpoint in case of errors on JSON requests.
- [ScalesCmsWeb.Gettext](ScalesCmsWeb.Gettext.md): A module providing Internationalization with a gettext-based API.
- [ScalesCmsWeb.Helpers.CmsBlockTemplates](ScalesCmsWeb.Helpers.CmsBlockTemplates.md): Helper functions for building CMS template blocks paths and URLs.

- [ScalesCmsWeb.Helpers.CmsDirectory](ScalesCmsWeb.Helpers.CmsDirectory.md): Helper functions for building CMS directory paths and URLs.

- [ScalesCmsWeb.Helpers.Date](ScalesCmsWeb.Helpers.Date.md): A starting point for date helpers

- [ScalesCmsWeb.Helpers.TemplateMode](ScalesCmsWeb.Helpers.TemplateMode.md): Shared presentation helpers for template mode badges and indicators.

- [ScalesCmsWeb.Hooks.ContextMenu](ScalesCmsWeb.Hooks.ContextMenu.md): Shared LiveView hook for context menu state and events.

- [ScalesCmsWeb.Hooks.PersistedState](ScalesCmsWeb.Hooks.PersistedState.md): Generic LiveView `on_mount` hook for managing persisted UI state.
- [ScalesCmsWeb.Layouts](ScalesCmsWeb.Layouts.md): This module holds different layouts used by your application.
- [ScalesCmsWeb.Live.AppLayoutComponent](ScalesCmsWeb.Live.AppLayoutComponent.md): Main layout component that wraps all CMS pages.

- [ScalesCmsWeb.MediaComponents](ScalesCmsWeb.MediaComponents.md): Provides custom made Media components.

- [ScalesCmsWeb.PageBuilderLive.Edit](ScalesCmsWeb.PageBuilderLive.Edit.md)
- [ScalesCmsWeb.PageController](ScalesCmsWeb.PageController.md)
- [ScalesCmsWeb.PageHTML](ScalesCmsWeb.PageHTML.md): This module contains pages rendered by PageController.
- [ScalesCmsWeb.PersistedStateController](ScalesCmsWeb.PersistedStateController.md): Controller for persisting UI state to the session.
- [ScalesCmsWeb.PersistedStateStore](ScalesCmsWeb.PersistedStateStore.md): PersistedStateStore is a GenServer that manages an ETS table for storing persisted state across LiveView navigations.

- [ScalesCmsWeb.Plugs.Assets](ScalesCmsWeb.Plugs.Assets.md):    Plug to serve specific assets for the CMS.
   Inspired from the LiveView Dashboard way of serving assets

- [ScalesCmsWeb.Plugs.JwtAuthentication](ScalesCmsWeb.Plugs.JwtAuthentication.md):   This plug authenticates the API request based on JWT

- [ScalesCmsWeb.Router](ScalesCmsWeb.Router.md)
- [ScalesCmsWeb.SaveRequestUri](ScalesCmsWeb.SaveRequestUri.md): Hooks into on_mount to keep track of current uri

- [ScalesCmsWeb.SvgComponents](ScalesCmsWeb.SvgComponents.md): Provides custom made UI components.

- [ScalesCmsWeb.Telemetry](ScalesCmsWeb.Telemetry.md)
- [ScalesCmsWeb.UserAuth](ScalesCmsWeb.UserAuth.md): Provides a demo UserAuth environment to develop the CMS with a logged in user.
Taken from mix.gen auth, so it matches with most Phoenix envs.

- [ScalesCmsWeb.UserSessionController](ScalesCmsWeb.UserSessionController.md)

## Mix Tasks

- [mix scales_cms.add_views](Mix.Tasks.ScalesCms.AddViews.md): Only run this task if views are missing

- [mix scales_cms.generate_migrations](Mix.Tasks.ScalesCms.GenerateMigrations.md): Copies pending ScalesCMS migrations into the host app.

