Git Product home page Git Product logo

alg's Introduction

ALG WEB.API test project

Coding task:

Develop an ASP.Net Core API for managing promo codes. Please use this layout as a reference https://www.figma.com/file/6J7oriX3K4zPLF2lrhfIvJ/front-end-test-prototype

API should support the following functionality:

● Ability to search services by name

● Ability to Activate bonus for a Service for the current user

● Infinite scroll for the Services list

● An API user should be authorized.

● Store data in any relational database, use EF Core to access data.

● Use tests in your project.

● The project should include a README.md with instructions on how to run it locally.

System Requirements

  1. .Net SDK 3.1.402 should be installed
  2. Visual Studio 2019 should be installed (optionally)
  3. MSSQL Server should be installed (any modern version).

How to run the application from command line

  1. Open CMD or PowerShell

  2. Select a folder you want it to be installed

    cd ‘some folder’

  3. Pull the source code from Github

    git clone https://github.com/EduardSilantiev/ALG.git

  4. Select a ALG.Web.Host folder

    cd ALG\src\ALG.Web.Host

  5. Run the application

    dotnet run

The application will be built and started. Then it can be accessed in a Browser by the address: https://localhost:5001/

To stop the application, press Ctrl+C

How to run the application from Visual Studio 2019

  1. Open CMD or PowerShell

  2. Select a folder you want it to be installed

    cd ‘some folder’

  3. Pull the source code from Github

    git clone https://github.com/EduardSilantiev/ALG.git

  4. Find and click a ALG.sln file

  5. When Visual Studio opens, press Ctrl+F5 or select in menu Debug\Start Without Debugging

The application will be built and started. Then it can be accessed in a Browser by the address: https://localhost:44315/index.html

When the App starts for the first time it creates an ALG database in MSSQL server (if not created) and seeds the database with a test data. If you want to use another database name, please change the connection string in an appsettings.json file.

Three users are created by default:

Email: [email protected] Password: 111

Email: [email protected] Password: 222

Email: [email protected] Password: 333

Seven services are created by default: Sitecostructor.io, Appvision.com, Analytics.com, Logotype, Google.com, Microsoft.com, Amazon.com

The promocode for all services is itpromocode

Features

  1. Entity Framework Core – Code First. With automatic database creation, model migration and seeding with a test data
  2. Repository Pattern
  3. Logging with Serilog in files
  4. OpenAPI documentation, Swagger UI
  5. Generic pagination mechanism
  6. Identity with JWT Authentication
  7. Custom Exception Handling Middlewares
  8. API Versioning
  9. Fluent Validation
  10. Automapper
  11. Unified error messages format

How to use SwaggerUI with JWT Authentication

https://docs.google.com/document/d/1z5pdNfC3Sa1VRd-kKgpbWDRHywe5p_OsD2pNVCYLU4c/edit?usp=sharing

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.