{"id":18024202,"url":"https://github.com/robisim74/angularspawebapi","last_synced_at":"2025-04-07T15:09:23.749Z","repository":{"id":143842291,"uuid":"71389996","full_name":"robisim74/AngularSPAWebAPI","owner":"robisim74","description":"Angular Single Page Application with an ASP.NET Core Web API that uses token authentication","archived":false,"fork":false,"pushed_at":"2024-02-29T21:10:48.000Z","size":5917,"stargazers_count":230,"open_issues_count":1,"forks_count":58,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-03-31T12:09:26.695Z","etag":null,"topics":["angular","aspnetcore","authentication","identityserver","typescript","visual-studio","webapi"],"latest_commit_sha":null,"homepage":"","language":"C#","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/robisim74.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-19T19:01:59.000Z","updated_at":"2025-03-03T20:48:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"29429f72-688f-4f2d-9ca1-83aa1c08ce86","html_url":"https://github.com/robisim74/AngularSPAWebAPI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robisim74%2FAngularSPAWebAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robisim74%2FAngularSPAWebAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robisim74%2FAngularSPAWebAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robisim74%2FAngularSPAWebAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robisim74","download_url":"https://codeload.github.com/robisim74/AngularSPAWebAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675597,"owners_count":20977376,"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":["angular","aspnetcore","authentication","identityserver","typescript","visual-studio","webapi"],"created_at":"2024-10-30T07:12:09.841Z","updated_at":"2025-04-07T15:09:23.723Z","avatar_url":"https://github.com/robisim74.png","language":"C#","readme":"# Angular SPA Web API\n\n\u003e **Angular v7** Single Page Application with an ASP.NET Core WebAPI that uses token authentication. \n\u003e The OAuth 2.0 [Resource Owner Password Credentials grant](https://tools.ietf.org/html/rfc6749#section-4.3) (ROPC) is implemented using IdentityServer4 \n\u003e and ASP.NET Core Identity as membership system with a SQLite database.\n\nGet the [Changelog](https://github.com/robisim74/AngularSPAWebAPI/blob/master/CHANGELOG.md).\n\n[Explanation](https://github.com/robisim74/AngularSPAWebAPI/blob/master/EXPLANATION.md).\n\n\u003e ROPC grant requires the use of SSL.\n\n\u003e For more complex scenarios, where web services are required by more than one application or third-party applications, \nyou should use an OpenID Connect implicit flow.\n\n## Features\n- Angular v7 \u0026 ASP.NET Core 2.1\n- Angular CLI\n- AoT compilation in development \u0026 production mode\n- Angular CLI, .NET Core CLI or Visual Studio 2017\n- Angular Material\n- IdentityServer4 \u0026 ASP.NET Core Identity\n- Resource Owner Password Credentials grant\n- Refresh token\n- Role based Authorization\n- Development, Staging \u0026 Production environments\n\n## Project structure\nThe structure of the project is based on [Angular CLI ASP.NET Core](https://github.com/robisim74/AngularCliAspNetCore).\n\n**AngularSPAWebAPI**\n- **ClientApp** _Angular application_\n- **Controllers**\n\t- **IdentityController.cs** _Identity APIs_\n\t- **ValuesController.cs** _Resources APIs_\n- **Data** _Entity Framework_ migrations\n- **Models**\n\t- **ApplicationUser.cs** _Profile data for application users_\n- **Properties**\n\t- **lanchSettings.json** _ASP.NET Core environments_\n- **Services**\n\t- **DbInitializer.cs** _Provides method to populate the db_\n- **wwwroot** _Root for Angular application deployment_\n- **Config.cs** _IdentityServer4 configuration_\n- **IdentityDB.sqlite** _SQLite database_\n- **Startup.cs** _WebAPI configuration_\n\n## Installing\n- Requirements\n\t- At least [.NET Core 2.1](https://www.microsoft.com/net/download/core)\n\t- [Node.js and npm](https://nodejs.org)\n    - At least [Angular CLI 7.0.0](https://github.com/angular/angular-cli)\n\n#### Command line \u0026 .NET Core CLI\n- In _ClientApp_ folder run: `npm install`\n- `dotnet build`\n\n#### Visual Studio 2017\n- In _ClientApp_ folder run: `npm install`\n- Build the solution\n\n## Running\nThe app will be served on `https://localhost:5001`\n\n### Command line \u0026 .NET Core CLI\n#### Development\n- `dotnet watch run`\n\n#### Staging\n- In _ClientApp_ folder run: `npm run build:staging`\n- `dotnet run --launch-profile Staging`\n\n### Visual Studio 2017\n#### Development\n- Select _AngularSPAWebAPI_ profile\n- Start debugging\n\n#### Staging\n- In _ClientApp_ folder run: `npm run build:staging`\n- Select _Staging_ profile\n- Start debugging\n\n## Deployment\n- In _ClientApp_ folder run: `npm run build:prod`\n- Publish\n\n## Changing db\nTo use another database, for example _SQLServer_:\n- Edit in _Startup.cs_:\n```C#\nservices.AddDbContext\u003cApplicationDbContext\u003e(options =\u003e\n    options.UseSqlServer(Configuration.GetConnectionString(\"DefaultConnection\")));\n```\n- Edit `ConnectionStrings` in _appsettings.json_:\n```Json\n\"ConnectionStrings\": {\n  \"DefaultConnection\": \"Server=(localdb)\\\\mssqllocaldb;Database=IdentityDB;Trusted_Connection=True;MultipleActiveResultSets=true\"\n}\n```\n\n## License\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobisim74%2Fangularspawebapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobisim74%2Fangularspawebapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobisim74%2Fangularspawebapi/lists"}