Powercat is a discussion board with colorful nested list style and depth control function, inspired by reddit and komica. Live Demo
React Core Boilerplate is a starting point for building universal/isomorphic React web applications with ASP.NET Core 3 and server-side rendering. All works fine out of the box. It also is helpful for newbies.
The project contains a fake authorization system. So you can change it to Identity or the other.
TypeScript and JavaScript versions are available.⚡️
- Migrated to .NET Core 3.1. 🎉
- Migrated to
Bootstrap 4
using react-bootstrap. - Migrated to Formik.
Redux
stores migrated to Redux Toolkit for boosting development with Redux. Reduced code.- Logging and
Serilog
configuration impovements. - Added HTTPS support to
server-side rendering
. - Added editable status code in routes for SEO.
- Updated some dependencies.
- Stability fixes.
- Removed unnecessary NPM dependencies.
- Updated
React
,Redux
,React-Router
and other NPM packages connected to them. - Updated critical NPM dependencies.
- Removed unnecessary NPM dependencies.
- Repository restructurization.
- Added JavaScript version of the React Core Boilerplate. 🎉
- Stability fixes.
- Updated critical dependencies.
- Removed
image-webpack-loader
due to instability.
- Installed stable
Terser
plugin. - Updated
React
and other packages for it (incl. types). - Updated
WebPack
. - Updated WebPack config for development mode.
- Updated
.NET Core
dependency tov. 2.2
. - Updated critical NPM packages.
- Updated
WebPack
dependencies. - Improved
WebPack
vendor and bundle configurations. - Improved
.csproj
file for building and publishing scenarios. - Fixed source map generation in development mode.
- Fixed bundle compilation in production mode.
- Other stability fixes.
- Added some minor features.
- Bug fixes:
collapsing of the Bootstrap navigation bar
,fixed controller and frontend's service in person update case
. - Updated dependencies.
- Added polyfills for supporting IE9, IE11:
@babel/polyfill
,custom-event-polyfill
. - Updated dependencies.
- Added fulltext live search to example.
- Added WebPack plugins:
case-sensitive-paths-webpack-plugin
,react-dev-utils
- Added plugins with examples:
awesome-debounce-promise
to prevent doing frequent queries in live search,formik
to create forms in React without tears. - Fixed some functional and text errors.
- Added
hosting.json
which contains hosting settings and will be used in the production build. - Added
bind-decorator
package and examples with it. - Speeded up of WebPack bundle building.
- Updated domain-wait package. This update allows you to prevent calling for isomorphic fetch requests twice (in server prerender and after it - on client side).
- Updated redux-thunk package.
- Added new React components to prevent a headake when you build web applications:
ModalComponent
,Input
,MultiSelect
,Form
. This components are used in examples.
- Added new feature allows web application to share browser's cookie with NodeServices. Now SSR generates HTML code for authenticated users and makes authenticated isomorphic requests.
- Added method
sendFormData
to theServiceBase.ts
which allows you to upload files to the server.
- Updated NPM packages:
react
,redux
,react-router
. - Replaced due to deprecation
react-router-redux
by the newconnected-react-router
. - Fixed
Loader
component which had trouble in some cases.
- Removed unused NPM packages.
- Added package-lock.json.
- Fixed project.
- Updated React package.
- Added the
AppComponent
component which allows you to do the "force update" of the "stucked" components (for ex.Loader
component inLoginPage
). - Added Serilog logger which log into files (
logs/
directory) and also into Azure Cloud Provider.
- Fixed
Loader
component which worked incorrect with SSR in some cases.
- Updated dependency of "ASP.NET Core" package due to vulnerability.
- Added feature which allows you to pass JSON objects to URL query for GET and DELETE methods.
- Fixed
AppRoute
component. Solved issue with passing params to components from React Router. If you want to fix it manually, see the commit here.
- Install latest .NET Core SDK and Runtime by link.
- Install of the latest stable Node.js.
- At the first run you must close project if it runs in Visual Studio or another IDE.
Open project's folder in console and run command
npm install
. - Type
npm run build:dev
for development, it will compile the main and vendor bundle. - If you are using Visual Studio 20xx, instead of
IIS Express
select theYourProjectName
orReactCoreBoilerplate
: click on the down arrow near theIIS Express
and choose the right option. - Build and run project. It will start in Windows Console.
If you modify the WebPack vendor config, you must manually recompile the vendor bundle.
Type npm run build:dev
to do this.
Third-party libraries:
- TypeScript - all frontend based on TypeScript.
- fork-ts-checker-webpack-plugin - Webpack plugin that runs typescript type checker on a separate process.
- React - main library which worked as isomorphic.
- React Router - router for React.
- react-bootstrap - Bootstrap 4 for React.
- React-Helmet - isomorphic SEO helpers.
- Redux - store.
- Redux Toolkit - library for boosting development with Redux.
- Formik - library for building forms for React.
- Connected React Router - Redux binding for React Router.
- SASS - CSS preprocessor.
- WebPack 4 - bundler.
- Axios - isomorphic fetch util.
- ts-nameof - allows you to use type-safe names of inputs in form.
- json-to-url - allows you to pass JSON objects to URL query for GET and DELETE methods.
- Serilog - allows you to log into files (
logs/
directory) and also into Azure Cloud Provider.
Own libraries / fixed forks:
- domain-wait - domain-task replacement with async/await support and new features.
- NVal - jQuery-validation-like Vanilla JS validator.
- NVal-Tippy - Vanilla JS validation with awesome tooltips.
- NSerializeJson - flexible form to JSON serializer based on Vanilla JS.
-
ERROR in ./ClientApp/styles/loaders/xxx.scss (./node_modules/css-loader/dist/cjs.js![...]): Error: ENOENT: no such file or directory, scandir 'xxx\node_modules\node-sass\vendor' Execute
npm i
andnpm rebuild node-sass
in your project's directory. -
WebPack Hot Module Replacement [HMR] doesn't work with IIS Will be fixed. Use Kestrel for development instead.
-
HTTP Error 500
Probably you don't have the latest version of Node.js. -
HTTP Error 502.5
You must install the latest "ASP.NET Core SDK" and "Runtime and Hosting Bundle" using this link: https://www.microsoft.com/net/download/dotnet-core/2.1 -
HTTP error 500 when hosted in Azure
Set the "WEBSITE_NODE_DEFAULT_VERSION" to 6.11.2 in the "app settings" in Azure. -
Errors when running in development mode after publishing
Executenpm run build:dev
command in the project's dir.
- If you will have any issue with project starting, you can see errors in logs ("/logs" directory). Please, do this before the open an issue on GitHub. Don't forget to mention the version of the React Core Boilerplate (
JavaScript
orTypeScript
)
- TypeScript project:
| .gitignore
| AppSettings.cs
| appsettings.Development.json
| appsettings.json
| Constants.cs # Constants include fake authorization cookie keys.
| package.json # NPM Package file.
| Program.cs # Application entry point.
| ReactSSR.WebApp.csproj # Visual Studio 2017 project file.
| ReactSSR.WebApp.csproj.user
| README.md
| Startup.cs
| tsconfig.json # TypeScript config file.
| webpack.config.js # Server and client-side rendering WebPack configurations.
| webpack.config.vendor.js # Server and client-side rendering WebPack Vendor configurations.
|
+---ClientApp
| | boot-client.tsx # Frontend client-side entry point.
| | boot-server.tsx # Frontend SSR entry point.
| | configureStore.ts # Redux store definitions.
| | global.d.ts # Global types definitions (e.g. ts-nameof, *.png, etc.)
| | Globals.ts # Incapsulates global isomorphic data (e.g. authorization data).
| | routes.tsx # Routes.
| | Ui.ts # Incapsulates UI helpers initialization (e.g. tooltips).
| | utils.ts # Helpful utils.
| |
| +---components # Components (not pages).
| | +---person
| | | PersonEditor.tsx # Example component.
| | |
| | \---shared # Shared components.
| | AppComponent.tsx # Allows you to make the "force update" of the stucked components.
| | AppRoute.tsx # Component for building routes with more than one layouts.
| | ErrorBoundary.tsx # Component based on the error boundary pattern.
| | Footer.tsx # Footer for authorized layout.
| | Loader.tsx # Loader component.
| | PagingBar.tsx # Paging component.
| | TopMenu.tsx # Top menu component for authorized layout.
| |
| +---images
| | logo.png # Boilerplate logo.
| |
| +---layouts # Layouts.
| | AuthorizedLayout.tsx
| | GuestLayout.tsx
| |
| +---models # Models which used in application.
| | ILoginModel.ts
| | IPersonModel.ts
| | IServiceUser.ts
| | ISessionData.ts
| | Result.ts # Result pattern realization.
| |
| +---pages # Application pages.
| | ExamplePage.tsx
| | HomePage.tsx
| | LoginPage.tsx
| |
| +---services # Isomorphic JS services which incapsulate the fetch logic.
| | AccountService.ts # Fake authorization service.
| | PersonService.ts # Example service.
| | ServiceBase.ts # Isomorphic service base.
| |
| +---store # Redux stores.
| | index.ts # Stores definition.
| | LoginStore.ts
| | PersonStore.ts # Example store definition.
| |
| \---styles
| authorizedLayout.scss # Styles for authorized layout.
| guestLayout.scss # Styles for guest layout.
| loader.scss # Loader component styles.
| main.scss # Common styles.
| preloader.css # First run preloader styles.
|
+---Controllers
| AccountController.cs # Fake accounts controller.
| ControllerBase.cs # Incapsulates fake authorization properties.
| MainController.cs # Entry point controller.
| PersonController.cs # Example controller.
|
+---Extensions
| ServiceCollectionExtensions.cs # Incapsulates methods which allow you to define lazy DI-containers.
|
+---Infrastructure # Folder for the infranstructure classes.
| ExceptionMiddleware.cs # Middleware which allows you to catch exceptions during the runtime.
| Result.cs # Result pattern realization on the server-side.
| ServiceBase.cs # Facade as service pattern base class.
|
+---Models
| LoginModel.cs # Model for fake authorization.
| PersonModel.cs # Model for the example.
| ServiceUser.cs
| SessionData.cs # Isomorphic session data.
|
+---Services # Contains server-side services implementations.
| AccountService.cs # Fake accounts service.
| PersonService.cs # Example service implementation.
|
+---Views
| | _ViewImports.cshtml
| | _ViewStart.cshtml
| |
| +---Main
| | Index.cshtml # Entry-point which incapsulates root app HTML container.
| |
| \---Shared
| Error.cshtml
|
\---wwwroot # Root folder where will be located client-side bundles.
favicon.ico
MIT