In this article, we are going to take a deep dive into the Frapper project template and see all details implementation of it.

Buy Me A Coffee

Technologies Used

  • ASP.NET Core 3.1
  • Entity Framework Core 3.1

Install Tools

  • Visual Studio 2019
  • SQL Server 2019
  • .NET Core SDK 3.1

Feature Overview

  • Alerts
  • Custom User Management
  • Unit Of Work Using Entity Framework
  • Unit Of Work Using Dapper
  • Configure Menus by Roles
  • Custom Grids
  • Captcha
  • Cache Services
  • Dapper
  • Entity Framework Core
  • Create Pdf files
  • Create Notice
  • Capture Photo from WebCam
  • Cropping Images and storing
  • Create Notice
  • Download Files
  • Download Excel Reports
  • Exception Logging
  • FluentValidation
  • Globalization and Localization
  • health checks
  • jQuery Datetime pickers & Bootstrap Datetime pickers
  • Jtable Grid
  • Loader
  • Modal popups
  • Notification
  • Ordering Menus
  • Upload Files to store in a folder
  • Upload Files to store in Database

NuGet Packages which are used in Project

  • AspNetCore.HealthChecks.Redis
  • AspNetCore.HealthChecks.SqlServer
  • AspNetCore.HealthChecks.UI
  • AspNetCore.HealthChecks.UI.Client
  • AspNetCore.HealthChecks.UI.InMemory.Storage
  • AspNetCore.HealthChecks.UI.SqlServer.Storage
  • AutoMapper.Extensions.Microsoft.DependencyInjection
  • DinkToPdf
  • DNTCaptcha.Core
  • EPPlus
  • FluentValidation.AspNetCore
  • Microsoft.AspNetCore.Mvc.NewtonsoftJson
  • Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
  • Microsoft.EntityFrameworkCore
  • Microsoft.EntityFrameworkCore.SqlServer
  • Microsoft.EntityFrameworkCore.Relational
  • Microsoft.Extensions.Caching.Redis
  • Microsoft.VisualStudio.Web.CodeGeneration.Design
  • SixLabors.ImageSharp
  • StackExchange.Exceptional.AspNetCore
  • X.PagedList.Mvc.Core
  • Microsoft.Data.SqlClient
  • Dapper
  • Newtonsoft.Json
  • System.Linq.Dynamic.Core
  • System.ComponentModel.Annotations

Getting Started

  • Clone code from Github: git clone https://github.com/saineshwar/Frapper
  • Open solution Frapper.Web.sln in Visual Studio 2019
  • There are 2 Database Scripts FrapperDB (Main Database),FrapperAuditDB (Request Audit Database) Download Database Script
  • appsettings.json file update DatabaseConnection (FrapperDB Database) , AuditDatabaseConnection (FrapperAuditDB Database)
  • Run Database Script which is provided
  • Make Changes in ConnectionStrings, ApplicationSettings, Exceptional, RedisServer in appsettings.json file
  • Build project which will restore all NuGet Packages
  • Final Step Run Project

Project Structure

Project Structure is simple to understand.

Frapper.Web

Frapper.Web which is Main ASP.NET Core Project Template.

Frapper.Common

Frapper.Common this project contains all common libraries which are used in a project such as Session keys, AppSettings, ConnectionStrings, Algorithms.

Frapper.Entities

Frapper.Entities this project contains all Entities.

Frapper.Repository

Frapper.Repository this project contains all Class which access database. In this part we have separated Responsibility into two different part reading and writing.

Command Folder contains all Commands such as Insert, Update, Delete using both Entity Framework and Dapper.

Queries Folder contains all Select Queries Using both Entity Framework and Dapper.

Frapper.Services

Frapper.Services this project is used to write business logic and also common services such as generating Excel, PDF, Sending Emails. Frapper.Services project has reference to with Frapper.Repository project which means it can access the database directly and Frapper.Services project can be accessed in Frapper.Web project.

Frapper.ViewModel

Frapper.ViewModel this project contains all ViewModel used in project.

Till now we have seen Project structure if Frapper project now let’s Move Forwards and see all features.


Features

Alerts

In this project we have used jQuery Confirm Alerts.

Custom User Management

Custom User Management which contains Login, Registration, Forgot Password, Change Password. Disabling and enabling users.

All CRUD operations are done using the Repository Pattern and Unit of Work Pattern. Also, we have separated Responsibility into two different part reading (queries) and writing (commands).

  • Registration
  • Change password
  • Forgot Password
  • Email Sent with Reset Password Link

Email Reset Link

Unit Of Work Using Entity Framework

Unit Of Work Using Dapper

Configure Menus by Roles

Custom Grids

Captcha

For Captcha we have used DNTCaptcha.Core Library.

Cache Services

In this project we are using 2 caching services

  1. Memory Cache
  2. Redis

Memory Cache Implementation

Redis Cache Implementation

Dapper

Entity Framework Core

Create Pdf files

We are using this DinkToPdf Library for creating pdf.

Create Notice

In creating Notice form we have used Date Range Picker and CKEditor.

Rendering Notice

For rendering Notice we have used Bootstrap Modal pop.

Capture Photo from WebCam

WebcamJS library for capturing JPEG/PNG images in JavaScript

Cropping Images and storing

For Cropping Images, we are using SixLabors.ImageSharp library.

Download Files

Download Excel Reports

For downloading Excel, we have used EPLUS library.

Exception Logging

For Logging exception, we have to use StackExchange.Exceptional.AspNetCore.

FluentValidation

FluentValidation validation library for building strongly-typed validation rules.

Globalization and Localization

We have used 5 languages for demo. For that we have created 5 resource files.

Resource file

HealthChecks

jQuery Datetime pickers & Bootstrap Datetime pickers

  • jQuery Datetime picker
  • Bootstrap Date Range Picker

Jtable Grid

Loader

Modal popups

We have used bootstrap modal popups and we have also rendered form in modal popup. And wrote whole validation using jQuery validation plugin.

Notification

We are using Toasts Notification in this project.

Notification Service

Notification Partial View

Ordering Menus

For ordering menus, we are using jQuery UI sortable.

Upload Files to store in a folder

Upload Files to store in Database

By