Giter Club home page Giter Club logo

corewiki's Introduction

CoreWiki

A simple ASP.NET Core wiki that we are working on during live coding streams. It runs on Windows, Mac, Linux and Container. Core Wiki is an allusion to the Core App. This name was suggested by Shayne Boyer in the stream of the 27th/March. Initially this project is very basic and anyone who is learning ASP.NET Core 2.0 (Razor Pages) can use it to learn.

To learn more about Jeff's stream check his Live Stream Repository.

Table of contents

Explore a CoreWiki live demo at https://corewiki.info/

Note: You must have nodejs with npm, and .NET Core installed

To run the latest version of CoreWiki on your local dev machine, open your favorite terminal on an operating system of your choice, and execute the following:

git clone https://github.com/csharpfritz/CoreWiki.git
cd CoreWiki\CoreWiki
npm install
dotnet run

๐Ÿ’ก Tips: you can also use the watch command, it will rebuild CoreWiki when you do any code change dotnet watch run

Fastest way to ship your own instance is to try our Deploy to Azure button, but you can deploy to a cloud provider of your choice.

Deploy to Azure

FAQ

I want to contribute:

@csharpfritz is inviting for new and old to learn together with team stream, and make a pull request. A more descriptive contributing guide is written here: contributing

  • To find task that has been discussed, search in the issues for help-wanted here
  • If you see TODO in code, or see small improvements in current functionality, you are also welcome to make a pull-request
  • If you want to try adding a new feature, please open an issue so @csharpfritz can review the idea

