Skip to content
项目

关于

可视化你的 Prisma schema!

网站与应用开发

这些数字如何统计

实测星标增长

24小时
+1
7天
+1
15天
+1
1个月
+3

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Visualise your Prisma schema - Prismaliser


Prismaliser is a visualisation webapp for Prisma schemas. It allows you to visually explore your schema and the relations between your models, by showing links between the different types of relations in the schema (many-to-many, one-to-many, one-to-one), similar to an Entity-relationship model.

Prismaliser is a fully open-source, fully client-side web application — parsing and rendering all happen in your browser via Prisma's schema WASM module. It's easily self-hostable as plain static files if you wish to, but a hosted version is also available at prismaliser.app if you just want to use it instead.

Installation

Prismaliser is a Vite single-page application, and as such it requires Node.js (24+) to be installed in order to build it. Yarn is also recommended as it has a (subjectively) nicer CLI interface.

With Node installed, and the repository cloned, you can simply run the following commands to get it running:

yarn install  # or `npm install`
yarn build    # or `npm run build`
yarn start    # or `npm start`

The build outputs plain static files to dist/, so you can also serve that directory with any static file server of your choice instead of yarn start (which uses vite preview).

Or if you're looking to run it for development purposes, you can use the following commands instead:

yarn install  # or `npm install`
yarn dev      # or `npm run dev`

Docker

A Docker image is also available if that's more your thing. Set the public HTTPS origin so the container can serve valid AT Protocol OAuth metadata:

$ docker run -p 3000:80 \
    -e PRISMALISER_ORIGIN=https://your-public-origin.example \
    ghcr.io/ovyerus/prismaliser

The value must be the exact public HTTPS origin without a trailing slash. If it is omitted or invalid, account connection is disabled; local editing, schema-only links, and legacy links remain available.

AT Protocol sharing

When you publish a diagram, Prismaliser creates a public immutable record in your own AT Protocol repository and uploads the Prisma schema as a public text/plain blob. Shared records contain the blob reference and node positions, so anyone with the link can view the same diagram. Both the record and schema blob are public; check for passwords, connection strings, and other secrets first.

Schema-only links require no account and remain supported for old links. To self-host on plain static hosting, replace oauth-client-metadata.json with the same metadata values using your exact HTTPS origin for client_id, client_uri, and redirect_uris. Docker hosts should use PRISMALISER_ORIGIN as shown above.

Prismaliser never asks for a password or an app password. Account connection uses the AT Protocol browser OAuth flow and the provider's own authorisation page.

Roadmap

This is a list of what I've currently got planned for the future. I'm open to accepting PRs for any of these, but I'd prefer it if you could first open an issue regarding it so we can discuss it/make sure there's not multiple people working on the same thing.

I'm also open to PRs for other features not listed here, but also please open a corresponding issue to discuss it, just like above.

  • Multi-history support through the My shares manager.
  • Sharing schema-only links and immutable public AT Protocol snapshots.
  • Saving and restoring node positions in shared snapshots.
  • Autocomplete for the editor (very big, Monaco is a bit fiddly at times, would probably need to do some looking at the VSCode plugin for Prisma to figure out some stuff).

License

Prismaliser is licensed under the MIT License - see the LICENSE file for details.

探索相关项目

加载中…