Giter Club home page Giter Club logo

digiblog's Introduction

DigiBlog

Demo Blog Application - Backend

Installation

1st Step - Create Database

Execute all scripts from Database.sql file on your local MSSQL database. Database.sql file contains all database objects and demo records such as demo roles and demo users.

2nd Step - Run Project

Open your Terminal or Command Prompt and run enter this dotnet CLI commands dotnet restore and dotnet run Your application will be hosted at this endpoint: https://localhost:5001

3rd Step - Call APIs

You can use Postman or Insomnia to make API calls. All services work with a role-based session, for this reason you must to get a JWT token before calling any API. To do this, you need to call the api/users/authenticate method first.

You can find the full list of APIs and sample authentication requests below.

APIs

  1. Roles

    https://localhost:5001/api/roles

  2. Users

    https://localhost:5001/api/users

  3. Categories

    https://localhost:5001/api/categories

  4. Articles

    https://localhost:5001/api/articles

  5. Comments

    https://localhost:5001/api/comments

Authentication(JWT)

POST https://localhost:5001/api/users/authenticate

Get authentication token for admin role.

BODY

{
	"Username": "demoadmin",
	"Password": "demoadmin"
}

Get authentication token for author role.

BODY

{
	"Username": "demoauthor",
	"Password": "demoauthor"
}

Get authentication token for member role.

BODY

{
	"Username": "demomember",
	"Password": "demomember"
}

Used Patterns

  • Dependency Injection
  • Repository Pattern
  • Fluent API
  • Controller - Service - Repository architecture

I have used these patterns in the Zurich Internet Branch project before.

What more can be done!

  • Unit test scripts with mock objects.
  • Swagger for detailed API documentation.
  • More validation and encoding for data consistency and security.
  • More controller methods such as paging, sorting, change password etc.
  • More detailed exception messages.
  • Redis for better caching.
  • 3rd party logging packages such as NLog.

digiblog's People

Contributors

rahmanyerli avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.