Table of Contents
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.
- Manage your database models with API calls.
- CRUD your data with generated API routes.
- (coming soon) Generate types for your data models.
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.
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
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.
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
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.
Run ./documentation
to spin up the Vitepress server.
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?