added a little bit of a docs

This commit is contained in:
Artur Mukhamadiev 2026-02-22 20:01:07 +03:00
parent 5523eb3d1f
commit 5d97367308
2 changed files with 211 additions and 0 deletions

24
docker-compose.yml Normal file
View File

@ -0,0 +1,24 @@
version: "3.8"
services:
db:
image: postgres
restart: always
shm_size: 128mb
ports:
- 5432:5432
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- pgdata:/var/lib/postgresql/data
adminer:
image: adminer
restart: always
ports:
- 8080:8080
volumes:
pgdata: {}

187
docs/DBDiagram.drawio Normal file
View File

@ -0,0 +1,187 @@
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36" version="29.5.0">
<diagram name="Страница-1" id="cXR3mElKw8X601OjLrga">
<mxGraphModel dx="1188" dy="633" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="mHfKE7zXGNaunOq52Vvf-1" parent="1" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" value="Stories" vertex="1">
<mxGeometry height="210" width="306" x="310" y="50" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-2" parent="mHfKE7zXGNaunOq52Vvf-1" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" value="" vertex="1">
<mxGeometry height="30" width="306" y="30" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-3" parent="mHfKE7zXGNaunOq52Vvf-2" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;" value="PK" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-4" parent="mHfKE7zXGNaunOq52Vvf-2" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;" value="ID" vertex="1">
<mxGeometry height="30" width="276" x="30" as="geometry">
<mxRectangle height="30" width="276" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-5" parent="mHfKE7zXGNaunOq52Vvf-1" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" value="" vertex="1">
<mxGeometry height="30" width="306" y="60" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-6" parent="mHfKE7zXGNaunOq52Vvf-5" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" value="FK" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-7" parent="mHfKE7zXGNaunOq52Vvf-5" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" value="ClientID : UUID" vertex="1">
<mxGeometry height="30" width="276" x="30" as="geometry">
<mxRectangle height="30" width="276" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-8" parent="mHfKE7zXGNaunOq52Vvf-1" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" value="" vertex="1">
<mxGeometry height="30" width="306" y="90" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-9" parent="mHfKE7zXGNaunOq52Vvf-8" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" value="" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-10" parent="mHfKE7zXGNaunOq52Vvf-8" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" value="Content : TEXT ; NOT NULL" vertex="1">
<mxGeometry height="30" width="276" x="30" as="geometry">
<mxRectangle height="30" width="276" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-11" parent="mHfKE7zXGNaunOq52Vvf-1" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" value="" vertex="1">
<mxGeometry height="30" width="306" y="120" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-12" parent="mHfKE7zXGNaunOq52Vvf-11" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" value="" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-13" parent="mHfKE7zXGNaunOq52Vvf-11" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" value="Grade: INTEGER ; &amp;gt;=0" vertex="1">
<mxGeometry height="30" width="276" x="30" as="geometry">
<mxRectangle height="30" width="276" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-30" parent="mHfKE7zXGNaunOq52Vvf-1" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1">
<mxGeometry height="30" width="306" y="150" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-31" parent="mHfKE7zXGNaunOq52Vvf-30" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-32" parent="mHfKE7zXGNaunOq52Vvf-30" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" value="Created:&amp;nbsp;TIMESTAMPTZ ; DEFAULT now()" vertex="1">
<mxGeometry height="30" width="276" x="30" as="geometry">
<mxRectangle height="30" width="276" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-33" parent="mHfKE7zXGNaunOq52Vvf-1" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1">
<mxGeometry height="30" width="306" y="180" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-34" parent="mHfKE7zXGNaunOq52Vvf-33" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-35" parent="mHfKE7zXGNaunOq52Vvf-33" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" value="Extra: JSONB ; DEFAULT {}" vertex="1">
<mxGeometry height="30" width="276" x="30" as="geometry">
<mxRectangle height="30" width="276" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-14" parent="1" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" value="Users" vertex="1">
<mxGeometry height="90" width="180" x="40" y="60" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-15" parent="mHfKE7zXGNaunOq52Vvf-14" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" value="" vertex="1">
<mxGeometry height="30" width="180" y="30" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-16" parent="mHfKE7zXGNaunOq52Vvf-15" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;" value="PK" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-17" parent="mHfKE7zXGNaunOq52Vvf-15" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;" value="ClientID" vertex="1">
<mxGeometry height="30" width="150" x="30" as="geometry">
<mxRectangle height="30" width="150" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-18" parent="mHfKE7zXGNaunOq52Vvf-14" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" value="" vertex="1">
<mxGeometry height="30" width="180" y="60" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-19" parent="mHfKE7zXGNaunOq52Vvf-18" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" value="" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-20" parent="mHfKE7zXGNaunOq52Vvf-18" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" value="oauth2" vertex="1">
<mxGeometry height="30" width="150" x="30" as="geometry">
<mxRectangle height="30" width="150" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-36" edge="1" parent="1" source="mHfKE7zXGNaunOq52Vvf-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" target="mHfKE7zXGNaunOq52Vvf-15">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-51" edge="1" parent="1" source="mHfKE7zXGNaunOq52Vvf-38" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" target="mHfKE7zXGNaunOq52Vvf-2">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-37" parent="1" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" value="StoryTags" vertex="1">
<mxGeometry height="90" width="180" x="670" y="260" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-38" parent="mHfKE7zXGNaunOq52Vvf-37" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" value="" vertex="1">
<mxGeometry height="30" width="180" y="30" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-39" parent="mHfKE7zXGNaunOq52Vvf-38" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=0;overflow=hidden;whiteSpace=wrap;html=1;" value="FK" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-40" parent="mHfKE7zXGNaunOq52Vvf-38" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=4;overflow=hidden;whiteSpace=wrap;html=1;" value="StoryID" vertex="1">
<mxGeometry height="30" width="150" x="30" as="geometry">
<mxRectangle height="30" width="150" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-41" parent="mHfKE7zXGNaunOq52Vvf-37" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" value="" vertex="1">
<mxGeometry height="30" width="180" y="60" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-42" parent="mHfKE7zXGNaunOq52Vvf-41" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" value="FK" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-43" parent="mHfKE7zXGNaunOq52Vvf-41" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" value="Tag" vertex="1">
<mxGeometry height="30" width="150" x="30" as="geometry">
<mxRectangle height="30" width="150" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-44" parent="1" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" value="StoryTags" vertex="1">
<mxGeometry height="90" width="210" x="358" y="290" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-45" parent="mHfKE7zXGNaunOq52Vvf-44" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" value="" vertex="1">
<mxGeometry height="30" width="210" y="30" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-46" parent="mHfKE7zXGNaunOq52Vvf-45" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;" value="PK" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-47" parent="mHfKE7zXGNaunOq52Vvf-45" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;" value="ID" vertex="1">
<mxGeometry height="30" width="180" x="30" as="geometry">
<mxRectangle height="30" width="180" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-48" parent="mHfKE7zXGNaunOq52Vvf-44" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" value="" vertex="1">
<mxGeometry height="30" width="210" y="60" as="geometry" />
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-49" parent="mHfKE7zXGNaunOq52Vvf-48" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" value="" vertex="1">
<mxGeometry height="30" width="30" as="geometry">
<mxRectangle height="30" width="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-50" parent="mHfKE7zXGNaunOq52Vvf-48" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" value="Name : TEXT ; NOT NULL" vertex="1">
<mxGeometry height="30" width="180" x="30" as="geometry">
<mxRectangle height="30" width="180" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="mHfKE7zXGNaunOq52Vvf-52" edge="1" parent="1" source="mHfKE7zXGNaunOq52Vvf-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" target="mHfKE7zXGNaunOq52Vvf-45">
<mxGeometry relative="1" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>