Giter Site home page Giter Site logo

nathaliespierings / aspnetcore-react-identity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rodtsan/rbac-react-ts-aspnetcore

0.0 0.0 0.0 12.64 MB

A starter template for implementing JWT token from ASP.NET Core Identity project and applying the JWT token authentication on React TS application

License: MIT License

Shell 0.10% JavaScript 1.79% C# 32.26% TypeScript 61.63% HTML 1.97% EJS 0.72% SCSS 1.52%

aspnetcore-react-identity's Introduction

Welcome to RBAC-REACT-TS-ASPNETCORE

A starter template for implementing JWT token from ASP.NET Core Identity project and applying that JWT token authentication on React TS application

This is a basic implementation of role-based access control which can be fully controlled from an Admin panel instead of hard coding the permissions inside of your code. This implementation covers the scenario of a basic microservice based system where the users can be having different roles and based on their roles, their permission will be different accross both in the Client side and in the Server side.

Technology used

This repository uses a number of frameworks and libraries to work:

  • ReactJS - A JavaScript library for building user interfaces.
  • TypeScript - TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.
  • Redux - A Predictable State Container for JS Apps.
  • Firebase/Storage - Cloud Storage for Firebase is a powerful, simple, and cost-effective object storage service built for Google scale.
  • ASP.NET Core Identity - Is an API that supports user login functionality. Manages users, passwords, profile data, roles, claims, tokens, email confirmation, and more.
  • CQRS pattern - CQRS stands for Command and Query Responsibility Segregation, a pattern that separates read and update operations for a data store.
  • SQL Server - SQL Server Express is a free edition of SQL Server
  • Swagger UI - Swagger (OpenAPI) is a language-agnostic specification for describing REST APIs. It allows both computers and humans to understand the capabilities of a REST API without direct access to the source code.

Installation and Run

The database file (App_Data/AspNetIdentity-Localdb) is already in the project, so you do not have to worry about setting up the database and running the application locally. You can simply run the application through Visual Studio or VS Code IDE.

To run server

    cd API/src/RS_Services_API
    dotnet restore
    dotnet run

Verify the deployment by navigating to your server address in your preferred browser.

    http://localhost:5000/swagger/index.html

If you want to create your database by yourself, here is what need to do.

  • Open the file appSettings.json inside the RS_Services_API folder and provide your connection string.
    "DefaultConnection": "YOUR CONNECTION STRING"
  • Then run the following command for migrations.
    dotnet ef migrations add InitialCreate --context ProfileDbContext
    dotnet ef database update --context ProfileDbContext
  • If dotnet-ef tool is not installed then
    dotnet tool install --global dotnet-ef

To run client

    cd React_Client
    npm install
    npm start

Verify the deployment by navigating to your client address in your preferred browser.

    http://localhost:3002/

Screenshots

  • Login Page alt text
  • Manage Users alt text
  • Manage Roles alt text
  • My Profile alt text
  • API in Swagger UI alt text

MIT LICENSE

The source code for the site is licensed under the MIT license, which you can find in the LICENSE.md file.

aspnetcore-react-identity's People

Contributors

rodrigosantos-ubidy avatar rodtsan avatar

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.