Blank is a drop-in admin panel for your Elixir projects. Derive Blank.Schema on your Ecto schemas, declare admin pages with use Blank.AdminPage, and you get CRUD, filtering, audit logging, imports, exports, and role-based authorization with minimal configuration.
- CRUD admin panels — Automatic index, show, create, and edit pages for your Ecto schemas
- Filtering & search — Advanced search and filter on any field
- Audit logging — Track every mutation with automatic audit trails
- CSV import — Bulk import data from CSV files with automatic validation
- CSV & QR code exports — Built-in exporters with a behaviour for custom exports
- Role-based authorization — Pluggable role system with policy modules and scopes
- Ueberauth integration — Plug-and-play authentication via ueberauth providers
- 10+ field types — Text, Boolean, DateTime, Password, Currency, QRCode, Location, and more
- Statistics dashboard — Summary statistics on admin index pages
- Multi-database support — Works with PostgreSQL and ArangoDB out of the box
1. Add the dependency:
# mix.exs
def deps do
[
{:blank, "~> 0.1.0"}
]
end2. Configure Blank:
# config/config.exs
config :blank,
endpoint: MyApp.Endpoint,
repo: MyApp.Repo,
user_module: MyApp.Accounts.User,
user_table: :users,
use_local_timezone: true3. Install and set up your first admin page:
mix blank.install
mix ecto.migrateDerive Blank.Schema on your Ecto schemas, set up routing with blank_admin and admin_page, and create an admin page module with use Blank.AdminPage. You now have a full CRUD admin panel at /admin/products.
See the Authentication guide for ueberauth provider setup.
Whatever project I made, I would always have to make an admin panel and it got quite annoying remaking the same thing time and time again. So for one project I decided that I would just make an easy to setup and use admin panel. And that is where Blank comes in.
Check out the demo app for a working example with two admin pages (Users and Orders), custom stats, authorization policies, and ueberauth integration.
| Admin index | Edit page | Audit log |
|---|---|---|
Full documentation is available on HexDocs.
See CONTRIBUTING.md for guidelines on contributing to Blank.
See LICENSE for details.