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.
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)
- Install Microsoft Sql Server
- Install SQL Server Management Studio
- Install Angular CLI
- Make sure you have .NET and ASP.NET configured in Visual Studio
- 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: usermishu
has the passwordmishu
)
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.
- Run CouponelApp in Visual Studio
- Run Couponel.Web with Visual Code or WebStorm:
npm install
(to install required dependencies) (run first time)ng serve