0

I am working on a blazorwasm project and I have some concerns about how my services are organized. The project has authentication and an API repository service implemented. My current project structure looks like this:

+---Client
¦   ¦   ApiAuthenticationStateProvider.cs
¦   ¦   App.razor
¦   ¦   Mercury.Client.csproj
¦   ¦   Mercury.Client.csproj.user
¦   ¦   Program.cs
¦   ¦   _Imports.razor
¦   +---Pages
¦   ¦   ¦   AppUser.razor
¦   ¦   ¦   Index.razor
¦   ¦   ¦   
¦   ¦   +---Identity
¦   ¦           Login.razor
¦   ¦           Logout.razor
¦   ¦           Register.razor
¦   ¦           
¦   +---Properties
¦   ¦       launchSettings.json
¦   ¦       
¦   +---Services
¦   ¦       APIRepository.cs
¦   ¦       AuthService.cs
¦   ¦       IAuthService.cs
¦   ¦       UserSearchManager.cs
¦   ¦       
¦   +---Shared
¦   ¦       LoginDisplay.razor
¦   ¦       MainLayout.razor
¦   ¦       MainLayout.razor.css
¦   ¦       NavMenu.razor
¦   ¦       NavMenu.razor.css               
+---Server
¦   ¦   appsettings.Development.json
¦   ¦   appsettings.json
¦   ¦   Mercury.Server.csproj
¦   ¦   Mercury.Server.csproj.user
¦   ¦   Program.cs
¦   +---Controllers
¦   ¦   ¦   AppUsersController.cs
¦   ¦   ¦   
¦   ¦   +---Identity
¦   ¦           AccountsController.cs
¦   ¦           LoginController.cs
¦   ¦           
¦   +---Data
¦   ¦   ¦   ApplicationDbContext.cs
¦   ¦   ¦   RepositoryEF.cs
¦   ¦   ¦   
¦   ¦   +---Context
¦   ¦   ¦       MercuryDevContext.cs
¦   ¦   ¦       
¦   ¦   +---Migrations
¦   ¦           20230627175710_InitialCreate.cs
¦   ¦           20230627175710_InitialCreate.Designer.cs
¦   ¦           ApplicationDbContextModelSnapshot.cs
¦   +---Pages
¦   ¦       Error.cshtml
¦   ¦       Error.cshtml.cs
¦   ¦       
¦   +---Properties
¦       ¦   launchSettings.json
¦       ¦   
¦       +---ServiceDependencies
¦                   
+---Shared
    ¦   Mercury.Shared.csproj
    ¦   
    +---API
    ¦       APIEntityResponse.cs
    ¦       APIListOfEntityResponse.cs
    ¦       
    +---base
    ¦       ContractBase.cs
    ¦ 
    +---Identity
    ¦       LoginModel.cs
    ¦       LoginResult.cs
    ¦       RegisterModel.cs
    ¦       RegisterResult.cs
    ¦       
    +---Models
    ¦   ¦   CommandGroupStr.cs
    ¦   ¦   UserSearch.cs
    ¦   ¦   
    ¦   +---AspNetUser
    ¦           AspNetRole.cs
    ¦           AspNetRoleClaim.cs
    ¦           AspNetUser.cs
    ¦           AspNetUserClaim.cs
    ¦           AspNetUserLogin.cs
    ¦           AspNetUserToken.cs
    ¦           
    +---Repository
            IRepository.cs
            IRepositoryGenericGet.cs
            

Is there a professional or standard way of structuring these services in class library projects to promote better scalability and maintainability? I'm noob to blazor and have already issues understanding it and I need help to start properly this project.

Molesox
  • 21
  • 1
  • 3

0 Answers0