1 Star 0 Fork 1

amtech / dber

forked from 辞画. / dber 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

DBER | 基于实体连接图的数据库设计工具

English

网址及演示

https://dber.tech

Demo Gif

功能

  1. 可视化数据库结构设计
  2. 拖拽生成模型引用关系
  3. 一键导出 SQL 语句

技术栈

SVG

Next.js(React)

DBML

ArcoDesign

Dexie(indexDB)

Soul CLI(sqlite db)

开始

克隆本仓库或者下载代码.

安装依赖.

npm install
# or
yarn install

启动开发服务:

npm run dev
# or
yarn dev

使用浏览器打开 http://localhost:3000 查看结果.

在生产模式下运行:

npm run build && npm run start

导出静态页面:

npm run gen

避免刷新时出现 404,服务器需做以下设置(以 Nginx 为例):

server {
    listen       80;
    server_name  dber.local.yes-hr.com;
    root   /{you_projects}/dber/out;
    index index.html;

    location /graphs {
        try_files $uri $uri.html /graphs/[id].html;
    }
}

使用 docker 构建

使用以下命令来构建 Docker 镜像:

docker build -t dber .

然后可以用 Docker 或者 Docker Compose 来启动服务:

docker run -p 3000:3000 dber

或者

docker-compose up -d

使用浏览器打开 http://localhost:3000 查看结果.

协作(简单)功能

使用 Soul CLI 实现简单的在线协作功能,使用的是 sqlite 数据库。注意:

  • 暂时没有权限管理功能,如数据库接口公开,意味着任何人都具有读取、写入权限
  • 不支持编辑操作后的实时同步功能
  • 启动方式:
    • 安装 Soul CLI 包 np install -D soul-cli
    • 编辑 package.json 中的 dbAdaptorsoul,并根据实际情况设置 soulUrl
    • 执行 npm run dev 或者 npm run build && npm run start (docker 方式未经测试)

受到以下作品启发

dbdiagram

antv x6

MIT License Copyright (c) 2020 findyourmagic Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/amtech/dber.git
git@gitee.com:amtech/dber.git
amtech
dber
dber
master

搜索帮助