Giter Site home page Giter Site logo

thangchung / blog-core Goto Github PK

View Code? Open in Web Editor NEW
408.0 40.0 122.0 8.75 MB

Modular blog using Blazor with clean domain-driven design patterns

License: MIT License

C# 25.52% HTML 9.99% CSS 60.86% PowerShell 2.07% Dockerfile 0.31% JavaScript 1.25%
dotnet-core dotnet-standard blog clean-architecture reactjs redux blog-engine csharp blazor adminlte

blog-core's Introduction

BlogCore project

A blog application built with Blazor and clean domain-driven design patterns.

Price

Alt Text

Technical Stack

  • .NET SDK (v3.0.100-preview6) & NodeJS
  • Blazor v3.0.0-preview6
  • IdentityServer 4
  • Entity Framework Core
  • Protobuf v3.8.0
  • Swashbuckle v5.0.0-rc2
  • AdminLTE v3.0.0-beta.1

Run Application

$ cd src\BlogCore.Hosts.Web.Client\ && npm install && npm run copy && cd ../..

At this root folder

$ dotnet clean && dotnet run -p src\BlogCore.Hosts.Web.Server\BlogCore.Hosts.Web.Server.csproj
$ dotnet watch -p src/BlogCore.Hosts.Web.Server/BlogCore.Hosts.Web.Server.csproj run // live reloading

Open an another terminal and run

$ dotnet run -p src\BlogCore.Hosts.IdentityServer\BlogCore.Hosts.IdentityServer.csproj

Now, you can access to

Development

Get code

git clone [email protected]:thangchung/blog-core.git
cd blog-core

Start hacking it!!!

Copyright and license

Code and documentation copyright 2019 Thang Chung. Code released under the MIT License.

blog-core's People

Contributors

thangchung avatar thangchungnt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blog-core's Issues

[Brainstorm] Software architecture

Would like to see some kind of dynamic field for CMS with multi-tenancy architecture like https://github.com/arduosoft/RawCMS/blob/master/RawCMS.Library/Schema/Field.cs

Multi-tenancy:

Cloud native book: https://github.com/ardalis/azure-cloud-native-book/blob/master/architecting-cloud-native-dotnet-apps-for-azure/azure-platform-resiliency.md

Pub/Sub:

  • at-most-once delivery: means that for each message handed to the mechanism, that message is delivered zero or one times; in more casual terms it means that messages may be lost.
  • at-least-once delivery: means that for each message handed to the mechanism potentially multiple attempts are made at delivering it, such that at least one succeeds; again, in more casual terms this means that messages may be duplicated but not lost.
  • exactly-once delivery: means that for each message handed to the mechanism exactly one delivery is made to the recipient; the message can neither be lost nor duplicated.

No packages.json file for BlogCore.Hosts.Web.Client

Hello,
my goal is to learn about Blazor and DDD using your project however I have problems getting it to run following the description in the ReadMe (I am on the blazor branch).
Whenever I enter the first command in a cmd I spawned inside the root folder I get an error:

Command:
cd src\BlogCore.Hosts.Web.Client\ && npm install && npm run copy && cd ../..

Logfile:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'copy' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: ENOENT: no such file or directory, open 'C:\Users\Ano\Documents\Visual Studio 2017\Projects\blog-core-ddd\src\BlogCore.Hosts.Web.Client\package.json'
5 verbose cwd C:\Users\Ano\Documents\Visual Studio 2017\Projects\blog-core-ddd\src\BlogCore.Hosts.Web.Client
6 verbose Windows_NT 10.0.18362
7 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "copy"
8 verbose node v10.16.3
9 verbose npm  v6.9.0
10 error path C:\Users\Ano\Documents\Visual Studio 2017\Projects\blog-core-ddd\src\BlogCore.Hosts.Web.Client\package.json
11 error code ENOENT
12 error errno -4058
13 error syscall open
14 error enoent ENOENT: no such file or directory, open 'C:\Users\Ano\Documents\Visual Studio 2017\Projects\blog-core-ddd\src\BlogCore.Hosts.Web.Client\package.json'
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -4058, true ]

Do you have a hint what is going wrong here?

Blazor for the project

