Skip to content
/ Couponel Public

This is an educational project in which we have built a website to manage the coupons using ASP.NET, Angular, and Microsft SQL Server.

Notifications You must be signed in to change notification settings

enaki/Couponel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Couponel

The purpose of this educational project is to make a website to manage the coupons.
There are 3 types of users:

  • student (access, add, use coupons)
  • offerer (create coupons)
  • admin (access to the statistics page)

The application is built on 2 servers:

  • front-end server (using angular) (running on port 4200)
  • back-end server (using ASP.NET) (running on port 5001)

These servers communicate with REST/API.

Project Diagram

Back-End Notes

The back-end server is built on multi-layer-architecture:

  • Presentation Layer (responsible for the controllers/user interface)
  • Bussiness Layer (responsible for the logic and functionality)
  • Persistence/Database Layer (responsible for CRUD operations)

N-Layer Architecture

E-R Diagram

E-R Diagram

Configure The Project

  1. Install Microsoft Sql Server
  2. Install SQL Server Management Studio
  3. Install Angular CLI
  4. Make sure you have .NET and ASP.NET configured in Visual Studio
  5. Open Package Manager Console in Visual Studio (make sure the Default Project is Couponel.Persistence) and run the following commands:
    • add-migration Migration-v01 (to create a migration).
    • update-database (to generate Couponel Database using the created migration)

You can access the created database in SQL Server Management Studio.

Optional: Populate the database running script reinitialize_data.bat from Scripts folder. Created users have the password identical to their username. (Example: user mishu has the password mishu)

Note: Diacritics may not be read correctly because of encoding format. In that case, to fix this issue, you could copy the generated queries from AllInOne.sql from Scripts\SqlScripts and execute it in SQL Server Management.

How to run the project

  1. Run CouponelApp in Visual Studio
  2. Run Couponel.Web with Visual Code or WebStorm:
    • npm install (to install required dependencies) (run first time)
    • ng serve

Screenshots Samples

  • Admin Statistics Page
    Admin Statistics Page

  • Login Page
    Login Page

  • All Vouchers Page
    All Vouchers Page

  • Student Redeemed Vouchers Page
    Student Redeemed Vouchers Page

  • My profile Page
    My profile Page

  • Profile Edit Page
    Profile Edit Page

  • Student Coupon Review Page
    Student Coupon Review Page

  • Student Page
    Student Page

  • Offerer Page
    Offerer Page