adminix

Crates.ioadminix
lib.rsadminix
version0.0.2
sourcesrc
created_at2022-01-24 16:52:24.479229
updated_at2022-01-26 17:06:41.526369
descriptionà la django admin for actix - sqlx
homepagehttps://github.com/julienfr112/adminix
repositoryhttps://github.com/julienfr112/adminix
max_upload_size
id520283
size3,790
Julien Fraichard (julienfr112)

documentation

https://docs.rs/adminix

README

Adminix is an à la django admin for actix - sqlx

Getting started

see example/

Strategy / Tradeoffs

Adminix is implemented with procedural macros. A compile type, it introspects the database and builds routes and handlers for the actix server. These handler are simple crud route implemented with SSR, using the Maud templating library. It use the sqlx query! macro to confirm at compilation time that the queries generated by the macro are compatible with the datase.

Pros :

  • Adminix is quite simple by itself : only hundreds lines of code
  • Adminix is quite robust : compilation give lot of assurence of correct behavior
  • It's really easy to add to existing actix / sqlx project where the database is the source of thruth

Cons :

  • adminix is not an rest API so if you want a now classical back/front architecture, you are on your own

  • some

⚠ Very very alpha

A lot of assumption where made :

  • actix "3" and sqlx "4"
  • Sqlite only
  • Every table must have an INTEGER "id" primary key
  • Foreign key only target "id" Also, i'm not a proficient rust developper.

⚠ No embeded security

It's up to the application to ensure authentification. Use gards !

Support / Roadmap

Basic CRUD
sqlite
postgres
mysql ?
foreign key link
save nullable (option)
foreign key edit
reverse foreign key link
filter on back
smart table in front (sort, filter)
home page / template
pagination
image blob support (readonly)
multiple blob file type
testing (proc macro + async = 🤔)
support non id primary key ?
support non id foreign key target ?

Help welcome !

Please, fill issues ! I'm also accepting merge requests, ping me if I'm not reactive enough : ( f"julienfr{ meaning_of_life + 70 }@gmail.com" )

Commit count: 12

cargo fmt