Skip to content

lundjrl/data-management-tool

Repository files navigation

Data Management Tool's mascot

Data Management Tool

A small, organized, schema management API

Relevant Links
  1. Postman
  2. Roadmap
Table of Contents
  1. About
  2. Documentation
  3. FAQ

🕷️ About

The Data Management Tool (DMT) is a self-hosted API that allows folks with little to no database experience to manage their database.

The goal is you never have to write SQL. Just CRUD your models with API calls.

After creating a new model, enjoy CRUD endpoints automatically generated for you.

Features

  1. Manage your database models with API calls.
  2. CRUD your data with generated API routes.
  3. (coming soon) Generate types for your data models.

📚 Documentation

Getting Started

To get started make sure you have Docker installed. After that's done, spin up the API and Database containers with

./start

and navigate to http://localhost:4000/ with your browser to see the API running.

API docs

Scalar UI is enabled by default to showcase the REST API. Check it out at http://localhost:4000/docs

We additionally expose an openAPI doc at http://localhost:4000/docs/json

Adding ENV variables

By default, DMT asks you to create a .env file from the .env.example file in this repo. Out of the box, the port and a PostgreSQL query string is already mapped for you.

All new Env vars need to be added to .env as well as typed in ./env.ts for type safety.

Setting up a database

Running the start command should spin up an empty postgres database for you.

To apply the prisma/schema.prisma db schema to postgres, run ./bun run db:schema:push

To overwrite the prisma schema with your local db, run ./bun run db:schema:pull

For general prisma help, run ./bun run db:help


Generating Types

We're working on generating types for the API endpoints. These types can either be consumed in a custom SDK or within your project.

Invoking http://localhost:4000/orm/introspect will return a text output of generated function types for the nested functions inside of the schema endpoints. We're working on extending this type generation to the outer routes.

Running documentation

Run ./documentation to spin up the Vitepress server.


Frequently Asked Questions

What's up with the spider mascot?

  • Bold Jumping Spiders (Phidippus Audax) are organized, intelligent, and beautiful creatures. I picked the mascot to represent the mindset of keeping a database clean and tidy ¯\_(ツ)_/¯ Did you know they can dream?

About

API tool for managing database schemas, CRUD data, and much more to come.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •