{"id":13432104,"url":"https://github.com/pauldotknopf/react-aspnet-boilerplate","last_synced_at":"2025-04-07T06:11:37.761Z","repository":{"id":57248506,"uuid":"52167974","full_name":"pauldotknopf/react-aspnet-boilerplate","owner":"pauldotknopf","description":"A starting point for building isomorphic React applications with ASP.NET Core, leveraging existing techniques.","archived":false,"fork":false,"pushed_at":"2018-05-22T05:31:30.000Z","size":3723,"stargazers_count":287,"open_issues_count":13,"forks_count":51,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-03-31T04:06:00.460Z","etag":null,"topics":["asp-net","asp-net-core","asp-net-mvc","c-sharp","mvc","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pauldotknopf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-20T18:15:35.000Z","updated_at":"2024-10-20T12:48:23.000Z","dependencies_parsed_at":"2022-08-24T16:11:05.912Z","dependency_job_id":null,"html_url":"https://github.com/pauldotknopf/react-aspnet-boilerplate","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldotknopf%2Freact-aspnet-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldotknopf%2Freact-aspnet-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldotknopf%2Freact-aspnet-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldotknopf%2Freact-aspnet-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pauldotknopf","download_url":"https://codeload.github.com/pauldotknopf/react-aspnet-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601448,"owners_count":20964864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asp-net","asp-net-core","asp-net-mvc","c-sharp","mvc","react"],"created_at":"2024-07-31T02:01:08.611Z","updated_at":"2025-04-07T06:11:37.734Z","avatar_url":"https://github.com/pauldotknopf.png","language":"JavaScript","funding_links":[],"categories":["Starter Kits","Boilerplate","入门套件"],"sub_categories":["Workflow","Other","工作流"],"readme":"# react-aspnet-boilerplate\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"/resources/preview-thumbnail.jpg\" /\u003e\n\u003c/p\u003e\n\nA starting point for building universal/isomorphic React applications with ASP.NET Core 1, leveraging existing front-end approaches. Uses the [JavaScriptViewEngine](https://github.com/pauldotknopf/javascriptviewengine).\n\n## Goals\n\n1. **Minimize .NET's usage** - It's only usage should be for building REST endpoints (WebApi) and providing the initial state (pure POCO). No razor syntax *anywhere*.\n2. **Isomorphic/universal rendering**\n3. **Client and server should render using the same source files (javascript)**\n4. **Out-of-the-box login/register/manage functionality** - Use the branch ```empty-template``` if you wish to have a vanilla React application.\n\nThis approach is great for front-end developers because it gives them complete control to build their app as they like. No .NET crutches (bundling/razor). No opinions. No gotchas. Just another typical React client-side application, but with the initial state provided by ASP.NET for each URL.\n\n## Getting started\n\nThe best way to get started with this project is to use the Yeoman generator.\n\n```bash\nnpm install -g yo\nnpm install -g generator-react-aspnet-boilerplate\n```\n\nThen generate your new project:\n\n```\nyo react-aspnet-boilerplate\n```\n\nYou can also generate a clean template (no authentication/account management) with another generator:\n\n```bash\nyo react-aspnet-boilerplate:empty-template\n```\n\nAfter you have your new project generated, let's run that app!\n\n```bash\ncd src/ReactBoilerplate\nnpm install\ngulp\ndotnet restore\n# The following two lines are only for the 'master' branch, which has a database backend (user management).\n# They are not needed when using 'empty-template'.\ndotnet ef migrations add initial\ndotnet ef database update\ndotnet run\n```\n\n\nSome of the branches in this repo that are maintained:\n* [```master```](https://github.com/pauldotknopf/react-aspnet-boilerplate/tree/master) - This is the main branch. It has all the stuff required to get you started, including membership, external logins (OAuth) and account management. This is the default branch used with the Yeoman generator.\n* [```empty-template```](https://github.com/pauldotknopf/react-aspnet-boilerplate/tree/empty-template) - This branch for people that want an empty template with the absolute minimum recommend boilerplate for any ASP.NET React application.\n\n## The interesting parts\n\n- [client.js](https://github.com/pauldotknopf/react-dot-net/blob/master/src/ReactBoilerplate/Scripts/client.js) and [server.js](https://github.com/pauldotknopf/react-dot-net/blob/master/src/ReactBoilerplate/Scripts/server.js) - The entry point for the client-side/server-side applications.\n- [Html.js](https://github.com/pauldotknopf/react-dot-net/blob/master/src/ReactBoilerplate/Scripts/helpers/Html.js) and [App.js](https://github.com/pauldotknopf/react-dot-net/blob/master/src/ReactBoilerplate/Scripts/containers/App/App.js) - These files essentially represent the \"React\" version of MVC Razor's \"_Layout.cshtml\".\n- [Controllers](https://github.com/pauldotknopf/react-aspnet-boilerplate/tree/master/src/ReactBoilerplate/Controllers) - The endpoints for a each initial GET request, and each client-side network request.\n\n## What is next?\n\nI will be adding features to this project as time goes on to help me get started with new React projects in .NET. So, expect some more things. I am also open to contributions or recommendations.\n\nI took a lot of things from [react-redux-universal-hot-example](https://github.com/erikras/react-redux-universal-hot-example), but not everything. As time goes on, expect to see more of the same patterns/technologies/techniques copied over.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauldotknopf%2Freact-aspnet-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpauldotknopf%2Freact-aspnet-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauldotknopf%2Freact-aspnet-boilerplate/lists"}