Skip to content

ElectroCRUD v3 Documentation

Garry Lachman edited this page Jun 5, 2023 · 14 revisions

Accounts

The Accounts module plays a crucial role in managing the connection details to the database and serves as a central container for projects within the application. It acts as a foundation for organizing and storing all the relevant data associated with a specific account.

Under the account entity, various pieces of information related to the account are stored. This includes the account's connection details, such as the host address, port number, username, and password, necessary for establishing a secure and reliable connection to the database.

Supported Databases

The application supports the following databases:

  • MySQL / MariaDB
  • SQLite
  • PostgreSQL (Postgres)
  • Microsoft SQL Server

Account Creation

Account creation is the initial and mandatory step that you must complete in order to utilize the application. This process enables you to establish a new account with the necessary information to connect to the desired database.

Please ensure that you have the required credentials and access rights for the selected database before creating an account.

Account Creation Steps:

  1. Select Accounts from the sidebar, then choose Add New.
  2. In the Account Details step, provide an account name (a unique identifier for the account) and select the database software (client) that your database is running on, such as MySQL, SQLite, PostgreSQL, or SQL Server.
  3. In the SSH Tunnel step (if the server database is selected):
    • If you are not using an SSH tunnel, simply click on Save & Continue and proceed to the next step.
    • Toggle the Enable / Disable SSH Tunneling switch to the "on" position.
    • Enter the SSH server details in the provided form.

      Please note that private key authentication is not currently supported, but it will be supported in future updates.

    • Click on Save & Continue to proceed.
  4. In the Database step:
    • If you are using a file-based database like SQLite, click on Choose File and select the appropriate database file.
    • If you are using a server-based database, enter the database server details in the provided form.
    • Click on Save & Continue to proceed.
  5. In the Connectivity step, click on the Test button to perform a connection test for both SSH and the database. If ElectroCRUD successfully establishes a connection, the Finish button will be enabled, allowing you to complete the account creation process.

By following these steps, you can create an account and establish a connection to your desired database, enabling you to use the full functionality of the application.

Select Account

To select the active account or switch to another account, follow these steps:

  1. Click on Accounts in the sidebar.
  2. In the Accounts list, locate the desired account and click on the Menu button (three vertical dots) at the end of the account entry.
  3. From the menu that appears, select Use.
  4. If the account is successfully selected and a connection is established, a notification indicating "connected" will appear in the top right corner, and the status of the account in the list will change to green.

Edit Account

To edit an existing account, perform the following steps:

  1. Click on Accounts in the sidebar.
  2. In the Accounts list, locate the account you want to edit and click on the Menu button (three vertical dots) at the end of the account entry.
  3. From the menu, select Edit.

Delete Account

To delete an account, perform the following steps:

  1. Click on Accounts in the sidebar.
  2. In the Accounts list, find the account you wish to delete and click on the Menu button (three vertical dots) at the end of the account entry.
  3. Choose Delete from the menu.
  4. In the confirmation dialog, click on Delete to confirm the deletion.

Settings

General Settings

Password Protection

The password protection feature allows you to lock the application at startup and by clicking on the Lock icon in the navigation bar.

To enable password protection, follow these steps:

  1. Go to Settings > General > Password.
  2. Toggle the Enabled switch to the "on" position.

Before enabling password protection, you need to change the password by following these steps:

  1. Click on the Change Password button.
  2. Enter a new password.
  3. Click on the Save button.

Data

Policies

Policies are rules applied to the data to protect sensitive information, such as Personally Identifiable Information (PII) ? or Protected Health Information (PHI) ?, from unauthorized access.

ElectroCRUD supports three types of rules:

  1. Full Masking: Replaces all the characters in the data with a selected character. For example, if the character # is selected, 1234 will become ####.
  2. Partial Masking: Replaces a specified number of characters from either the left or right side of the data.
  3. Fake Data: Replaces the original data with generated fake data. The data faker offers various presets, including names, countries, cities, IP addresses, addresses, file names, credit card numbers, and more.

Policies are associated with columns through tags. It is recommended to create specific tags for policies, such as PII.NAME and PII.CC, and avoid using tags created for other purposes.

Edit Policy

To edit an existing policy, perform the following steps:

  1. In the Policies list, locate the policy you want to edit and click on the Menu button (three vertical dots) at the end of the policy entry.
  2. From the menu, select Edit.
Delete Policy

To delete a policy, perform the following steps:

  1. In the Policies list, locate the policy you want to edit and click on the Menu button (three vertical dots) at the end of the policy entry.
  2. Choose Delete from the menu.
  3. In the confirmation dialog, click on Delete to confirm the deletion.

Views

A view is a powerful construct that represents a specific table within the database, complete with its associated configurations, actions, and data display settings. It serves as a virtual representation of the underlying table, allowing users to interact with and manipulate the data in a customized manner.

Each view is directly linked to an account entity, establishing a clear relationship between the view and the account to which it belongs. This enables seamless organization and management of views within the application.

The view entity contains various essential components that contribute to its functionality and behavior. These include external references to the table it represents, ensuring that the view remains connected to the correct underlying data. Additionally, internal references to table columns enable the view to understand and work with the specific data fields within the table.

Metadata associated with the view provides additional information about the view itself, such as its name, description, creation date, and last modification timestamp. Documentation related to the view allows users to provide detailed explanations and instructions for working with the view, enhancing its usability and understanding.

Tags can be assigned to the view, enabling categorization and classification based on specific criteria. Permissions associated with the view determine the actions users can perform on the view, such as read, write, update, or delete, ensuring proper access control and security.

The view entity also supports the use of details view templates, which define the layout and presentation of the view's data. By customizing the details view template, users can tailor the visual representation of the data according to their specific requirements.

Filters provide a means to narrow down the displayed data within the view, allowing users to focus on specific subsets of information based on predefined criteria or user-defined filters.

Terminology settings enable users to define the language used in the view, including singular and plural terms associated with the data. This customization enhances the user experience by aligning the view's terminology with the user's preferences and domain-specific language.

Multiple views can be created for a single table, each with its own set of modifications and applied policies. This flexibility empowers users to create different perspectives and configurations of the same underlying data, catering to various needs and use cases within the application.

View Creation

Before creating a view, ensure that you are connected to an account that has at least one table available.

The view creation process involves two steps: creating the view entity and creating a column entity for each column in the table. When selecting a table, ElectroCRUD retrieves the column list from the database server, including metadata such as column type, maximum length, defaults, etc.

View Creation Steps:

Creation Step
  1. Click on Views in the sidebar, then select Manage Views and choose Add New.
  2. In the Add New View modal, provide a unique view name (identifier) and select the database table you want the view to represent.
  3. Click on the Save button to proceed.
Configuration Step
  1. In the Columns section, enable or disable each column in the view using the Enabled switch. You can also choose to make the column searchable by using the Searchable switch.
  2. In the Terminology section, define the singular and plural terms for the entity.
  3. In the Permissions section, set the permissions for creating, updating, and deleting records. Read permission is always allowed.
  4. Click on the Save button to save the changes.

By following these steps, you can create a new view and configure its properties according to your requirements.

Glossary

Term Description
PII Personally identifiable information
PHI Personal health information
CRUD Create, Read, Update, Delete
Secret Hash Random chars that is combined with your password while encrypting / decrypting. Prevent burtforce attack to detect encryption algorithm
View The view represents the table in the database