Initial commit
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.idea/
|
||||
output/
|
||||
!output/.gitkeep
|
||||
41
README.md
Normal file
@ -0,0 +1,41 @@
|
||||
# DB Documentation Generator for BTCPay Server
|
||||
This tool allows you to generate interactive documentation for BTCPay Server's database by using [SchemaSpy](https://github.com/schemaspy/schemaspy).
|
||||
|
||||
## Requirements
|
||||
- A running database to analyse (settings are in `schemaspy.properties`)
|
||||
- Docker
|
||||
|
||||
## How to generate?
|
||||
1. Start a local development setup of BTCPay Server (typically `docker-compose up dev`)
|
||||
2. Run the shell script `generate.sh`
|
||||
3. The output will be generated in `/output`
|
||||
|
||||
## How to view?
|
||||
- Navigate to `/output/index.html` with your browser.
|
||||
|
||||
## Notes
|
||||
- This script generates output with SVG images. If you prefer PNG, you can change `schemaspy.properties` to do so.
|
||||
- A full DB drawing is available at `/output/diagrams/summary/relationships.real.large.svg`
|
||||
|
||||
## Screenshots
|
||||
Some screenshots of the output you'll get.
|
||||
### Tables
|
||||

|
||||
|
||||
### Columns
|
||||

|
||||
|
||||
### Constraints
|
||||

|
||||
|
||||
### Relationships
|
||||

|
||||
|
||||
### Utility
|
||||

|
||||
|
||||
### Anomalies
|
||||

|
||||
|
||||
### Routines
|
||||

|
||||
BIN
drivers/postgresql-42.2.22.jar
Normal file
8
generate.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd "$DIR"
|
||||
|
||||
mkdir -p output
|
||||
|
||||
docker run -v "$PWD/output:/output" -v "$PWD/schemaspy.properties:/schemaspy.properties" -v "$PWD/drivers:/drivers" --network="host" schemaspy/schemaspy:snapshot
|
||||
BIN
images/screenshot1.png
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
images/screenshot2.png
Normal file
|
After Width: | Height: | Size: 270 KiB |
BIN
images/screenshot3.png
Normal file
|
After Width: | Height: | Size: 342 KiB |
BIN
images/screenshot4.png
Normal file
|
After Width: | Height: | Size: 282 KiB |
BIN
images/screenshot5.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
images/screenshot6.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
images/screenshot7.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
0
output/.gitkeep
Normal file
9
schemaspy.properties
Normal file
@ -0,0 +1,9 @@
|
||||
schemaspy.t=pgsql
|
||||
schemaspy.host=127.0.0.1
|
||||
schemaspy.port=39372
|
||||
schemaspy.db=btcpayserver
|
||||
schemaspy.u=postgres
|
||||
schemaspy.p=postgres
|
||||
schemaspy.s=public
|
||||
schemaspy.imageformat=svg
|
||||
schemaspy.hq=true
|
||||