Tour Posrtal is my defense project for ASP.NET Core course at SoftUni (June-August 2021). The website is a part of a major project, that consists of 2 parts (TourPortal Client and TourPortal Server). Each of the two starts independently, giving functionality to a Single Page Application (SPA).
Tour Portal is a site that represents a platform for gathering people looking for a hotel to visit and hoteliers offering their services. By registering to the website, each user can choose a role between being a user or an owner so they can receive different functionality from the platform.
The main idea is to organize a space in which businesses can get a working environment, offering and selling their services, and consumers having easy access to them..
Each hotel owner can register the services he offers, as well as his employees.
A employee of the hotel is a user who processes the bookings of services. A registered service is confirmed by the employee when a user who has booked a service visits the hotel. The employee cannot register his account in the platform.
Each user can search for services by criteria such as free date, number of beds, number of people and then can make a reservation for a selected service.
There is only one registered administrator in the platform. It receives information about registered users, services and reservations. The administrator can disable or delete entries in the system.
- Administrator
- Owner
- Employe
- User
- ASP.NET CORE 5.0
- ASP.NET Identity
- ASP.NET Security JwtBearer
- ASP.NEt Authorization
- ASP.NET CORE view components
- ASP.NET Core areas
- MSSQL Server
- IdentityServer4
- Serilog
- Serilog AspNetCore
- MyTested AspNetCore Mvc
- XUnit
- Client-Side Blazor
- Comunication between Blazor components based on EventHandlers
- Blazored LocalStorage
- Blazored Modal
- Radzen Blazor
- BlazorStrap
- Microsoft Json
- Newtonsoft Json
- Bootstrap
To start the application you need to follow the following steps:
{ "ConnectionStrings": { "DefaultConnection": "Server=.\\YourServer;Initial Catalog=DbName;User Id=userName;Password=password;MultipleActiveResultSets=true" }, "JwtSecurity": { "JwtSecurityKey": "set your secret key", "JwtIssuer": "https://localhost", "JwtAudience": "https://localhost", "JwtExpiryInDays": 10 } }
2. In wwwroot/appsethings.json file on the TourPortal.Client change the url to your TourPortal.Server host
{ "apiUrl": "http://localhost:5000/" }
3. In the Solution -> Set Startup Projects -> use radio button Multiple startup projects and selectеd the action for Cliend and Server to run simultaneously
The application uses two layouts for registered and unregistered users respectively. The default layout is the layout for unregistered users. All required CSS and JS libraries are loaded through the layout for registered users using the following code:
private async Task RemoveElementsFromTemplate(IJSObjectReference module) { await module.InvokeVoidAsync("removeScripts"); await module.InvokeVoidAsync("removeCss"); } private async Task AddStyles(IJSObjectReference module) { foreach (var cssPath in cssPaths) { await module.InvokeVoidAsync("addCss", cssPath); } } private async Task AddScripts(IJSObjectReference module) { foreach (var scriptPath in scriptPaths) { await module.InvokeVoidAsync("addScripts", scriptPath); } }