Skip to content

fortembr/datasmyth-database-viewer

Repository files navigation

Contributors Forks Stargazers Issues


Logo

DataSmyth - Database Viewer

DataSmyth is a Fort Embr brand/product. We had a requirement to use a DB viewer tool. We built this as a prototype for quick use in localhost.

Bugs · Discord Community

Table of Contents
  1. About The Project
  2. Usage
  3. Roadmap
  4. Contributing
  5. Acknowledgments

About The Project

We needed a DB viewer tool for a project. In researching this tool, we found DB Docs. While this tool was exactly what we were looking for, there was one feature missing, self-hosting the project. The security requirements of this project forced our hand on a need to self-host. So, we threw this together fairly quickly so that we've have an internal tool.

(back to top)

Built With

Below are the major frameworks/libraries that are currently used in this project, or soon to be added in a future release.

In Use:

Coming Soon/ Considering:

(back to top)

Usage

Usage docs coming soon. Here are a couple of screenshots of what it looks like.

Screen Shot 2023-02-10 at 19 28 16

Screen Shot 2023-02-10 at 19 28 47

JSON Data Example

{
  "projectName": "MyTacoFund",
  "databaseType": "PostgreSQL",
  "projectNotes": "",
  "enumList": [
    {
      "name": "EnumAccountRole",
      "options": ["employeeAdmin", "employeeSuperAdmin", "creator", "supporter"]
    },

    {
      "name": "EnumAccountStatus",
      "options": ["active", "archvied", "hold", "inactive"]
    },

    {
      "name": "EnumProductType",
      "options": ["single", "subscription"]
    }
  ],
  "tableList": [
    {
      "name": "account",
      "id": {
        "type": "uuid",
        "primaryKey": true
      },
      "firstName": { "type": "text", "nullable": false },
      "lastName": { "type": "text", "nullable": false },
      "email": { "type": "text", "unique": true, "nullable": false },
      "phone": { "type": "text" },
      "password": { "type": "text" },
      "address": { "type": "jsonb", "nullable": true, "default": "null" },
      "socialProfiles": { "type": "jsonb", "nullable": true, "default": "null" },
      "accountRole": { "type": "enum", "enumDefined": "EnumAccountRole", "default": "supporter" },
      "accountStatus": { "type": "enum", "enumDefined": "EnumAccountStatus", "default": "active" },
      "accountVerified": { "type": "jsonb", "nullable": true, "default": "null" },
      "isActive": { "type": "boolean", "default": "true" },
      "passwordChangedAt": { "type": "date", "nullable": true, "default": "null" },
      "passwordResetToken": { "type": "text", "nullable": true, "default": "null" },
      "passwordResetExpires": { "type": "date", "nullable": true, "default": "null" },
      "recordCreated": { "type": "timestamp", "default": "new Date.now()" },
      "recordUpdated": { "type": "timestamp", "nullable": true, "default": "null" },
      "productList": {
        "type": "jsonb",
        "ref": {
          "refType": "<",
          "refField": "products.id"
        }
      }
    },
    {
      "name": "products",
      "id": {
        "type": "uuid",
        "primaryKey": true
      },
      "title": { "type": "text", "nullable": false },
      "image": { "type": "text", "nullable": false },
      "description": { "type": "text" },
      "productType": { "type": "enum", "enumDefined": "EnumProductType", "default": "single" },
      "priceUnit": { "type": "int", "nullable": false, "default": 5 },
      "recordCreated": { "type": "timestamp", "default": "new Date.now()" },
      "recordUpdated": { "type": "timestamp", "nullable": true, "default": null },
      "accountID": {
        "type": "uuid",
        "ref": {
          "refType": ">",
          "refField": "account.id"
        }
      }
    },
    {
      "name": "orders",
      "id": {
        "type": "uuid",
        "primaryKey": true
      },
      "customerID": {
        "type": "uuid",
        "ref": {
          "refType": "<>",
          "refField": "account.id"
        },
        "default": null
      },
      "productID": {
        "type": "uuid",
        "ref": {
          "refType": "<>",
          "refField": "products.id"
        }
      },
      "totalCost": { "type": "int", "nullable": false, "default": 0 },
      "recordCreated": { "type": "timestamp", "default": "new Date.now()" },
      "recordUpdated": { "type": "timestamp", "nullable": true, "default": null }
    }
  ]
}

(back to top)

Roadmap

Not in use. Submit a feature request via the repo issues section for now.

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Acknowledgments

Without these people and tools, life would be too complicated.

(back to top)