You shouldn't see this problem any longer, as the latest versions of CoreWiki now include an initial start wizard that allows you to create a default administrator user. If you are using an older version of CoreWiki, follow these steps:

  1. Register a new account (it won't have administrator rights for obvious reasons).
  2. Sign in as the default administrator (username: [email protected], password: Admin@123), and go to the User Admin page from the main menu up top.
  3. Scroll down, find the user you just registered, and give them the administrator role.
  4. From the main menu again, click the email address near the Logout button to open the profile manager.
  5. Click on the Personal Data sub-menu, and delete this default admin account.

HomePage - It's not a page or a feature. This is a default article that is presented as if it were the Home. When the user navigate to /Details, if topicName is not specified, the application redirect to default Article (HomePage)

Header Menu

  • Allows the users navigate to the Default article (HomePage). [Back to Home (CoreWiki)]
  • Allows the users navigate to LatestChanges articles feature.[LatestChanges]
  • Allows the users navigate to Create new article feature. [Create new article]
  • Allows the users navigate to All articles feature. [All]

Details

  • Allows the users see details of article.
  • Allows the users navigate to Edit feature. [Edit]
  • Allows the users navigate to the Default Article (HomePage). [Back to Home]
  • Allows the users see comments list
  • Allows the users add new comment[New Comment]

Create

  • Allows the users create a new article. When success, redirect the user to Details Feature. Otherwise, stay in the page and show error message. [Create]
  • Allows the users to navigate to the default article (HomePage). [Back to Home]

Edit

  • Allows the users change the article (Topic, Published and Content).
  • Allows the users navigate to the default article (HomePage). [Back to Home]

Delete

  • Allows the users delete the article (Topic, Published and Content).
  • Allows the users navigate to the default article (HomePage). [Back to Home]

LatestChanges


  • Allows the users see the last 10 articles. Ordered by Published Date.
  • Allows the users navigate to Edit feature. [Edit]
  • Allows the users navigate to Delete feature. [Delete]
  • Allows the users navigate to Details feature. [Detail]
  • Allows the users navigate to Create new article feature. [New article]
  • Allows the users navigate to the default article (HomePage).[Back to Home]

List All


  • Allows the users see ALL articles. Ordered by Topic.
  • Allows the users navigate to Edit feature. [Edit]
  • Allows the users navigate to Delete feature. [Delete]
  • Allows the users navigate to Details feature. [Detail]
  • Allows the users navigate to Create new article feature. [New article]
  • Allows the users navigate to the default article (HomePage).[Back to Home]
  • Allows the users navigate to Latest Changes feature. [Latest Changes]

Search engine friendly URL's


[Description]

NotFound


  • Occurs, always which an page is not found.

Error


  • When an exception occur, o user is redirected to error page. [Not Simulated].

Build Status

CoreWiki is built and tested continuously by Azure Pipelines. Shortly after you submit a pull request you can check the build status notification. All contributions encouraged!

Archive of all shows from the stream can be found on Jeff's YouTube 'Building the CoreWiki' playlist.

Recordings Index

Date Topic
March 27, 2018 From DevIntersection in Orlando, ASP.NET Core with guest Shayne Boyer
March 29, 2018 Back in Philly working on our new Wiki project - Start 00:52:50
April 5, 2018 Building a Wiki with ASP.NET Core - Updating to Bootstrap 4 - Start 00:28:40
April 10, 2018 Pair-programming with Jon Skeet, Handling Dates and Times
April 12, 2018 Pair-programming with YOU! Your .NET questions and pull-requests - Start 00:23:05
April 14, 2018 Coding ASP.NET Core: Building a Wiki
April 19, 2018 Chill coding today.. good music, good code, and YOU!
May 3, 2018 Answering your questions, reviewing pull-requests, and May is for Macs continues! - Start 00:22:55
May 5, 2018 ASP.NET Core, live interactions with SignalR, and YOUR pull requests - No Video Available
May 22, 2018 May is for Macs - Reviewing GitHub scoreboard widget and working on our Wiki - Start 01:09:27
May 24, 2018 May is for Macs - Working with Gravatar and Updating to ASP.NET Core 2.1
May 26, 2018 May is for Macs - Building an RSS Feed and adding some AI to our Bot - Start 00:18:47
May 29, 2018 May is for Macs - Reviewing Pull Requests and making the realtime web with SignalR
May 31, 2018 The end of May is for Macs - Completing our realtime GitHub scoreboard SignalR - First hour
June 2, 2018 Finishing the GitHub Scoreboard and merging YOUR pull-requests - First hour
June 7, 2018 Dotnet global tools and reviewing pull requests to the CoreWiki project
June 9, 2018 DotNet Global Tools - Delivering Sample Code Easier than Ever - Start 00:32:48
June 12, 2018 Upgrading to ASP.NET Core 2.1.1 and finishing our .NET global tool - Start 00:24:07
June 14, 2018 Monitoring Applications with Isaac Levin
June 16, 2018 Authorization in C# and ASP.NET Applications, plus YOUR Pull Requests - Start 00:15:20
June 19, 2018 Notifications and Razor Pages in ASP.NET Core with Amanda Iverson
June 23, 2018 Reviewing Pull Requests and talking about ASP.NET Performance
June 28, 2018 Completing historical data storage and reviewing your pull requests
June 30, 2018 Reviewing Pull Requests and Discussing Dependency Injection - Last 20 minutes
July 3, 2018 Building a user-interface to compare wiki article versions
July 5, 2018 Day after Independence Day, building web pages with ASP.NET Core - Start 00:41:15
July 7, 2018 Refactoring and Pull requests | C# | ASP.NET Core - Start 00:29:45 for about 15 minutes
July 10, 2018 Refactoring and the Repository Pattern | C# | ASP.NET Core
July 12, 2018 Refactoring to support better unit tests | C# | ASP.NET Core
July 14, 2018 Entity Framework Migrations | C# | Entity Framework | ASP.NET Core
July 19, 2018 Authorization Policies and Security Enforcements | C# | ASP.NET Core
July 21, 2018 Architecture Review and Refactoring | C# | ASP.NET Core
July 21, 2018 Architecture Review and Refactoring | C# | ASP.NET Core
July 26, 2018 Application Extensibility | C# | ASP.NET Core
July 27, 2018 More Architecture Review and Updates for CoreWiki | C# | ASP.NET Core
July 28, 2018 Simplifying Search Pages | C# | ASP.NET Core
August 3, 2018 Pull Request Reviews and more Twitter Integration | JavaScript | C# | ASP.NET
August 4, 2018 Writing code, Refactoring DTOs from Entity Framework | C# | ASP.NET
August 7, 2018 Introducing Models to an Application | C# | ASP.NET
August 9, 2018 Refactoring to Domain Models in an Application | C# | ASP.NET
August 11, 2018 Introducing the CQRS Architecture Pattern with MediatR | C# | ASP.NET
August 14, 2018 More work with the CQRS Architecture Pattern and MediatR | C# | ASP.NET
August 16, 2018 Unit Testing the CQRS Architecture Pattern | C# | ASP.NET Core
August 17, 2018 Building The CoreWiki - New Commands and Queries | C# | ASP.NET Core
August 18, 2018 Introducing Automapper to CoreWiki | C# | ASP.NET Core
August 25, 2018 Jeff is BACK! Talking about Twitch APIs and software architecture in CoreWiki | C#
August 31, 2018 Fixing ASP.NET Core in a Container and YOUR Pull Requests | C# | ASP.NET Core
September 1, 2018 Refactoring and Deploying our CoreWiki Application to Azure | C# | ASP.NET Core
September 6, 2018 Refactoring and Adding a 'Deploy to Azure' button to CoreWiki
September 7, 2018 Adding Postgres to Corewiki and running Wordpress on .NET with PeachPie
September 11, 2018 Talking about Real World ASP.NET Core with Javier Lozano | C# | ASP.NET Core
September 13, 2018 The Legacy of Code with Kathleen Dollard | C# | ASP.NET Core
September 20, 2018 CoreWiki Meets Azure DevOps | Azure DevOps | ASP.NET Core
September 20, 2018 CoreWiki Continuous Integration | Azure DevOps | ASP.NET Core

Series Topic
Architecture Workshop 1 of 7 Steve Smith shows us Clean Architecture
Architecture Workshop 2 of 7 Julie Lerman introduces Domain Driven Design
Architecture Workshop 3 of 7 Jimmy Bogard, MediatR and the CQRS pattern
Architecture Workshop 4 of 7 Mark Miller talks about the Science of Great User Interfaces
Architecture Workshop 5 of 7 Miguel Castro Makes our Application More Extensible
Architecture Workshop 6 of 7 Cecil Phillip Shows Azure Functions and Serverless Concepts
Architecture Workshop 7 of 7 Steve Lasker Shows Us the How and Why of Containers and Azure

corewiki's People

Contributors

amoenus avatar argtang avatar ashleybroughton avatar bradygaster avatar bravecobra avatar c17r avatar casrou avatar cmjchrisjones avatar csharpfritz avatar danielmpetrov avatar dannyallegrezza avatar danroth27 avatar devlead avatar devopschallengebr avatar emo333 avatar eonasdan avatar erwindevreugd avatar essenbee avatar fboucher avatar ivandrofabiaefilhos avatar justcallmead avatar kim95748 avatar nmalocic avatar parithon avatar pete-a avatar seangwright avatar smabuk avatar sputier avatar sql-mistermagoo avatar wintermute21 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

corewiki's Issues

Missing jquery.validate.unobtrusive.js

I was watching the youtube video from the last stream (5-3-2018) and noticed at 2:19:40 that this js was giving a 404 in the developer tools. That is probably what is keeping the modelstate errors from displaying corrrectly.

Fix: Label to New Article

In different locations, we use different labels, for the same functionality:

Page Label Label (Suggested) Comments
_Layout.cshtml Create Page [New article]
LatestChanges.cshtml Create New [New article] We could think to remove, because it's duplicated.

My Articles

Allow authors list your articles

Suggested Columns:

  • [Title], [Create Date], [Last Changed Date] and [Status]

Article Ratings

Needs another table with article, rating, date of rating, article version, some user information

Add Images

Need to be able to upload images for articles

Support WikiText

Need to be able to reference an article using PascalCase and have it converted into a link to another article

Create/Edit: Problem when I type an very long text in the topic field

When I type an very long text in the topic field an exception is displayed. I think it's the limite of URL address.

Ex:

  • [TOPIC] = HomePage dssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss ddddddddddddddddddddddddddddddddddd d d

OBS:

  • [Edit] and [Create] the same problem.

Edit is not working

In All.cshtml we are using:
asp-route-id="@item.Id" to form parameters for edit but in Edit.cshtml.cs we are trying to load using topic: SingleOrDefaultAsync(m => m.Topic == id)

We could edit Edit.cshtml.cs to take int Id as input, and remove first null check while chaning linq query to be SingleOrDefaultAsync(m => m.Id == id)

edit article topics

Please re-enable being able to edit the topic as some times you need to fix simple things like spelling mistakes. Now the wiki uses an id an as key I don't see any reason why we can't edit the article topics.

Internationalization - Globalization and Localization

Suggests:

  • Make content localizable (Labels, DataAnnotations, ModelStateError, Dates)
  • Provide localized resources for the languages and cultures you support (for example: pt-BR, en-US)
  • Implement a strategy to select the language/culture for each request

Article Status

Suggested:

  • Draft - Only the owner/author can visualize and does not appear in the searchs
  • Published - Everyone can visualize and appear in the searchs
  • Deleted - Only the owner/author can visualize and does not appear in the searchs

Fix: Label Back to ????

In different locations, we use different labels, for the same functionality:

Page Current Suggested
Delete.cshtml Back to Home Page Back to Home
Edit.cshtml Back to List Back to Home
Create.cshtml Back to List Back to Home

Search

Need to add search - full text search of content

Change route definition

Currently we are using querystring to [edit] and [delete] an article. How to change the route to action/topic.

Ex:

  • /Edit/{Topic}
  • /Delete/{Topic}

@csharpfritz: I understand that for [Details], [Create] and [LatestChanges] is resolved. Correct?

  • /{Topic}
  • /Create
  • /LatestChanges

RSS feed

RSS feed of recently changes articles

Start using viewmodel classes instead of using our EF classes directly

When I watched the Jeff's livestream at Build I noticed a bug in my code in the edit page. I did not check this correctly and both my fix and the code Jeff did on stage do not feel the right way to do this.
Currently we push a complete EF Entity to the Page, and actually populate (data-bind) a full EF Entity as well.
But, when we start to add properties we might not need alle properties in a page, so posting all that data to the page is unnecessary.
Also when we do not form submit fields that we have put attributes on in the EF Entity, but we don't care about in the PageModel we run into problems with the databinding not being able to populate the Entity.
My pull request had that problem because I did not have some of the added code from the project_VersionsAndRatins branche.

Using viewmodels that only push the fields needed and only require back the fields we can actually fill or care about elevates this. Not only that it allows us to abstract away from the EF decorated classes to classes more closely resembling POCO classes.

issue with new url helper

Just tested the new UrlHelper with the following Article Topic (all the letters on my English keyboard):

--`~1!2@3#4$5%6^7&8*9(0)-_=+qQwWeErRtTyYuUiIoOpP[{]}\|aAsSdDfFgGhHjJkKlL;:'"zZxXcCvVbBnNmM,<.>/?--

and it creates the following url slug which does not work:

--`~1!2@3#4$5%6-7&8*9(0)--+qqwweerrttyyuuiioopp[{-}-|aassddffgghhjjkkll;:'"zzxxccvvbbnnmm-<->-?--

If I role back to the original UrlHelper that was created by the guys that run the SO site I get the following url slug that works properly:

123456-7890-qqwweerrttyyuuiioopp-aassddffgghhjjkkllzzxxcc

I think we need to rollback to the original UrlHelper as it has been tested on millions of stackoverflow pages & has also been tested with many other keyboards / languages.

CI/CD - In Azure Container Services

To prepare three environments to deploy application [DEV, HML and PRD] in AKS.

Suggested:

  • Use VSTS and Release in AKS (Azure Container Service)
  • To Define better branch strategy to CI/CD

Use CQRS Pattern

CoreWiki, seems to be simple to 10 users.

Now, let's imagine to 300mil users concurrents:

200.000 Queries concurrents (features search, track changes, article ratings
50.000 Updates concurrents (update comments, update images, update article ratings)
50.000 Inserts concurrents (add comments, add images, add article ratings)

My suggestions is:

  1. To explorer the CQRS Pattern
  2. Use an docker container to ( Queries)
  3. Use an docker container to ( Update, Delete, Insert)

OBS: See, I first think to change the database platform to SQL Server 2017. And both docker containers connected in another docker container with SQL Server 2017.

@csharpfritz, What do you think about that?

Featured Articles

As a minimum viable... this could just be a page that contains links to other pages

Fix Routing

Article topic should be the URL requested

Page to see ALL articles

We need an feature to list all articles. The feature LatestChanges list only 10 last published articles.

Suggested

  • Create an new [Articles List] to list all articles
  • [Articles List] should by our new home page
  • [Articles List] allows users navigate to follows features:
    • [Edit]
    • [Delete]
    • [Detail]

Initial Description to README.md

CoreWiki

A simple ASP.NET Core wiki that we are working on during live coding streams.

NOTE: This project is the result of some streams transmitted using TWITCH platform. To collaborate and understand the project, please see the follows streams:

Date Topic
March 27, 2018 From DevIntersection in Orlando, ASP.NET Core with guest Shayne Boyer
March 29, 2018 Back in Philly working on our new Wiki project - Start 00:52:50
April 5, 2018 Building a Wiki with ASP.NET Core - Updating to Bootstrap 4

1) Implemented Feature List

HomePage - It's not a page or a feature. This is a default article that is presented as if it were the Home. When the user navigate to /Details, if topicName is not specified, the application redirect to default Article (HomePage)

Header Menu

  • Allows the users navigate to the Default Article (HomePage). [Back to Home (CoreWiki)]
  • Allows the users navigate to LatestChanges feature.[LatestChanges]
  • Allows the users navigate to Create new article feature. [Create new article]

Details

  • Allows the users see details of article.
  • Allows the users navigate to Edit feature. [Edit]
  • Allows the users navigate to the Default Article (HomePage). [Back to Home]

Create

  • Allows the users create a new article. When success, redirect the user to Details Feature. Otherwise, stay in the page and show error message. [Create]
  • Allows the users to navigate to the default article (HomePage). [Back to Home]

Edit

  • Allows the users change the article (Topic, Published and Content).
  • Allows the users navigate to the default article (HomePage). [Back to Home]

LatestChanges

  • Allows the users see the last 10 articles. Ordered by Published Date.
  • Allows the users navigate to Edit feature. [Edit]
  • Allows the users navigate to Delete feature. [Delete]
  • Allows the users navigate to Detail feature. [Detail]
  • Allows the users navigate to Create new article feature. [Create new article]
  • Allows the users navigate to the default article (HomePage).[Back to Home]

NotFound

  • Occurs, always which default article (HomePage) is not found. To simulate page not found remove the article HomePage.

Error

  • When an exception occur, o user is redirected to error page. [Not Simulated].

2) Topics covered in previous streams

