End-to-end Phoenix + LiveView application used to develop, exercise, and validate Corex UI components.
This application acts as examples and tests for different rendering and interaction modes, as well as for end-to-end and accessibility testing.
Clone the Corex repository and move into the E2E application:
git clone https://github.com/corex-ui/corex
cd corex/e2e- Elixir ~> 1.17
- Erlang/OTP compatible with Elixir 1.17 (CI runs 1.17 / OTP 26 and 1.18 / OTP 27–28)
- PostgreSQL (running locally)
Make sure PostgreSQL is running before continuing.
Create and migrate the database:
mix ecto.setupThis will:
- Create the database
- Run migrations
mix setupThis will:
- Fetch Elixir dependencies
- Install Tailwind and Esbuild
- Build frontend assets
mix phx.serverThen visit:
http://localhost:4000
Build and run in prod mode locally (same DB as dev for a quick check):
# From the corex repo root: build Corex assets
cd .. && mix assets.build && cd e2e
# Set required prod env (use dev DB for local test)
export SECRET_KEY_BASE=$(mix phx.gen.secret)
export DATABASE_URL="ecto://postgres:postgres@localhost/e2e_dev"
# Build digested assets and run
MIX_ENV=prod mix assets.deploy
MIX_ENV=prod mix phx.serverThen open http://localhost:4000. Prod uses digested, minified assets (smaller app.js and chunks).
This project is not a library. It exists to:
- Showcase Corex UI components in realistic usage scenarios
- Validate LiveView + JS hook integration
- Test controlled and uncontrolled component behavior
- Exercise async and loading states
- Run E2E and accessibility tests
Components are demonstrated using several architectural patterns:
Classic Phoenix controller + template examples.
Used to validate server-rendered HTML and progressive enhancement.
Standard LiveView implementations where components manage state through assigns and LiveView events.
Examples where component state is fully controlled by LiveView, typically by passing explicit values (e.g. value, open, checked).
Used to test synchronization, external state updates, and edge cases.
Examples that introduce asynchronous behavior, such as delayed data loading or background updates, to ensure components behave correctly under non-instant conditions.
Run the full test suite:
mix testThis includes:
- LiveView tests
- Wallaby browser-based E2E tests
- Accessibility audits