Skip to content

Commit 44654dd

Browse files
Frontend only structure + DAL with caching (#3)
* restructure repository for fronted only * refactor API layer to DAL * add DAL caching * refactoring
1 parent 238c1ea commit 44654dd

File tree

107 files changed

+557
-109
lines changed

Some content is hidden

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

107 files changed

+557
-109
lines changed
File renamed without changes.

.gitmodules

Lines changed: 0 additions & 6 deletions
This file was deleted.

Backend/CleanArchitecture

Lines changed: 0 additions & 1 deletion
This file was deleted.

Backend/ModularMonolith

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
<ItemGroup>
66
<PackageVersion Include="BitzArt.Blazor.Cookies.Client" Version="1.0.4" />
77
<PackageVersion Include="BitzArt.Blazor.Cookies.Server" Version="1.0.4" />
8+
<PackageVersion Include="Blazored.LocalStorage" Version="4.5.0" />
89
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.2" />
910
<PackageVersion Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
11+
<PackageVersion Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.4" />
1012
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.4" />
1113
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.4" />
1214
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.4" />
@@ -18,4 +20,4 @@
1820
<PackageVersion Include="Skrasek.RailwayResult.FunctionalExtensions" Version="1.1.0" />
1921
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="7.5.1" />
2022
</ItemGroup>
21-
</Project>
23+
</Project>

Frontend/TeamUp.ApiLayer/ServiceCollectionExtensions.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio Version 17
33
VisualStudioVersion = 17.9.34728.123
44
MinimumVisualStudioVersion = 16.0.0.0
5-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamUp", "TeamUp\TeamUp.csproj", "{9609910C-338D-4BB4-AF8E-F38997C39F1F}"
5+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{84A499FC-2CF8-4DC5-BB92-7C158089110C}"
66
EndProject
7-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamUp.Client", "TeamUp.Client\TeamUp.Client.csproj", "{2D3EEEC5-34AF-4B57-8268-06AA7C7042D7}"
7+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamUp", "src\TeamUp\TeamUp.csproj", "{9609910C-338D-4BB4-AF8E-F38997C39F1F}"
8+
EndProject
9+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamUp.Client", "src\TeamUp.Client\TeamUp.Client.csproj", "{2D3EEEC5-34AF-4B57-8268-06AA7C7042D7}"
10+
EndProject
11+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamUp.DAL", "src\TeamUp.DAL\TeamUp.DAL.csproj", "{1ADEB438-95E3-4725-9DA0-ACA666D48176}"
12+
EndProject
13+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamUp.Contracts", "src\TeamUp.Contracts\TeamUp.Contracts.csproj", "{81F763DE-60C3-48B9-AD09-BC2FD2A82490}"
814
EndProject
915
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{48AE80B7-9166-47C1-93CE-82CFC34A77A4}"
1016
ProjectSection(SolutionItems) = preProject
@@ -13,10 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1319
Directory.Packages.props = Directory.Packages.props
1420
EndProjectSection
1521
EndProject
16-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamUp.ApiLayer", "TeamUp.ApiLayer\TeamUp.ApiLayer.csproj", "{1ADEB438-95E3-4725-9DA0-ACA666D48176}"
17-
EndProject
18-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamUp.Contracts", "TeamUp.Contracts\TeamUp.Contracts.csproj", "{81F763DE-60C3-48B9-AD09-BC2FD2A82490}"
19-
EndProject
2022
Global
2123
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2224
Debug|Any CPU = Debug|Any CPU
@@ -79,6 +81,12 @@ Global
7981
GlobalSection(SolutionProperties) = preSolution
8082
HideSolutionNode = FALSE
8183
EndGlobalSection
84+
GlobalSection(NestedProjects) = preSolution
85+
{9609910C-338D-4BB4-AF8E-F38997C39F1F} = {84A499FC-2CF8-4DC5-BB92-7C158089110C}
86+
{2D3EEEC5-34AF-4B57-8268-06AA7C7042D7} = {84A499FC-2CF8-4DC5-BB92-7C158089110C}
87+
{1ADEB438-95E3-4725-9DA0-ACA666D48176} = {84A499FC-2CF8-4DC5-BB92-7C158089110C}
88+
{81F763DE-60C3-48B9-AD09-BC2FD2A82490} = {84A499FC-2CF8-4DC5-BB92-7C158089110C}
89+
EndGlobalSection
8290
GlobalSection(ExtensibilityGlobals) = postSolution
8391
SolutionGuid = {FB5C244A-E090-4605-9C5D-1F7013352D71}
8492
EndGlobalSection

Frontend/TeamUp.Client/AnonymousPages/Login.razor renamed to src/TeamUp.Client/AnonymousPages/Login.razor

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
@using BitzArt.Blazor.Cookies
1010

1111
@inject NavigationManager NavigationManager
12-
@inject ApiClient ApiClient
1312
@inject AuthenticationStateProvider AuthenticationStateProvider
1413
@inject ICookieService CookieService
1514
@inject IToastService ToastService
15+
@inject LoginService LoginService
1616

1717
<PageTitle>Login</PageTitle>
1818

@@ -68,7 +68,7 @@
6868
public async Task LoginAsync()
6969
{
7070
processing = true;
71-
var result = await ApiClient.LoginAsync(Input, CTS.Token);
71+
var result = await LoginService.LoginAsync(Input, CTS.Token);
7272
if (result.IsFailure)
7373
{
7474
if (result.Error is ApiValidationError error)
@@ -86,10 +86,12 @@
8686
if (AuthenticationStateProvider is ClientAuthenticationStateProvider persistAuthProvider)
8787
{
8888
persistAuthProvider.Login(result.Value);
89+
await LoginService.ValidateCacheAsync(CTS.Token);
8990
Redirect();
9091
return;
9192
}
9293

94+
await LoginService.ValidateCacheAsync(CTS.Token);
9395
Redirect(true);
9496
}
9597

File renamed without changes.

0 commit comments

Comments
 (0)