The Blazor road map with a lot of features need to investigate dotnet/aspnetcore#8177

And priority items to work on: https://github.com/aspnet/AspNetCore.Docs/projects/35#card-23892118

What news with Blazor: Docs and .NET Core 3.0 Preview 6 news

Microsoft samples:

Blazor features:

Blazor validation & FluentValidation:

UI:

Real projects:

Manage Blog usecase

  • As an anonymous/user, I want to see the blog setting page
  • As a user, I want to update the setting of blog page
  • As a user, I want to disable her blog
  • As an admin, I want to see the list of blogs
  • As an admin, I want to modify/delete the blog of any user

BlogCore.App issue

Hi sir.
Thanks for amazing commenting and helpful details
If is possible I need some help at running BlogCore.App. I am student and I cant understand why got this errors:
ERROR in [at-loader] ./ClientApp/containers/Blog/BlogForm.tsx:133:19 TS2322: Type '{ name: "moderateComments"; placeholder: "Moderate comments"; component: typeof Checkbox; }' is not assignable to type '(IntrinsicAttributes & IntrinsicClassAttributes<Field<GenericFieldHTMLAttributes>> & Readonly<{ c...'. Type '{ name: "moderateComments"; placeholder: "Moderate comments"; component: typeof Checkbox; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Field<GenericFieldHTMLAttributes>> & Readonly<{ ch...'. Type '{ name: "moderateComments"; placeholder: "Moderate comments"; component: typeof Checkbox; }' is not assignable to type 'Readonly<BaseFieldProps<GenericFieldHTMLAttributes> & TextareaHTMLAttributes<HTMLTextAreaElement>>'. Types of property 'component' are incompatible. Type 'typeof Checkbox' is not assignable to type '"input" | "select" | "textarea" | ComponentClass<(InputHTMLAttributes<HTMLInputElement> & Wrapped...'. Type 'typeof Checkbox' is not assignable to type 'StatelessComponent<(InputHTMLAttributes<HTMLInputElement> & WrappedFieldProps) | (SelectHTMLAttri...'.
And 4 mores like this
in [at-loader] ./ClientApp/containers/Blog/BlogForm.tsx:133:19
&
in [at-loader] ./ClientApp/redux/modules/blog.ts:281:14
&
in [at-loader] ./ClientApp/redux/modules/common.ts:20:14
&
in [at-loader] ./node_modules/rxjs/scheduler/VirtualTimeScheduler.d.ts:22:22

Thanks

Project unable to load

I just downloaded this project and opened it in Visual Studio 2017 (15.9.4) and I am recieving errors on all the "Host" projects. Seems like something in the .csproj files is missing, I recieve the error "Project file is incomplete. Expected imports are missing.

When I tried to restore the Nuget packages I did notice one error "Package Microsoft.EntityFrameworkCore.Tools.DotNet 2.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.EntityFrameworkCore.Tools.DotNet 2.0.0 supports: netcoreapp2.0 (.NETCoreApp,Version=v2.0) BlogCore.Migrator"

while waiting for an application based on net.core 3.0. from you, I tried to be able to use the netcore 2.0 application. but an error appeared.

haii...@thangchung
i am student. i'm learning clean code architecture. for this sample code.
i already tried in windows powershell

dotnet restore
npm install
node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js
node node_modules/webpack/bin/webpack.js

(my version node v11.14.0 and npm v6.9.1-next.0)
is this problem in typescript depencies or redux >?

thanks you.
Bion

and this is the result :


