Git Product home page Git Product logo

processrus_coding_challenge's Introduction

ProcessRUs Coding Challenge

Welcome to the ProcessRUs Coding Challenge! This project is a demonstration of a .NET 7 application with JWT Authentication and SQL Server LocalDB.

Prerequisites

Before you begin, ensure you have the following installed:

  • .NET 7
  • SQL Server LocalDB

API Endpoints

The application runs on localhost:7233 and provides the following endpoints:

  • GET /api/Access/fruits: Fetches a list of fruits.
  • POST /api/Auth/login: Logs in a user.
  • POST /api/Auth/signup: Registers a new user.

Running the Application

To run the application, follow these steps:

  1. Clone the repository.
  2. Open the project in Visual Studio and press Ctrl + F5 to run the code without debugging. This will open the Swagger UI in your browser.
  3. Alternatively, you can run the application from the terminal using the dotnet run command. The application's port will be displayed in the terminal.

Using the API

Here's how to use the available endpoints:

Sign Up

Endpoint: POST /api/Auth/signup

Request body: json { "firstName": "string", "lastName": "string", "email": "string", "password": "string", "confirmPassword": "string", "company": "string", "accountType": 0 }

The accountType property specifies the type of account to create:

  • 0: FrontOffice
  • 1: BackOffice
  • 2: Admin

Log In

Endpoint: POST /api/Auth/login

Request body:

json { "email": "string", "password": "string" }

Get Fruits

Endpoint: GET /api/Access/fruits

No request body is required for this endpoint.

DATA To Test With

When you run the application the database is automatically seeded with the following users with password testPassword1!, you can use the users to test the app { FirstName = "Ade", LastName = "Smith", Company = "Process", UserName = "[email protected]", Email = "[email protected]", AccountType = AccountType.Admin }

{ FirstName = "John", LastName = "Samuel", Company = "Process", UserName = "[email protected]", Email = "[email protected]", AccountType = AccountType.BackOffice }

{ FirstName = "Doe", LastName = "Leo", Company = "Process", UserName = "[email protected]", Email = "[email protected]", AccountType = AccountType.FrontOffice }

processrus_coding_challenge's People

Contributors

flappizy avatar

Watchers

 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.