Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DATABASE_URL="postgresql://admin:admin@localhost:5432/tournamentsdb?schema=public"
SERVER_PORT=3000
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
# Keep environment variables out of version control
1 change: 1 addition & 0 deletions Insomnia/Endpoints_test.json

Large diffs are not rendered by default.

125 changes: 125 additions & 0 deletions UML/Tournaments.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<mxfile host="65bd71144e">
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
<mxGraphModel dx="898" dy="429" 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="WIyWlLk6GJQsqaUBKTNV-0"/>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0"/>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--17" value="Partner" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="508" y="120" width="160" height="120" as="geometry">
<mxRectangle x="550" y="140" width="160" height="26" as="alternateBounds"/>
</mxGeometry>
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--18" value="Id" style="text;align=left;verticalAlign=bottom;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=none;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1">
<mxGeometry y="26" width="160" height="26" as="geometry"/>
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--19" value="Name" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1">
<mxGeometry y="52" width="160" height="26" as="geometry"/>
</mxCell>
<mxCell id="zkfFHV4jXpPFQw0GAbJ--20" value="Url" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1">
<mxGeometry y="78" width="160" height="26" as="geometry"/>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-1" value="Promotion" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="190" y="110" width="160" height="150" as="geometry">
<mxRectangle x="550" y="140" width="160" height="26" as="alternateBounds"/>
</mxGeometry>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-2" value="Id" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="fbeXNlo2uII11yk1rjKD-1" vertex="1">
<mxGeometry y="26" width="160" height="26" as="geometry"/>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-3" value="Name" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="fbeXNlo2uII11yk1rjKD-1" vertex="1">
<mxGeometry y="52" width="160" height="26" as="geometry"/>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-4" value="Url" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="fbeXNlo2uII11yk1rjKD-1" vertex="1">
<mxGeometry y="78" width="160" height="26" as="geometry"/>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-5" value="PartnerId" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="fbeXNlo2uII11yk1rjKD-1" vertex="1">
<mxGeometry y="104" width="160" height="26" as="geometry"/>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="fbeXNlo2uII11yk1rjKD-9" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="260" y="260" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-9" value="Tournament" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="190" y="320" width="140" height="170" as="geometry">
<mxRectangle x="200" y="320" width="100" height="30" as="alternateBounds"/>
</mxGeometry>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-10" value="Id" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="fbeXNlo2uII11yk1rjKD-9" vertex="1">
<mxGeometry y="26" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-11" value="Name" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="fbeXNlo2uII11yk1rjKD-9" vertex="1">
<mxGeometry y="52" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-12" value="PromotionId" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="fbeXNlo2uII11yk1rjKD-9" vertex="1">
<mxGeometry y="78" width="140" height="32" as="geometry"/>
</mxCell>
<mxCell id="3" value="EndDate" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="fbeXNlo2uII11yk1rjKD-9" vertex="1">
<mxGeometry y="110" width="140" height="30" as="geometry"/>
</mxCell>
<mxCell id="2" value="StartDate" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="fbeXNlo2uII11yk1rjKD-9" vertex="1">
<mxGeometry y="140" width="140" height="30" as="geometry"/>
</mxCell>
<mxCell id="MNKzbo34czanW5nM5OoP-0" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="fbeXNlo2uII11yk1rjKD-18" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="330" y="360" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-18" value="Ranking" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="528" y="320" width="140" height="138" as="geometry"/>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-19" value="id" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="fbeXNlo2uII11yk1rjKD-18" vertex="1">
<mxGeometry y="26" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-20" value="TournametId" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="fbeXNlo2uII11yk1rjKD-18" vertex="1">
<mxGeometry y="52" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-15" value="StartDate" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="fbeXNlo2uII11yk1rjKD-18" vertex="1">
<mxGeometry y="78" width="140" height="30" as="geometry"/>
</mxCell>
<mxCell id="fbeXNlo2uII11yk1rjKD-16" value="EndDate" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="fbeXNlo2uII11yk1rjKD-18" vertex="1">
<mxGeometry y="108" width="140" height="30" as="geometry"/>
</mxCell>
<mxCell id="MNKzbo34czanW5nM5OoP-1" value="Postion" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="560" y="570" width="140" height="208" as="geometry"/>
</mxCell>
<mxCell id="MNKzbo34czanW5nM5OoP-2" value="Id" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="MNKzbo34czanW5nM5OoP-1" vertex="1">
<mxGeometry y="26" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="MNKzbo34czanW5nM5OoP-4" value="RankingId" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="MNKzbo34czanW5nM5OoP-1" vertex="1">
<mxGeometry y="52" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="MNKzbo34czanW5nM5OoP-5" value="Position" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="MNKzbo34czanW5nM5OoP-1" vertex="1">
<mxGeometry y="78" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="MNKzbo34czanW5nM5OoP-6" value="UserName" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="MNKzbo34czanW5nM5OoP-1" vertex="1">
<mxGeometry y="104" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="MNKzbo34czanW5nM5OoP-7" value="GamesWon" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="MNKzbo34czanW5nM5OoP-1" vertex="1">
<mxGeometry y="130" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="MNKzbo34czanW5nM5OoP-8" value="Prize" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="MNKzbo34czanW5nM5OoP-1" vertex="1">
<mxGeometry y="156" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="Ry9LJ3JjXAHXbChkWwjl-0" value="PartnerId" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="MNKzbo34czanW5nM5OoP-1" vertex="1">
<mxGeometry y="182" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="MNKzbo34czanW5nM5OoP-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="MNKzbo34czanW5nM5OoP-4" target="fbeXNlo2uII11yk1rjKD-19" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="1" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1.025;entryY=0.231;entryDx=0;entryDy=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Ry9LJ3JjXAHXbChkWwjl-0" target="zkfFHV4jXpPFQw0GAbJ--18" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="760" y="765"/>
<mxPoint x="760" y="490"/>
<mxPoint x="760" y="152"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="6" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="fbeXNlo2uII11yk1rjKD-2" target="zkfFHV4jXpPFQw0GAbJ--18">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: '3'

services:
tournamentsdb:
image: postgres
container_name: tournamentsdb
restart: always
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=tournamentsdb
ports:
- "5432:5432"
volumes:
- dbdata:/var/lib/postgressql/data


volumes:
dbdata:
5 changes: 5 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"execMap": {
"ts": "ts-node-esm"
}
}
Loading