├── global.json ├── source └── BlazorConduit.Client │ ├── wwwroot │ ├── _redirects │ ├── appsettings.json │ ├── favicon.ico │ ├── routes.json │ ├── css │ │ └── app.css │ ├── js │ │ └── jsInterop.js │ └── index.html │ ├── logo.png │ ├── blazor-logo.png │ ├── logo-modified.png │ ├── blazor-logo-100.png │ ├── Store │ ├── Features │ │ ├── Tags │ │ │ ├── Actions │ │ │ │ └── GetTags │ │ │ │ │ ├── GetTagsAction.cs │ │ │ │ │ ├── GetTagsSuccessAction.cs │ │ │ │ │ └── GetTagsFailureAction.cs │ │ │ ├── TagsFeature.cs │ │ │ ├── Reducers │ │ │ │ └── TagActionsReducer.cs │ │ │ └── Effects │ │ │ │ └── GetTagsEffect.cs │ │ ├── Articles │ │ │ ├── Actions │ │ │ │ ├── DeleteArticle │ │ │ │ │ ├── DeleteArticleSuccessAction.cs │ │ │ │ │ ├── DeleteArticleAction.cs │ │ │ │ │ └── DeleteArticleFailureAction.cs │ │ │ │ ├── FollowUserFromArticle │ │ │ │ │ ├── FollowUserFromArticleSuccessAction.cs │ │ │ │ │ ├── FollowUserFromArticleAction.cs │ │ │ │ │ └── FollowUserFromArticleFailureAction.cs │ │ │ │ ├── UnfollowUserFromArticle │ │ │ │ │ ├── UnfollowUserFromArticleSuccessAction.cs │ │ │ │ │ ├── UnfollowUserFromArticleAction.cs │ │ │ │ │ └── UnfollowUserFromArticleFailureAction.cs │ │ │ │ ├── LoadComments │ │ │ │ │ ├── LoadCommentsAction.cs │ │ │ │ │ ├── LoadCommentsSuccessAction.cs │ │ │ │ │ └── LoadCommentsFailureAction.cs │ │ │ │ ├── DeleteComment │ │ │ │ │ ├── DeleteCommentSuccessAction.cs │ │ │ │ │ ├── DeleteCommentAction.cs │ │ │ │ │ └── DeleteCommentFailureAction.cs │ │ │ │ ├── FavoritePostFromArticle │ │ │ │ │ ├── FavoritePostFromArticleAction.cs │ │ │ │ │ ├── FavoritePostFromArticleSuccessAction.cs │ │ │ │ │ └── FavoritePostFromArticleFailureAction.cs │ │ │ │ ├── UnfavoritePostFromArticle │ │ │ │ │ ├── UnfavoritePostFromArticleAction.cs │ │ │ │ │ ├── UnfavoritePostFromArticleSuccessAction.cs │ │ │ │ │ └── UnfavoritePostFromArticleFailureAction.cs │ │ │ │ ├── AddComment │ │ │ │ │ ├── AddCommentSuccessAction.cs │ │ │ │ │ ├── AddCommentAction.cs │ │ │ │ │ └── AddCommentFailureAction.cs │ │ │ │ ├── CreateArticle │ │ │ │ │ ├── CreateArticleSuccessAction.cs │ │ │ │ │ ├── CreateArticleAction.cs │ │ │ │ │ └── CreateArticleFailureAction.cs │ │ │ │ ├── UpdateArticle │ │ │ │ │ ├── UpdateArticleSuccessAction.cs │ │ │ │ │ ├── UpdateArticleAction.cs │ │ │ │ │ └── UpdateArticleFailureAction.cs │ │ │ │ ├── RetrieveArticle │ │ │ │ │ ├── RetrieveArticleAction.cs │ │ │ │ │ ├── RetrieveArticleFailureAction.cs │ │ │ │ │ └── RetrieveArticleSuccessAction.cs │ │ │ │ └── GetArticles │ │ │ │ │ ├── GetArticlesFailureAction.cs │ │ │ │ │ ├── GetArticlesAction.cs │ │ │ │ │ └── GetArticlesSuccessAction.cs │ │ │ ├── ArticlesFeature.cs │ │ │ └── Effects │ │ │ │ ├── DeleteArticle │ │ │ │ ├── DeleteArticleSuccessEffect.cs │ │ │ │ └── DeleteArticleEffect.cs │ │ │ │ ├── UpdateArticle │ │ │ │ ├── UpdateArticleSuccessEffect.cs │ │ │ │ └── UpdateArticleEffect.cs │ │ │ │ ├── CreateArticle │ │ │ │ ├── CreateArticleSuccessEffect.cs │ │ │ │ └── CreateArticleEffect.cs │ │ │ │ ├── RetrieveArticle │ │ │ │ ├── RetrieveArticleSuccessEffect.cs │ │ │ │ └── RetrieveArticleEffect.cs │ │ │ │ ├── LoadComments │ │ │ │ └── LoadCommentsEffect.cs │ │ │ │ ├── DeleteCommentEffect.cs │ │ │ │ ├── FollowUserFromArticleEffect.cs │ │ │ │ ├── UnfollowUserFromArticleEffect.cs │ │ │ │ ├── AddCommentEffect.cs │ │ │ │ ├── FavoritePostFromArticleEffect.cs │ │ │ │ ├── UnfavoritePostFromArticleEffect.cs │ │ │ │ └── GetArticlesEffect.cs │ │ ├── Users │ │ │ ├── Actions │ │ │ │ ├── GetCurrentUser │ │ │ │ │ ├── GetCurrentUserAction.cs │ │ │ │ │ ├── GetCurrentUserFailureAction.cs │ │ │ │ │ └── GetCurrentUserSuccessAction.cs │ │ │ │ ├── LoginUser │ │ │ │ │ ├── LoginUserSuccessAction.cs │ │ │ │ │ ├── LoginUserAction.cs │ │ │ │ │ └── LoginUserFailureAction.cs │ │ │ │ ├── UpdateUser │ │ │ │ │ ├── UpdateUserSuccessAction.cs │ │ │ │ │ ├── UpdateUserAction.cs │ │ │ │ │ └── UpdateUserFailureAction.cs │ │ │ │ └── RegisterUser │ │ │ │ │ ├── RegisterUserSuccessAction.cs │ │ │ │ │ ├── RegisterUserAction.cs │ │ │ │ │ └── RegisterUserFailureAction.cs │ │ │ ├── UsersFeature.cs │ │ │ ├── Reducers │ │ │ │ ├── LoginUserActionsReducer.cs │ │ │ │ ├── RegisterUserActionsReducer.cs │ │ │ │ ├── UpdateUserActionsReducer.cs │ │ │ │ └── GetCurrentUserActionsReducer.cs │ │ │ └── Effects │ │ │ │ ├── LoginUser │ │ │ │ ├── LoginUserSuccessEffect.cs │ │ │ │ └── LoginUserEffect.cs │ │ │ │ ├── UpdateUser │ │ │ │ ├── UpdateSuccessEffect.cs │ │ │ │ └── UpdateUserEffect.cs │ │ │ │ ├── RegisterUser │ │ │ │ ├── RegisterUserSuccessEffect.cs │ │ │ │ └── RegisterUserEffect.cs │ │ │ │ └── GetCurrentUser │ │ │ │ ├── GetCurrentUserFailureEffect.cs │ │ │ │ └── GetCurrentUserEffect.cs │ │ ├── Profiles │ │ │ ├── Actions │ │ │ │ ├── LoadUserProfile │ │ │ │ │ ├── LoadUserProfileAction.cs │ │ │ │ │ ├── SetUserProfileAction.cs │ │ │ │ │ ├── LoadUserProfileSuccessAction.cs │ │ │ │ │ └── LoadUserProfileFailureAction.cs │ │ │ │ ├── FollowUserFromProfile │ │ │ │ │ ├── FollowUserFromProfileAction.cs │ │ │ │ │ ├── FollowUserFromProfileSuccessAction.cs │ │ │ │ │ └── FollowUserFromProfileFailureAction.cs │ │ │ │ └── UnfollowUserFromProfile │ │ │ │ │ ├── UnfollowUserFromProfileAction.cs │ │ │ │ │ ├── UnfollowUserFromProfileSuccessAction.cs │ │ │ │ │ └── UnfollowUserFromProfileFailureAction.cs │ │ │ ├── ProfilesFeature.cs │ │ │ ├── Reducers │ │ │ │ ├── LoadUserProfileActionsReducer.cs │ │ │ │ └── UserProfileActionsReducer.cs │ │ │ └── Effects │ │ │ │ ├── LoadUserProfile │ │ │ │ ├── LoadUserProfileFailureEffect.cs │ │ │ │ ├── LoadUserProfileSuccessEffect.cs │ │ │ │ └── LoadUserProfileEffect.cs │ │ │ │ ├── FollowUserFromProfile │ │ │ │ ├── FollowUserSuccessEffect.cs │ │ │ │ └── FollowUserEffect.cs │ │ │ │ └── UnfollowUserFromProfile │ │ │ │ ├── UnfollowUserSuccessEffect.cs │ │ │ │ └── UnfollowUserEffect.cs │ │ └── Shared │ │ │ ├── Actions │ │ │ └── FailureAction.cs │ │ │ └── Reducers │ │ │ └── NavigationActionsReducer.cs │ └── State │ │ ├── TagState.cs │ │ ├── RootState.cs │ │ ├── UserState.cs │ │ ├── ProfileState.cs │ │ └── ArticleState.cs │ ├── Models │ ├── Tags │ │ └── Dtos │ │ │ └── TagListDto.cs │ ├── Common │ │ ├── ViewModels │ │ │ └── ConduitErrorViewModel.cs │ │ ├── Dtos │ │ │ └── ConduitErrorDto.cs │ │ ├── UserProfileInteractionContext.cs │ │ ├── InteropFunctions.cs │ │ └── ConduitApiException.cs │ ├── Profiles │ │ ├── UserProfileResponse.cs │ │ └── UserProfileDto.cs │ ├── Articles │ │ ├── ViewModels │ │ │ ├── ArticleViewModel.cs │ │ │ ├── CommentViewModel.cs │ │ │ ├── CommentViewModelList.cs │ │ │ └── ArticleViewModelList.cs │ │ ├── Dtos │ │ │ ├── CreateCommentDto.cs │ │ │ ├── CommentDto.cs │ │ │ ├── UpdateArticleDto.cs │ │ │ ├── CreateArticleDto.cs │ │ │ └── ArticleDto.cs │ │ ├── Requests │ │ │ ├── CreateCommentRequest.cs │ │ │ ├── UpdateArticleRequest.cs │ │ │ ├── CreateArticleRequest.cs │ │ │ └── ArticleSearchRequest.cs │ │ └── Validation │ │ │ ├── CreateArticleValidationModel.cs │ │ │ └── UpdateArticleValidationModel.cs │ └── Authentication │ │ ├── ViewModels │ │ └── ConduitUserViewModel.cs │ │ ├── Dtos │ │ ├── LoginUserDto.cs │ │ ├── RegisterUserDto.cs │ │ └── ConduitUserDto.cs │ │ ├── Requests │ │ ├── LoginUserRequest.cs │ │ ├── UpdateUserRequest.cs │ │ └── RegisterUserRequest.cs │ │ └── Validation │ │ ├── LoginUserValidationModel.cs │ │ └── RegisterUserValidationModel.cs │ ├── Services │ ├── Contracts │ │ ├── IErrorFormattingService.cs │ │ ├── ITokenService.cs │ │ ├── IConduitApiService.cs │ │ └── IStateFacade.cs │ ├── ErrorFormattingService.cs │ ├── SecurityTokenService.cs │ └── ConduitApiService.cs │ ├── Shared │ ├── Footer.razor │ ├── MainLayout.razor │ ├── CustomValidationForm.razor │ └── CustomValidationForm.razor.cs │ ├── _Imports.razor │ ├── App.razor │ ├── Properties │ └── launchSettings.json │ ├── Program.cs │ ├── BlazorConduit.Client.csproj │ └── Pages │ ├── Login.razor │ ├── Register.razor │ ├── Article │ ├── CreatePost.razor │ └── ArticleCommentList.razor │ └── Settings.razor ├── realworld-logo.png ├── tests ├── BlazorConduit.Integration.Tests │ ├── cypress │ │ ├── fixtures │ │ │ └── example.json │ │ ├── support │ │ │ ├── index.js │ │ │ └── commands.js │ │ ├── plugins │ │ │ └── index.js │ │ └── integration │ │ │ ├── login_spec.js │ │ │ ├── register_spec.js │ │ │ ├── home_spec.js │ │ │ └── article_spec.js │ ├── cypress.json │ └── package.json └── BlazorConduit.Client.Tests │ ├── Mocks │ ├── MockServiceCollectionExtensions.cs │ └── MockNavigationManager.cs │ └── BlazorConduit.Client.Tests.csproj ├── .gitignore ├── azure-pipelines.yml ├── .github └── workflows │ └── azure-static-web-apps-purple-pond-0fdfe431e.yml ├── readme.md └── BlazorConduit.sln /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "3.1.302" 4 | } 5 | } -------------------------------------------------------------------------------- /source/BlazorConduit.Client/wwwroot/_redirects: -------------------------------------------------------------------------------- 1 | /* /index.html 200 2 | -------------------------------------------------------------------------------- /realworld-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoeyMckenzie/BlazorConduit/HEAD/realworld-logo.png -------------------------------------------------------------------------------- /source/BlazorConduit.Client/wwwroot/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiBaseUrl": "https://conduit.productionready.io/api" 3 | } -------------------------------------------------------------------------------- /source/BlazorConduit.Client/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoeyMckenzie/BlazorConduit/HEAD/source/BlazorConduit.Client/logo.png -------------------------------------------------------------------------------- /source/BlazorConduit.Client/blazor-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoeyMckenzie/BlazorConduit/HEAD/source/BlazorConduit.Client/blazor-logo.png -------------------------------------------------------------------------------- /source/BlazorConduit.Client/logo-modified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoeyMckenzie/BlazorConduit/HEAD/source/BlazorConduit.Client/logo-modified.png -------------------------------------------------------------------------------- /source/BlazorConduit.Client/blazor-logo-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoeyMckenzie/BlazorConduit/HEAD/source/BlazorConduit.Client/blazor-logo-100.png -------------------------------------------------------------------------------- /source/BlazorConduit.Client/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoeyMckenzie/BlazorConduit/HEAD/source/BlazorConduit.Client/wwwroot/favicon.ico -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Store/Features/Tags/Actions/GetTags/GetTagsAction.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorConduit.Client.Store.Features.Tags.Actions.GetTags 2 | { 3 | public class GetTagsAction 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/wwwroot/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "routes": [ 3 | { 4 | "route": "/login", 5 | "serve": "/login", 6 | "statusCode": 301 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /tests/BlazorConduit.Integration.Tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Store/Features/Articles/Actions/DeleteArticle/DeleteArticleSuccessAction.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorConduit.Client.Store.Features.Articles.Actions.DeleteArticle 2 | { 3 | public class DeleteArticleSuccessAction 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Models/Tags/Dtos/TagListDto.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BlazorConduit.Client.Models.Tags.Dtos 4 | { 5 | public class TagListDto 6 | { 7 | public IEnumerable? Tags { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Store/Features/Articles/Actions/FollowUserFromArticle/FollowUserFromArticleSuccessAction.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorConduit.Client.Store.Features.Articles.Actions.FollowUserFromArticle 2 | { 3 | public class FollowUserFromArticleSuccessAction 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Store/Features/Articles/Actions/UnfollowUserFromArticle/UnfollowUserFromArticleSuccessAction.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorConduit.Client.Store.Features.Articles.Actions.UnfollowUserFromArticle 2 | { 3 | public class UnfollowUserFromArticleSuccessAction 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Models/Common/ViewModels/ConduitErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BlazorConduit.Client.Models.Common.ViewModels 4 | { 5 | public class ConduitErrorViewModel 6 | { 7 | public object? Errors { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Models/Profiles/UserProfileResponse.cs: -------------------------------------------------------------------------------- 1 | using BlazorConduit.Client.Models.Profiles; 2 | 3 | namespace BlazorConduit.Client.Models.Profiles 4 | { 5 | public class UserProfileResponse 6 | { 7 | public UserProfileDto? Profile { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Models/Common/Dtos/ConduitErrorDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BlazorConduit.Client.Models.Common.Dtos 7 | { 8 | public class ConduitErrorDto 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Models/Articles/ViewModels/ArticleViewModel.cs: -------------------------------------------------------------------------------- 1 | using BlazorConduit.Client.Models.Articles.Dtos; 2 | 3 | namespace BlazorConduit.Client.Models.Articles.ViewModels 4 | { 5 | public class ArticleViewModel 6 | { 7 | public ArticleDto? Article { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Models/Articles/ViewModels/CommentViewModel.cs: -------------------------------------------------------------------------------- 1 | using BlazorConduit.Client.Models.Articles.Dtos; 2 | 3 | namespace BlazorConduit.Client.Models.Articles.ViewModels 4 | { 5 | public class CommentViewModel 6 | { 7 | public CommentDto? Comment { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Models/Articles/Dtos/CreateCommentDto.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorConduit.Client.Models.Articles.Dtos 2 | { 3 | public class CreateCommentDto 4 | { 5 | public CreateCommentDto(string body) => 6 | Body = body; 7 | 8 | public string Body { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Services/Contracts/IErrorFormattingService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BlazorConduit.Client.Services.Contracts 4 | { 5 | public interface IErrorFormattingService 6 | { 7 | IEnumerable GetFriendlyErrors(object? apiErrors); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Models/Authentication/ViewModels/ConduitUserViewModel.cs: -------------------------------------------------------------------------------- 1 | using BlazorConduit.Client.Models.Authentication.Dtos; 2 | 3 | namespace BlazorConduit.Client.Models.Authentication.ViewModels 4 | { 5 | public class ConduitUserViewModel 6 | { 7 | public ConduitUserDto? User { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Models/Common/UserProfileInteractionContext.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorConduit.Client.Models.Common 2 | { 3 | public enum UserProfileInteractionContext 4 | { 5 | Follow, 6 | Unfollow, 7 | Favorited, 8 | Authored, 9 | Feed, 10 | Global, 11 | Tag 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Shared/Footer.razor: -------------------------------------------------------------------------------- 1 |
2 |
3 | conduit 4 | 5 | An interactive learning project from Thinkster. Code & design licensed under MIT. 6 | 7 |
8 |
-------------------------------------------------------------------------------- /tests/BlazorConduit.Integration.Tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "https://localhost:5001", 3 | "defaultCommandTimeout": 15000, 4 | "env": { 5 | "apiUrl": "https://conduit.productionready.io/api", 6 | "email": "joey.test4@gmail.com", 7 | "password": "test12345", 8 | "username": "JoeyTest4", 9 | "token": "token" 10 | } 11 | } -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Models/Articles/ViewModels/CommentViewModelList.cs: -------------------------------------------------------------------------------- 1 | using BlazorConduit.Client.Models.Articles.Dtos; 2 | using System.Collections.Generic; 3 | 4 | namespace BlazorConduit.Client.Models.Articles.ViewModels 5 | { 6 | public class CommentViewModelList 7 | { 8 | public IEnumerable? Comments { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Store/Features/Articles/Actions/LoadComments/LoadCommentsAction.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorConduit.Client.Store.Features.Articles.Actions.LoadComments 2 | { 3 | public class LoadCommentsAction 4 | { 5 | public LoadCommentsAction(string slug) => 6 | Slug = slug; 7 | 8 | public string Slug { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Store/Features/Articles/Actions/DeleteArticle/DeleteArticleAction.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorConduit.Client.Store.Features.Articles.Actions.DeleteArticle 2 | { 3 | public class DeleteArticleAction 4 | { 5 | public DeleteArticleAction(string slug) => 6 | Slug = slug; 7 | 8 | public string Slug { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /source/BlazorConduit.Client/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits Fluxor.Blazor.Web.Components.FluxorLayout 2 | 3 | 4 | 5 |
6 | @Body 7 |
8 | 9 |