diff --git a/services/bright/config/config.exs b/services/bright/config/config.exs
index e52d3ac..5d181f2 100644
--- a/services/bright/config/config.exs
+++ b/services/bright/config/config.exs
@@ -23,14 +23,14 @@ config :bright, BrightWeb.Endpoint,
live_view: [signing_salt: "JGNufzrG"]
-config :bright, Oban,
- engine: Oban.Engines.Basic,
- queues: [default: 10],
- repo: Bright.Repo,
- plugins: [
- {Oban.Plugins.Pruner, max_age: 60 * 60 * 24 * 7},
- {Oban.Plugins.Lifeline, rescue_after: :timer.minutes(30)}
- ]
+# config :bright, Oban,
+# engine: Oban.Engines.Basic,
+# queues: [default: 10],
+# repo: Bright.Repo,
+# plugins: [
+# {Oban.Plugins.Pruner, max_age: 60 * 60 * 24 * 7},
+# {Oban.Plugins.Lifeline, rescue_after: :timer.minutes(30)}
+# ]
# Configures the mailer
diff --git a/services/bright/lib/bright/application.ex b/services/bright/lib/bright/application.ex
index 6678c5e..3e7429f 100644
--- a/services/bright/lib/bright/application.ex
+++ b/services/bright/lib/bright/application.ex
@@ -7,7 +7,7 @@ defmodule Bright.Application do
@impl true
def start(_type, _args) do
- Oban.Telemetry.attach_default_logger(level: :debug)
+ # Oban.Telemetry.attach_default_logger(level: :debug)
children = [
BrightWeb.Telemetry,
Bright.Repo,
@@ -15,7 +15,7 @@ defmodule Bright.Application do
{Phoenix.PubSub, name: Bright.PubSub},
# Start the Finch HTTP client for sending emails
{Finch, name: Bright.Finch},
- {Oban, Application.fetch_env!(:bright, Oban)},
+ # {Oban, Application.fetch_env!(:bright, Oban)},
# Start a worker by calling: Bright.Worker.start_link(arg)
# {Bright.Worker, arg},
# Start to serve requests, typically the last entry
diff --git a/services/bright/lib/bright_web/router.ex b/services/bright/lib/bright_web/router.ex
index c991da5..f318fbe 100644
--- a/services/bright/lib/bright_web/router.ex
+++ b/services/bright/lib/bright_web/router.ex
@@ -44,12 +44,11 @@ defmodule BrightWeb.Router do
pipe_through :browser
get "/", PageController, :home
- resources "/products", ProductController
get "/patrons", PatronController, :index
get "/about", PageController, :about
get "/api", PageController, :api
- get "/up", PageController, :health
+ get "/health", PageController, :health
resources "/orders", OrderController, only: [:create, :show]
@@ -76,18 +75,8 @@ defmodule BrightWeb.Router do
## @todo DANGER, platforms must only be writable by admins, (unless we implement SVG sanitizing)
resources "/platforms", PlatformController
- live "/thermostat", ThermostatLive
-
- get "/hello", HelloController, :index
- get "/hello/:messenger", HelloController, :show
- live "/posts", PostLive.Index, :index
- live "/posts/new", PostLive.Index, :new
- live "/posts/:id/edit", PostLive.Index, :edit
-
- live "/posts/:id", PostLive.Show, :show
- live "/posts/:id/show/edit", PostLive.Show, :edit
end
# Other scopes may use custom stacks.
diff --git a/services/bright/lib/free_oban_ui.ex b/services/bright/lib/free_oban_ui.ex
deleted file mode 100644
index f42070c..0000000
--- a/services/bright/lib/free_oban_ui.ex
+++ /dev/null
@@ -1,9 +0,0 @@
-defmodule FreeObanUi do
- @moduledoc """
- FreeObanUi keeps the contexts that define your domain
- and business logic.
-
- Contexts are also responsible for managing your data, regardless
- if it comes from the database, an external API or others.
- """
-end
diff --git a/services/bright/lib/free_oban_ui/application.ex b/services/bright/lib/free_oban_ui/application.ex
deleted file mode 100644
index 79794a2..0000000
--- a/services/bright/lib/free_oban_ui/application.ex
+++ /dev/null
@@ -1,37 +0,0 @@
-defmodule FreeObanUi.Application do
- # See https://hexdocs.pm/elixir/Application.html
- # for more information on OTP Applications
- @moduledoc false
-
- use Application
-
- @impl true
- def start(_type, _args) do
- children = [
- FreeObanUiWeb.Telemetry,
- FreeObanUi.Repo,
- {DNSCluster, query: Application.get_env(:free_oban_ui, :dns_cluster_query) || :ignore},
- {Phoenix.PubSub, name: FreeObanUi.PubSub},
- # Start the Finch HTTP client for sending emails
- {Finch, name: FreeObanUi.Finch},
- {Oban, Application.fetch_env!(:free_oban_ui, Oban)},
- # Start a worker by calling: FreeObanUi.Worker.start_link(arg)
- # {FreeObanUi.Worker, arg},
- # Start to serve requests, typically the last entry
- FreeObanUiWeb.Endpoint
- ]
-
- # See https://hexdocs.pm/elixir/Supervisor.html
- # for other strategies and supported options
- opts = [strategy: :one_for_one, name: FreeObanUi.Supervisor]
- Supervisor.start_link(children, opts)
- end
-
- # Tell Phoenix to update the endpoint configuration
- # whenever the application is updated.
- @impl true
- def config_change(changed, _new, removed) do
- FreeObanUiWeb.Endpoint.config_change(changed, removed)
- :ok
- end
-end
diff --git a/services/bright/lib/free_oban_ui/mailer.ex b/services/bright/lib/free_oban_ui/mailer.ex
deleted file mode 100644
index 93ef998..0000000
--- a/services/bright/lib/free_oban_ui/mailer.ex
+++ /dev/null
@@ -1,3 +0,0 @@
-defmodule FreeObanUi.Mailer do
- use Swoosh.Mailer, otp_app: :free_oban_ui
-end
diff --git a/services/bright/lib/free_oban_ui/repo.ex b/services/bright/lib/free_oban_ui/repo.ex
deleted file mode 100644
index 61b34c9..0000000
--- a/services/bright/lib/free_oban_ui/repo.ex
+++ /dev/null
@@ -1,5 +0,0 @@
-defmodule FreeObanUi.Repo do
- use Ecto.Repo,
- otp_app: :free_oban_ui,
- adapter: Ecto.Adapters.Postgres
-end
diff --git a/services/bright/lib/free_oban_ui_web.ex b/services/bright/lib/free_oban_ui_web.ex
deleted file mode 100644
index 90108b9..0000000
--- a/services/bright/lib/free_oban_ui_web.ex
+++ /dev/null
@@ -1,113 +0,0 @@
-defmodule FreeObanUiWeb do
- @moduledoc """
- The entrypoint for defining your web interface, such
- as controllers, components, channels, and so on.
-
- This can be used in your application as:
-
- use FreeObanUiWeb, :controller
- use FreeObanUiWeb, :html
-
- The definitions below will be executed for every controller,
- component, etc, so keep them short and clean, focused
- on imports, uses and aliases.
-
- Do NOT define functions inside the quoted expressions
- below. Instead, define additional modules and import
- those modules here.
- """
-
- def static_paths, do: ~w(assets fonts images favicon.ico robots.txt)
-
- def router do
- quote do
- use Phoenix.Router, helpers: false
-
- # Import common connection and controller functions to use in pipelines
- import Plug.Conn
- import Phoenix.Controller
- import Phoenix.LiveView.Router
- end
- end
-
- def channel do
- quote do
- use Phoenix.Channel
- end
- end
-
- def controller do
- quote do
- use Phoenix.Controller,
- formats: [:html, :json],
- layouts: [html: FreeObanUiWeb.Layouts]
-
- import Plug.Conn
- import FreeObanUiWeb.Gettext
-
- unquote(verified_routes())
- end
- end
-
- def live_view do
- quote do
- use Phoenix.LiveView,
- layout: {FreeObanUiWeb.Layouts, :app}
-
- unquote(html_helpers())
- end
- end
-
- def live_component do
- quote do
- use Phoenix.LiveComponent
-
- unquote(html_helpers())
- end
- end
-
- def html do
- quote do
- use Phoenix.Component
-
- # Import convenience functions from controllers
- import Phoenix.Controller,
- only: [get_csrf_token: 0, view_module: 1, view_template: 1]
-
- # Include general helpers for rendering HTML
- unquote(html_helpers())
- end
- end
-
- defp html_helpers do
- quote do
- # HTML escaping functionality
- import Phoenix.HTML
- # Core UI components and translation
- import FreeObanUiWeb.CoreComponents
- import FreeObanUiWeb.Gettext
-
- # Shortcut for generating JS commands
- alias Phoenix.LiveView.JS
-
- # Routes generation with the ~p sigil
- unquote(verified_routes())
- end
- end
-
- def verified_routes do
- quote do
- use Phoenix.VerifiedRoutes,
- endpoint: FreeObanUiWeb.Endpoint,
- router: FreeObanUiWeb.Router,
- statics: FreeObanUiWeb.static_paths()
- end
- end
-
- @doc """
- When used, dispatch to the appropriate controller/live_view/etc.
- """
- defmacro __using__(which) when is_atom(which) do
- apply(__MODULE__, which, [])
- end
-end
diff --git a/services/bright/lib/free_oban_ui_web/components/core_components.ex b/services/bright/lib/free_oban_ui_web/components/core_components.ex
deleted file mode 100644
index 8703fdd..0000000
--- a/services/bright/lib/free_oban_ui_web/components/core_components.ex
+++ /dev/null
@@ -1,676 +0,0 @@
-defmodule FreeObanUiWeb.CoreComponents do
- @moduledoc """
- Provides core UI components.
-
- At first glance, this module may seem daunting, but its goal is to provide
- core building blocks for your application, such as modals, tables, and
- forms. The components consist mostly of markup and are well-documented
- with doc strings and declarative assigns. You may customize and style
- them in any way you want, based on your application growth and needs.
-
- The default components use Tailwind CSS, a utility-first CSS framework.
- See the [Tailwind CSS documentation](https://tailwindcss.com) to learn
- how to customize them or feel free to swap in another framework altogether.
-
- Icons are provided by [heroicons](https://heroicons.com). See `icon/1` for usage.
- """
- use Phoenix.Component
-
- alias Phoenix.LiveView.JS
- import FreeObanUiWeb.Gettext
-
- @doc """
- Renders a modal.
-
- ## Examples
-
- <.modal id="confirm-modal">
- This is a modal.
-
-
- JS commands may be passed to the `:on_cancel` to configure
- the closing/cancel event, for example:
-
- <.modal id="confirm" on_cancel={JS.navigate(~p"/posts")}>
- This is another modal.
-
-
- """
- attr :id, :string, required: true
- attr :show, :boolean, default: false
- attr :on_cancel, JS, default: %JS{}
- slot :inner_block, required: true
-
- def modal(assigns) do
- ~H"""
-
- """
- end
-
- @doc """
- Shows the flash group with standard titles and content.
-
- ## Examples
-
- <.flash_group flash={@flash} />
- """
- attr :flash, :map, required: true, doc: "the map of flash messages"
- attr :id, :string, default: "flash-group", doc: "the optional id of flash container"
-
- def flash_group(assigns) do
- ~H"""
-
- <.flash kind={:info} title={gettext("Success!")} flash={@flash} />
- <.flash kind={:error} title={gettext("Error!")} flash={@flash} />
- <.flash
- id="client-error"
- kind={:error}
- title={gettext("We can't find the internet")}
- phx-disconnected={show(".phx-client-error #client-error")}
- phx-connected={hide("#client-error")}
- hidden
- >
- <%= gettext("Attempting to reconnect") %>
- <.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" />
-
-
- <.flash
- id="server-error"
- kind={:error}
- title={gettext("Something went wrong!")}
- phx-disconnected={show(".phx-server-error #server-error")}
- phx-connected={hide("#server-error")}
- hidden
- >
- <%= gettext("Hang in there while we get back on track") %>
- <.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" />
-
-
- """
- end
-
- @doc """
- Renders a simple form.
-
- ## Examples
-
- <.simple_form for={@form} phx-change="validate" phx-submit="save">
- <.input field={@form[:email]} label="Email"/>
- <.input field={@form[:username]} label="Username" />
- <:actions>
- <.button>Save
-
-
- """
- attr :for, :any, required: true, doc: "the data structure for the form"
- attr :as, :any, default: nil, doc: "the server side parameter to collect all input under"
-
- attr :rest, :global,
- include: ~w(autocomplete name rel action enctype method novalidate target multipart),
- doc: "the arbitrary HTML attributes to apply to the form tag"
-
- slot :inner_block, required: true
- slot :actions, doc: "the slot for form actions, such as a submit button"
-
- def simple_form(assigns) do
- ~H"""
- <.form :let={f} for={@for} as={@as} {@rest}>
-
- <%= render_slot(@inner_block, f) %>
-
- <%= render_slot(action, f) %>
-
-
-
- """
- end
-
- @doc """
- Renders a button.
-
- ## Examples
-
- <.button>Send!
- <.button phx-click="go" class="ml-2">Send!
- """
- attr :type, :string, default: nil
- attr :class, :string, default: nil
- attr :rest, :global, include: ~w(disabled form name value)
-
- slot :inner_block, required: true
-
- def button(assigns) do
- ~H"""
-
- """
- end
-
- @doc """
- Renders an input with label and error messages.
-
- A `Phoenix.HTML.FormField` may be passed as argument,
- which is used to retrieve the input name, id, and values.
- Otherwise all attributes may be passed explicitly.
-
- ## Types
-
- This function accepts all HTML input types, considering that:
-
- * You may also set `type="select"` to render a `