Hash: 609dbf83acef32af8343393c000451260c5b0501
Version: webpack 3.12.0
Child
    Hash: 609dbf83acef32af8343
    Time: 47667ms
                                   Asset      Size  Chunks                    Chunk Names
    674f50d287a8c48dc19ba404d20fe713.eot    166 kB          [emitted]         
    b06871f281fee6b241d60582ae9369b9.ttf    166 kB          [emitted]         
    912ec66d7572ff821749319396470bde.svg    444 kB          [emitted]  [big]  
    2fe2efe63441d830b1acd106c1fe8734.svg    239 kB          [emitted]         
                          main-client.js   2.15 MB       0  [emitted]  [big]  main-client
                                site.css    924 kB       0  [emitted]  [big]  main-client
                      main-client.js.map   2.56 MB       0  [emitted]         main-client
                            site.css.map  85 bytes       0  [emitted]         main-client
    
    ERROR in [at-loader] ./ClientApp/containers/Blog/BlogManagement.tsx:12:23 
        TS2344: Type '{ page: number; }' does not satisfy the constraint '{ page?: string | undefined; }'.
      Types of property 'page' are incompatible.
        Type 'number' is not assignable to type 'string | undefined'.
    
    ERROR in [at-loader] ./ClientApp/redux/modules/blog.ts:281:14 
        TS2322: Type '(state: BlogState, action: KnownAction) => BlogState | { blogSelected: any; loaded: true; loading...' is not assignable to type 'Reducer<B
logState>'.
      Types of parameters 'action' and 'action' are incompatible.
        Type 'AnyAction' is not assignable to type 'KnownAction'.
          Type 'AnyAction' is not assignable to type 'DeleteBlogFailedAction'.
            Property 'error' is missing in type 'AnyAction'.
    
    ERROR in [at-loader] ./ClientApp/redux/modules/common.ts:20:14 
        TS2322: Type '(state: CommonState, action: RedirectToAction) => CommonState | { to: string | null; redirectTo: ...' is not assignable to type 'Reducer<C
ommonState>'.
      Types of parameters 'action' and 'action' are incompatible.
        Type 'AnyAction' is not assignable to type 'RedirectToAction'.
          Property 'to' is missing in type 'AnyAction'.
    Child extract-text-webpack-plugin ../../../../../../../../Dermawan Gasali\source\repos\bionstt\blog-core\src\hosts\BlogCore.App\node_modules\extract-text-we
bpack-plugin\dist ../../../../../../../../Dermawan Gasali\source\repos\bionstt\blog-core\src\hosts\BlogCore.App\node_modules\css-loader\index.js!../../../../../
../../../Dermawan Gasali\source\repos\bionstt\blog-core\src\hosts\BlogCore.App\node_modules\font-awesome\css\font-awesome.min.css:
         3 assets
    Child extract-text-webpack-plugin ../../../../../../../../Dermawan Gasali\source\repos\bionstt\blog-core\src\hosts\BlogCore.App\node_modules\extract-text-we
bpack-plugin\dist ../../../../../../../../Dermawan Gasali\source\repos\bionstt\blog-core\src\hosts\BlogCore.App\node_modules\css-loader\index.js!../../../../../
../../../Dermawan Gasali\source\repos\bionstt\blog-core\src\hosts\BlogCore.App\node_modules\simple-line-icons\css\simple-line-icons.css:
         1 asset
Child
    Hash: 393c000451260c5b0501
    Time: 29999ms
             Asset     Size  Chunks                    Chunk Names
    main-server.js  4.86 MB       0  [emitted]  [big]  main-server
    
    ERROR in [at-loader] ./ClientApp/containers/Blog/BlogManagement.tsx:12:23 
        TS2344: Type '{ page: number; }' does not satisfy the constraint '{ page?: string | undefined; }'.
      Types of property 'page' are incompatible.
        Type 'number' is not assignable to type 'string | undefined'.
    
    ERROR in [at-loader] ./ClientApp/redux/modules/blog.ts:281:14 
        TS2322: Type '(state: BlogState, action: KnownAction) => BlogState | { blogSelected: any; loaded: true; loading...' is not assignable to type 'Reducer<B
logState>'.
      Types of parameters 'action' and 'action' are incompatible.
        Type 'AnyAction' is not assignable to type 'KnownAction'.
          Type 'AnyAction' is not assignable to type 'DeleteBlogFailedAction'.
            Property 'error' is missing in type 'AnyAction'.
    
    ERROR in [at-loader] ./ClientApp/redux/modules/common.ts:20:14 
        TS2322: Type '(state: CommonState, action: RedirectToAction) => CommonState | { to: string | null; redirectTo: ...' is not assignable to type 'Reducer<C
ommonState>'.
      Types of parameters 'action' and 'action' are incompatible.
        Type 'AnyAction' is not assignable to type 'RedirectToAction'.
          Property 'to' is missing in type 'AnyAction'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.