crudex alternatives and similar packages
Based on the "Framework Components" category.
Alternatively, view crudex alternatives based on common mentions on social networks and blogs.
-
ex_admin
ExAdmin is an auto administration package for Elixir and the Phoenix Framework -
phoenix_html
Phoenix.HTML functions for working with HTML strings and templates -
phoenix_ecto
Phoenix and Ecto integration with support for concurrent acceptance testing -
absinthe_plug
Plug support for Absinthe, the GraphQL toolkit for Elixir -
phoenix_live_reload
Provides live-reload functionality for Phoenix -
params
Easy parameters validation/casting with Ecto.Schema, akin to Rails' strong parameters. -
phoenix_pubsub_redis
The Redis PubSub adapter for the Phoenix framework -
dayron
A repository `similar` to Ecto.Repo that maps to an underlying http client, sending requests to an external rest api instead of a database -
rummage_phoenix
Full Phoenix Support for Rummage. It can be used for searching, sorting and paginating collections in phoenix. -
phoenix_token_auth
Token authentication solution for Phoenix. Useful for APIs for e.g. single page apps. -
sentinel
DEPRECATED - Phoenix Authentication library that wraps Guardian for extra functionality -
phx_component_helpers
Extensible Phoenix liveview components, without boilerplate -
plug_rails_cookie_session_store
Rails compatible Plug session store -
multiverse
Elixir package that allows to add compatibility layers via API gateways. -
filterable
Filtering from incoming params in Elixir/Ecto/Phoenix with easy to use DSL. -
access pass
provides a full user authentication experience for an API. Includes login,logout,register,forgot password, forgot username, confirmation email and all that other good stuff. Includes plug for checking for authenticated users and macro for generating the required routes. -
scrivener_headers
Scrivener pagination with headers and web linking -
better_params
Cleaner request parameters in Elixir web applications ๐ -
phoenix_pubsub_rabbitmq
RabbitMQ adapter for Phoenix's PubSub layer -
plug_checkup
PlugCheckup provides a Plug for adding simple health checks to your app -
plug_rest
REST behaviour and Plug router for hypermedia web applications in Elixir -
Votex
Implements vote / like / follow functionality for Ecto models in Elixir. Inspired from Acts as Votable gem in Ruby on Rails -
trailing_format_plug
An elixir plug to support legacy APIs that use a rails-like trailing format: http://api.dev/resources.json -
phoenix_html_simplified_helpers
Some helpers for phoenix html( truncate, time_ago_in_words, number_with_delimiter, url_for, current_page? )
ONLYOFFICE Docs โ document collaboration in your environment
Do you think we are missing an alternative of crudex or a related project?
README
Crudex
A glue keeping Phoenix and Ecto together. It has the following features:
- JSON-encoding/decoding of Ecto models
- Dynamic virtual fields for models
- Simplifies creation of CRUD controllers
- User controller for login.
Crudex.Model
By using the Crudex.Model module, like this:
defmodule MyModel do
use Crudex.Model
end
You make your model JSON-encodable using Poison. You should also use Ecto.UUID
, Crudex.JSONBinary
, Ecto.DateTime
instead of :uuid
, :binary
, and :datetime
in your model respectively.
The Crudex.Model also provides the following macros:
crudex_schema
=> is likeschema
from Ecto.Model but defines ID/foreign keys to be UUID and creates timestamps. You should use this if you want to use the CRUD controller functionalities. It also allows using the two macros belowhidden_field
=> creates a regular field which will be excluded when encoding
Example
defmodule Example.User do
use Crudex.Model
crudex_schema "users" do
field :name, :string
field :surname, :string
field :email, :string
hidden_field :salt, Crudex.JSONBinary
hidden_field :password, Crudex.JSONBinary
field :role, :string
end
...
end
Crudex.CrudController
Allows automatic creation of complete or partial CRUD controllers. It even supports user scoping, assuming your model has a user_id
field.
It has two macros
crud_for
=> creates CRUD actions for the given model. Optionally you can specify which actions should be created.defcrud
=> defines a single CRUD action for the given model.
Example
defmodule BookController do
use Crudex.CrudController
plug PlugAuth.Authentication.Token, [source: :params, param: "auth_token"]
plug :action
@ecto_repo MyRepo
@user_scoped true
crud_for(Book)
end
Assuming you have a Book
model, you will get the :index, :create, :show, :update, :delete
actions created for you. Since @user_scoped
is set to true
, all actions will only be applicable for the user currently logged in. This works best in conjunction with plug_auth.
Crudex.UserController
Provides a macro, user_controller
to define a simple user controller. Access control should happen in the controller invoking this macro, using for example plug_auth. It is not very flexible for now, and is more there to show you how to do a complex controller with Crudex.
TODO
There is a lot to do, pagination and filtering is one of the first things. Tests are missing although I have tests in the projects where I use this. Documentation in the code is also missing for now.
LICENSE
Copyright (c) 2014, Michele Balistreri [email protected]
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*Note that all licence references and agreements mentioned in the crudex README section above
are relevant to that project's source code only.