Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .formatter.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ locals_without_parens = [

[
line_length: 120,
import_deps: [:ecto, :phoenix, :ash, :ash_postgres],
import_deps: [:ecto, :phoenix],
plugins: [TailwindFormatter, Phoenix.LiveView.HTMLFormatter, Quokka],
inputs: ["*.{heex,ex,exs}", "priv/*/seeds.exs", "{config,lib,test}/**/*.{heex,ex,exs}"],
locals_without_parens: locals_without_parens,
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The root directory contains the Backpex library itself, which is published as a

```
lib/backpex/
├── adapters/ # Data layer adapters (Ecto, Ash)
├── adapters/ # Data layer adapters (Ecto)
├── controllers/ # Phoenix controllers (cookie management)
├── fields/ # Built-in field types (Text, Number, Date, BelongsTo, HasMany, etc.)
├── filters/ # Built-in filter types (Boolean, Select, Range, etc.)
Expand Down Expand Up @@ -72,7 +72,7 @@ assets/js/ # JavaScript for LiveView hooks

The library provides:
- **Core abstractions**: `LiveResource`, `Field`, `Filter`, `ItemAction`, `ResourceAction`, `Metric`
- **Adapter system**: Pluggable data layer support (Ecto, Ash)
- **Adapter system**: Pluggable data layer support (Ecto by default, Ash via community project [ash_backpex](https://github.com/enoonan/ash_backpex))
- **UI components**: Reusable Phoenix Components for rendering admin interfaces
- **Routing helpers**: Macros for defining RESTful LiveView routes

Expand Down
4 changes: 2 additions & 2 deletions demo/.formatter.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
line_length: 120,
import_deps: [:ecto, :phoenix, :backpex, :ash, :ash_postgres],
plugins: [Spark.Formatter, TailwindFormatter, Phoenix.LiveView.HTMLFormatter, Quokka],
import_deps: [:ecto, :phoenix, :backpex],
plugins: [TailwindFormatter, Phoenix.LiveView.HTMLFormatter, Quokka],
inputs: ["*.{heex,ex,exs}", "priv/*/seeds.exs", "{config,lib,test}/**/*.{heex,ex,exs}"],
subdirectories: ["priv/*/migrations"],
quokka: [
Expand Down
29 changes: 0 additions & 29 deletions demo/config/config.exs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import Config

config :ash, :policies, no_filter_static_forbidden_reads?: false
config :ash, include_embedded_source_by_default?: false, default_page_type: :keyset

config :backpex,
pubsub_server: Demo.PubSub,
translator_function: {DemoWeb.CoreComponents, :translate_backpex},
Expand All @@ -24,7 +21,6 @@ config :demo, DemoWeb.Gettext, default_locale: "en"
config :demo,
namespace: Demo,
ecto_repos: [Demo.Repo],
ash_domains: [Demo.Helpdesk],
generators: [binary_id: true]

config :esbuild,
Expand Down Expand Up @@ -57,31 +53,6 @@ config :sentry,
enable_source_code_context: true,
root_source_code_paths: [File.cwd!()]

config :spark,
formatter: [
remove_parens?: true,
"Ash.Resource": [
section_order: [
:postgres,
:resource,
:code_interface,
:actions,
:policies,
:pub_sub,
:preparations,
:changes,
:validations,
:multitenancy,
:attributes,
:relationships,
:calculations,
:aggregates,
:identities
]
],
"Ash.Domain": [section_order: [:resources, :policies, :authorization, :domain, :execution]]
]

config :tailwind,
version: "4.1.17",
default: [
Expand Down
11 changes: 0 additions & 11 deletions demo/lib/demo/ash_factory.ex

This file was deleted.

24 changes: 0 additions & 24 deletions demo/lib/demo/helpdesk/ticket.ex

This file was deleted.

13 changes: 3 additions & 10 deletions demo/lib/demo/repo.ex
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
defmodule Demo.Repo do
use AshPostgres.Repo,
otp_app: :demo

def installed_extensions do
["ash-functions"]
end

def min_pg_version do
%Version{major: 16, minor: 0, patch: 0}
end
use Ecto.Repo,
otp_app: :demo,
adapter: Ecto.Adapters.Postgres
end
9 changes: 0 additions & 9 deletions demo/lib/demo/support.ex

This file was deleted.

6 changes: 0 additions & 6 deletions demo/lib/demo_web/components/layouts/admin.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@
<Backpex.HTML.CoreComponents.icon name="hero-tag" class="size-5" /> Tags
</Backpex.HTML.Layout.sidebar_item>
</Backpex.HTML.Layout.sidebar_section>
<Backpex.HTML.Layout.sidebar_section id="helpdesk">
<:label>Helpdesk</:label>
<Backpex.HTML.Layout.sidebar_item current_url={@current_url} navigate="/admin/tickets">
<Backpex.HTML.CoreComponents.icon name="hero-book-open" class="size-5" /> Tickets
</Backpex.HTML.Layout.sidebar_item>
</Backpex.HTML.Layout.sidebar_section>
</:sidebar>
<Backpex.HTML.Layout.flash_messages flash={@flash} />
{render_slot(@inner_block)}
Expand Down
46 changes: 0 additions & 46 deletions demo/lib/demo_web/live/ticket_live.ex

This file was deleted.

1 change: 0 additions & 1 deletion demo/lib/demo_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ defmodule DemoWeb.Router do
live_resources "/addresses", AddressLive
live_resources "/film-reviews", FilmReviewLive
live_resources "/short-links", ShortLinkLive
live_resources "/tickets", TicketLive
end
end
end
3 changes: 0 additions & 3 deletions demo/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ defmodule Demo.MixProject do
{:tailwind_formatter, "~> 0.4.0", only: [:dev, :test], runtime: false},
{:lazy_html, "~> 0.1.3", only: :test},
{:ex_machina, "~> 2.3"},
{:smokestack, "~> 0.9.2"},
{:faker, "~> 0.18"},
{:phoenix_test, "~> 0.9.0", only: :test, runtime: false},
{:phoenix_test_playwright, "~> 0.9.0", only: :test, runtime: false},
Expand Down Expand Up @@ -78,8 +77,6 @@ defmodule Demo.MixProject do
{:ecto_psql_extras, "~> 0.8"},
{:csv, "~> 3.2.0"},
{:jason, ">= 1.0.0"},
{:ash, "~> 3.0"},
{:ash_postgres, "~> 2.6.0"},
{:money, "~> 1.14"},

# assets
Expand Down
Loading
Loading