Skip to content

Commit 1d46c92

Browse files
committed
.
0 parents  commit 1d46c92

File tree

175 files changed

+3330
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+3330
-0
lines changed

.dockerignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
**/*.bat
2+
**/*.log
3+
**/*.md
4+
**/*.yml
5+
**/.dockerignore
6+
**/.editorconfig
7+
**/.git
8+
**/.gitattributes
9+
**/.github
10+
**/.gitignore
11+
**/.vs
12+
**/.vscode
13+
**/bin
14+
**/dist
15+
**/dockerfile
16+
**/node_modules
17+
**/obj
18+
**/package-lock.json
19+
**/postman.json

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_size = 4
6+
indent_style = space
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
*.cs diff=csharp

.github/workflows/build.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: build
2+
on:
3+
push:
4+
branches: [main]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v5
11+
12+
- name: DotNet Setup
13+
uses: actions/setup-dotnet@v5
14+
with:
15+
global-json-file: source/global.json
16+
17+
- name: DotNet Publish
18+
run: dotnet publish source/Web --configuration Release --output web
19+
20+
- name: Node Setup
21+
uses: actions/setup-node@v5
22+
with:
23+
node-version: "*"
24+
check-latest: true
25+
26+
- name: Frontend Publish
27+
run: |
28+
cd source/Web/Frontend
29+
npm run restore
30+
npm run build
31+
32+
- name: Artifact Prepare
33+
run: |
34+
mkdir web/wwwroot
35+
rm --force --recursive web/*.pdb
36+
rm --force --recursive web/Frontend/*
37+
mv --force source/Web/Frontend/dist/browser/* web/wwwroot
38+
jq '.api = "https://github.com"' web/wwwroot/assets/settings.json > tmp && mv tmp web/wwwroot/assets/settings.json
39+
40+
- name: Artifact Upload
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: web
44+
path: web

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
*.bat
2+
*.log
3+
*.pdb
4+
*.suo
5+
*.tmp
6+
*.user
7+
.angular
8+
.vs
9+
[Bb]in
10+
[Dd]ebug
11+
[Ll]og
12+
[Oo]bj
13+
[Rr]elease
14+
[Rr]eleases
15+
[Tt]est[Rr]esults
16+
dist
17+
node_modules
18+
package-lock.json

docker-compose.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# docker compose up --detach --build --force-recreate --remove-orphans
2+
services:
3+
web:
4+
image: architecture/web
5+
container_name: architecture_web
6+
restart: always
7+
build:
8+
context: .
9+
environment:
10+
- SigningKey=58a97cd766d741e8a21b8d3c4279652469801dc8da844fa5bf80afeea85aa472
11+
- ConnectionStrings__Context=Server=architecture_database;Database=Database;User Id=sa;Password=P4ssW0rd!;TrustServerCertificate=true;
12+
- Serilog__WriteTo__1__Args__path=/app/logs/
13+
depends_on:
14+
- database
15+
ports:
16+
- 8090:8080
17+
database:
18+
image: mcr.microsoft.com/mssql/server
19+
container_name: architecture_database
20+
restart: always
21+
environment:
22+
- ACCEPT_EULA=Y
23+
- SA_PASSWORD=P4ssW0rd!
24+
ports:
25+
- 1433:1433
26+
volumes:
27+
- database:/var/opt/mssql
28+
volumes:
29+
database:

dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# DotNet
2+
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS dotnet
3+
COPY source ./source
4+
RUN dotnet publish ./source/Web/Architecture.Web.csproj --configuration Release --output /dist
5+
6+
# Frontend
7+
FROM node:alpine AS frontend
8+
RUN npm install -g pnpm
9+
WORKDIR /source/Web/Frontend
10+
COPY source/Web/Frontend/package.json .
11+
RUN pnpm install
12+
COPY source/Web/Frontend .
13+
RUN npm run build
14+
15+
# Runtime
16+
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine
17+
RUN apk add --no-cache icu-libs
18+
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
19+
WORKDIR /app
20+
COPY --from=dotnet /dist .
21+
COPY --from=frontend /source/Web/Frontend/dist/browser ./wwwroot
22+
ENTRYPOINT ["dotnet", "Architecture.Web.dll"]

license.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
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:
2+
3+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
4+
5+
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.

postman.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":1,"collections":[{"id":"33c5f635-8255-4611-80f9-d118f46a3e79","uid":"0-33c5f635-8255-4611-80f9-d118f46a3e79","name":"Architecture","description":null,"auth":null,"events":null,"variables":[],"order":[],"folders_order":["81c988e6-322d-477b-82fb-a2311d46f5ee","5c1f304b-c68c-460f-b2c5-7640506303e4"],"protocolProfileBehavior":{},"createdAt":"2022-12-22T16:25:55.910Z","folders":[{"id":"81c988e6-322d-477b-82fb-a2311d46f5ee","uid":"0-81c988e6-322d-477b-82fb-a2311d46f5ee","name":"Auths","description":null,"auth":null,"events":null,"collection":"33c5f635-8255-4611-80f9-d118f46a3e79","folder":null,"order":["e8086da9-b94a-4237-807d-5356339920e1"],"folders_order":[],"owner":"0","protocolProfileBehavior":{},"createdAt":"2022-12-22T16:26:15.867Z","collectionId":"33c5f635-8255-4611-80f9-d118f46a3e79","folderId":"81c988e6-322d-477b-82fb-a2311d46f5ee"},{"id":"5c1f304b-c68c-460f-b2c5-7640506303e4","uid":"0-5c1f304b-c68c-460f-b2c5-7640506303e4","name":"Users","description":null,"auth":null,"events":null,"collection":"33c5f635-8255-4611-80f9-d118f46a3e79","folder":null,"order":["65930fac-cab7-4ad6-aa4e-739e6eae1341","ba37094c-077a-45d3-8e49-8a4e178104d2","00b49d78-b89c-4860-9821-907686457d1f","79cb2f42-5350-4ea6-81dc-840d68e0205d","05f84113-b9e0-4d73-aa46-67c9e2dd012e","5536ad2b-492e-457e-8b2b-c395935019a8","331a8da3-4eb7-44ec-a1d2-05736e5b8ffe"],"folders_order":[],"owner":"0","protocolProfileBehavior":{},"createdAt":"2022-12-22T16:26:22.305Z","collectionId":"33c5f635-8255-4611-80f9-d118f46a3e79","folderId":"5c1f304b-c68c-460f-b2c5-7640506303e4"}],"requests":[{"id":"00b49d78-b89c-4860-9821-907686457d1f","uid":"0-00b49d78-b89c-4860-9821-907686457d1f","name":"Grid","url":"{{url}}/users/grid?page.index=1&page.size=2&order.ascending=false&order.property=name","description":null,"data":null,"dataOptions":{"raw":{"language":"json"}},"dataMode":null,"headerData":[{"key":"Authorization","value":"Bearer {{token}}","description":"","type":"default","enabled":true}],"method":"GET","pathVariableData":[],"queryParams":[{"key":"page.index","value":"1","equals":true,"description":null,"enabled":true},{"key":"page.size","value":"2","equals":true,"description":null,"enabled":true},{"key":"order.ascending","value":"false","equals":true,"description":null,"enabled":true},{"key":"order.property","value":"name","equals":true,"description":null,"enabled":true}],"auth":null,"events":[{"listen":"test","script":{"id":"93bcbfda-357b-42bb-b01c-868e9bceb6cb","exec":[""],"type":"text/javascript"}}],"folder":"5c1f304b-c68c-460f-b2c5-7640506303e4","responses_order":[],"preRequestScript":null,"tests":null,"currentHelper":null,"helperAttributes":null,"collectionId":"33c5f635-8255-4611-80f9-d118f46a3e79","headers":"Authorization: Bearer {{token}}\n","pathVariables":{}},{"id":"05f84113-b9e0-4d73-aa46-67c9e2dd012e","uid":"0-05f84113-b9e0-4d73-aa46-67c9e2dd012e","name":"Inactivate","url":"{{url}}/users/2/inactivate","description":null,"data":null,"dataOptions":{"raw":{"language":"json"}},"dataMode":null,"headerData":[{"key":"Authorization","value":"Bearer {{token}}","description":"","type":"default","enabled":true}],"method":"PATCH","pathVariableData":[],"queryParams":[],"auth":null,"events":[{"listen":"test","script":{"id":"50a8236f-9914-483d-bfad-f60e4aaa3123","exec":[""],"type":"text/javascript"}}],"folder":"5c1f304b-c68c-460f-b2c5-7640506303e4","responses_order":[],"preRequestScript":null,"tests":null,"currentHelper":null,"helperAttributes":null,"collectionId":"33c5f635-8255-4611-80f9-d118f46a3e79","headers":"Authorization: Bearer {{token}}\n","pathVariables":{}},{"id":"331a8da3-4eb7-44ec-a1d2-05736e5b8ffe","uid":"0-331a8da3-4eb7-44ec-a1d2-05736e5b8ffe","name":"Delete","url":"{{url}}/users/2","description":null,"data":null,"dataOptions":{"raw":{"language":"json"}},"dataMode":null,"headerData":[{"key":"Authorization","value":"Bearer {{token}}","description":"","type":"default","enabled":true}],"method":"DELETE","pathVariableData":[],"queryParams":[],"auth":null,"events":[{"listen":"test","script":{"id":"b0a40e44-b5ad-430c-99dd-1ceed2707cf3","exec":[""],"type":"text/javascript"}}],"folder":"5c1f304b-c68c-460f-b2c5-7640506303e4","responses_order":[],"preRequestScript":null,"tests":null,"currentHelper":null,"helperAttributes":null,"collectionId":"33c5f635-8255-4611-80f9-d118f46a3e79","headers":"Authorization: Bearer {{token}}\n","pathVariables":{}},{"id":"5536ad2b-492e-457e-8b2b-c395935019a8","uid":"0-5536ad2b-492e-457e-8b2b-c395935019a8","name":"Update","url":"{{url}}/users/2","description":null,"data":[],"dataOptions":{"raw":{"language":"json"}},"dataMode":"raw","headerData":[{"key":"Authorization","value":"Bearer {{token}}","description":"","type":"default","enabled":true}],"method":"PUT","pathVariableData":[],"queryParams":[],"auth":null,"events":[{"listen":"test","script":{"id":"dc19629f-14c9-45c7-93f3-768b3b127134","exec":[""],"type":"text/javascript"}}],"folder":"5c1f304b-c68c-460f-b2c5-7640506303e4","responses_order":[],"preRequestScript":null,"tests":null,"currentHelper":null,"helperAttributes":null,"collectionId":"33c5f635-8255-4611-80f9-d118f46a3e79","rawModeData":"{\r\n \"id\": 2,\r\n \"name\": \"{{$randomFirstName}}\",\r\n \"email\": \"{{$randomEmail}}\"\r\n}","headers":"Authorization: Bearer {{token}}\n","pathVariables":{}},{"id":"65930fac-cab7-4ad6-aa4e-739e6eae1341","uid":"0-65930fac-cab7-4ad6-aa4e-739e6eae1341","name":"Add","url":"{{url}}/users","description":null,"data":[],"dataOptions":{"raw":{"language":"json"}},"dataMode":"raw","headerData":[{"key":"Authorization","value":"Bearer {{token}}","description":"","type":"default","enabled":true}],"method":"POST","pathVariableData":[],"queryParams":[],"auth":null,"events":[{"listen":"test","script":{"id":"8eb69cd7-1039-4975-a6a8-d3d133b62058","exec":[""],"type":"text/javascript"}}],"folder":"5c1f304b-c68c-460f-b2c5-7640506303e4","responses_order":[],"preRequestScript":null,"tests":null,"currentHelper":null,"helperAttributes":null,"collectionId":"33c5f635-8255-4611-80f9-d118f46a3e79","rawModeData":"{\r\n \"name\": \"{{$randomFirstName}}\",\r\n \"email\": \"{{$randomEmail}}\",\r\n \"login\": \"{{$randomUserName}}\",\r\n \"password\": \"{{$randomPassword}}\"\r\n}","headers":"Authorization: Bearer {{token}}\n","pathVariables":{}},{"id":"79cb2f42-5350-4ea6-81dc-840d68e0205d","uid":"0-79cb2f42-5350-4ea6-81dc-840d68e0205d","name":"Get","url":"{{url}}/users/1","description":null,"data":null,"dataOptions":{"raw":{"language":"json"}},"dataMode":null,"headerData":[{"key":"Authorization","value":"Bearer {{token}}","description":"","type":"default","enabled":true}],"method":"GET","pathVariableData":[],"queryParams":[],"auth":null,"events":[{"listen":"test","script":{"id":"c082a4b7-d864-410a-8429-faafda68a487","exec":[""],"type":"text/javascript"}}],"folder":"5c1f304b-c68c-460f-b2c5-7640506303e4","responses_order":[],"preRequestScript":null,"tests":null,"currentHelper":null,"helperAttributes":null,"collectionId":"33c5f635-8255-4611-80f9-d118f46a3e79","headers":"Authorization: Bearer {{token}}\n","pathVariables":{}},{"id":"ba37094c-077a-45d3-8e49-8a4e178104d2","uid":"0-ba37094c-077a-45d3-8e49-8a4e178104d2","name":"List","url":"{{url}}/users","description":null,"data":null,"dataOptions":{"raw":{"language":"json"}},"dataMode":null,"headerData":[{"key":"Authorization","value":"Bearer {{token}}","description":"","type":"default","enabled":true}],"method":"GET","pathVariableData":[],"queryParams":[],"auth":null,"events":[{"listen":"test","script":{"id":"dcd82279-283f-4602-9d96-cf3157f68229","exec":[""],"type":"text/javascript"}}],"folder":"5c1f304b-c68c-460f-b2c5-7640506303e4","responses_order":[],"preRequestScript":null,"tests":null,"currentHelper":null,"helperAttributes":null,"collectionId":"33c5f635-8255-4611-80f9-d118f46a3e79","headers":"Authorization: Bearer {{token}}\n","pathVariables":{}},{"id":"e8086da9-b94a-4237-807d-5356339920e1","uid":"0-e8086da9-b94a-4237-807d-5356339920e1","name":"Auth","url":"{{url}}/auths","description":null,"data":[],"dataOptions":{"raw":{"language":"json"}},"dataMode":"raw","headerData":[],"method":"POST","pathVariableData":[],"queryParams":[],"auth":null,"events":[{"listen":"test","script":{"id":"cd2620be-f3c3-4df4-808c-ab890f2e47f0","exec":["pm.environment.set(\"token\", pm.response.json().token);"],"type":"text/javascript"}}],"folder":"81c988e6-322d-477b-82fb-a2311d46f5ee","responses_order":[],"preRequestScript":null,"tests":"pm.environment.set(\"token\", pm.response.json().token);","currentHelper":null,"helperAttributes":null,"collectionId":"33c5f635-8255-4611-80f9-d118f46a3e79","rawModeData":"{\r\n \"login\": \"admin\",\r\n \"password\": \"admin\"\r\n}","headers":"","pathVariables":{}}]}],"environments":[{"id":"71dc994b-6187-46e5-a3af-0052b162cbaa","name":"Local","values":[{"key":"url","value":"https://localhost:8090","type":"default","enabled":true},{"key":"token","value":"","type":"default","enabled":true}]},{"id":"bf00f882-45c1-4705-974f-fcfceda9c039","name":"My Workspace - globals","values":[]}],"headerPresets":[],"globals":[]}

0 commit comments

Comments
 (0)