Diwata
Diwata is a database interface for PostgreSQL with the goal of being usable, user-friendly with its basic and advanced functionality be discoverable by the user. Goal of diwata is to be a replacement of back-end admin without explicitly writing the code for it. It is content aware, and renders records as it sees fits. An attempt to create back-end to end all back-ends.
Features
- Automatic display of direct and indirect linked record
- Freeze column and freeze rows
- Infinite scrolling / loading of page on scrolling
- User friendly granular search and filter
- Diplay descriptive referred records. (ie: Instead of displaying the foreign_key value integer or uuid, display the referred records in such a way it is distinguisable by the user)
- Well integrated with the browsers, clickable tables, records and tabs can be openned in a new window and displays the data as though clicking on it.
Distinguisable referred record in a dropdown

Dynamic toolbar displaying the exact information of what the button actually does

Navigating through the apps and opening other window in another browser window/tab is seamless

Binary data detected as images would be rendered as such

Demo - Sakila (films) using the sakila database example
Demo - airlines (russian) russian airlines booking database
Demo - Dota2 heroes using dota2 hero and abilities data
Quickstart
If you have an existing postgresql database, you can quickly open it using the app by:
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
cargo install diwata_cli
diwata_cli --db-url postgres://user:passwd@localhost:5432/dbname -p 8000 --openYou can also open sqlite database. Download this sqlite sample db You can then open it by issuing the command
diwata_cli --db-url sqlite://sakila.db -p 80001 --open
Build from source
Needed Dependencies
- rust nightly
- elm v0.18 ( elm installation needed npm or yarn)
- rsync ( for fast syncing files over and over )
- google-closure-compiler (optional, for release build)
- sed (search and replace
app.jswithapp.min.jsinindex.html - sakila database (for demo and testing) [1]
- build-essential (for compiling c based dependencies such as sqlite-src)
Install Dependencies
curl https://sh.rustup.rs -sSf | sh
sudo apt install rsync build-essential pkg-config
npm install -g elm@0.18
npm install -g google-closure-compiler-js
Compile and run
git clone https://github.com/ivanceras/diwata
cd diwata
git submodule update --init --recursive
rustup self update && rustup update
rustup override set nightly
cd webclient && ./compile.sh && cd ..
cargo run -p diwata -- --dburl <db_url>
Note: You need to use the latest nightly.
Specify a database ( sakila database example )
cargo run -p diwata_server -- --dburl postgres://postgres:passwd@localhost:5432/sakila -p 8000
see run.sh for the accurate content of command
Then visit http://localhost:8000/
Content Aware
Using heristic method, diwata is able to infer the content of a table.
- When it a column is a boolean it make sense to display it with a checkbox rather than just 'true' and 'false'. Dates will be rendered with a dropdown calender.
- Country lookup will be rendered with a dropdown list of country alongside their flags
- Images will be displayed in line when in grid view, and will be fully displayed when in card view
- Attachments such as pdf,xls,csv,svg,md,txt,source codes will be rendered to their corresponding document editors
- Urls are linked and clickable automatically
- Embed common web objects: youtube videos, tweets, images, map locations
Roadmap checklist:
- Infinite load-on-deman scrolling
- Meaningful dropdown lookup
- Seamless url-based navigation
- Delete records
- Update records
- Insert records
- Detail record update/insert, delete link detail records [X] Filtering and searching on has_many and indirect records for detailed record
- Undo update/delete records (upon deletion/modification, user have a grace period to undo the changes)
- Search and filter data
- Drag/Rearrange and resize columns
- Multi column sorting
- Smart delete cascade messages
- Error Handling/Error messages display
- Advanced filtering, where user can type in the logic for filtering
- Display of images and file attachments
- Interactive/dynamic record count indicator for toolbar buttons
- Loading indicators
- Page transition animation
- Search/filter on tables
- Table/Columns filtering based on privilege system.
- Display only tables that the user has privilege
- Display only columns that the user has privilege
- An interface for superusers to set user privileges for each tables
- Row level security
- When the server is configured to require user login, the user will be forced to login
Next iteration development
- Plugin and module system
- Custom validation on field
- Custom buttons for application specific functionality
Notes:
[1]: You can use sakila database dump as demo database https://github.com/ivanceras/sakila
Patreon:
Please support me on patreon, so I can dedicate more time to the development of this project
Contact me:
ivanceras [a t] gmail.com
Contributors
This project exists thanks to all the people who contribute.
Backers
Thank you to all our backers!
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]