Lessons - Visual Studio Live Sharing Extension

  • Visual Studio Community x Visual Studio Code
  • Visual Studio Community x Visual Studio Community

Lessons - GitHub

  • Create New Repository
  • Create Branch (Master, Dev)

Lessons - Git Cli

  • Commit
  • Push
  • Clone
  • [Others ...]

Lessons - Nuget

  • Install Packages

Lessons - DOTNET Cli

  • Dotnet new globaljson --sdk-version 2.0.2

Lessons - ASP.NET Core

  • Navigation
  • Razor Pages
    • BindProperty
    • RedirectPage
  • Routing
    • Customization
    • Constraint
  • Dependency Injection
  • Tag Helpers
    • Install and Use External
  • Validation Error UI
  • Server-Side Validation
  • Configure Minification
  • Configure Bundling
  • Data Model
    • Add Data Model to a Razor Pages
    • Add Database connection string
    • Register the database context
    • Add database context class
    • Scaffold the Model
    • DataType Attributes
    • ModelState Validation

Lessons - Entity Framework Core

  • Code First Database
  • Migrations
  • Seed
  • CRUD (Create, Read, Update e Delete)
  • Update concurrency exception handling

Lessons - UI

  • Bootstrap 4
    • Cards

Microsoft.AspNetCore.App metapackage for ASP.NET Core 2.1

When use ASP.NET Core 2.1 or later, Microsoft recommends change the metapackage Microsoft.AspNetCore.All by Microsoft.AspNetCore.App.

1. Change the following entry in the CoreWiki.csproj:

  • FROM
    <PackageReference Include = "Microsoft.AspNetCore.All" Version = "2.1.0"
  • TO
    <PackageReference Include = "Microsoft.AspNetCore.App"/>

2. Install Microsoft.EntityFrameworkCore.Sqlite

  • Using Manage Nuget Packages install the Microsoft.EntityFrameworkCore.Sqlite Package (2.1.0)

OR

  • Manually add the following entry <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.0" />

2. Remove Microsoft.EntityFrameworkCore.Tools.DotNet

  • <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.1" />

Import File on creating/editing

We could have a feature, when creating or editing an article, to import a (.md) file and automatically fill the content field.

Convert to a PWA

This feels like a cool progressive web app waiting to happen!

UTC timestamps not being replaced in Edge

Timestamps are not being replaced by the site.js script on Edge (currently running v42.17133.1.0).

site.js generates an error:

SCRIPT438: Object doesn't support property or method 'Symbol.iterator'
on the line for (var ts of timeStamps)

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.