- Open SQL Server Management Studio (SSMS), create a new database called
EasyUTR. - Right click the created database
EasyUTR, choose "New Query" to open a new query window for the database.3. Open SQL script doc/database/DropTables.sql. Copy the content to your SSMS window and run it to drop all existing tables. - Open "Tools" -> "Nuget Package Manager" -> "Package Manager Console" (PMC), create tables that are synchronised with Models in the code:
- run
Drop-Database -Context EasyUtrContext -Verbose - run
Add-Migration InitialIdentityContext -Context EasyUtrIdentityContext - run
Update-Database -Context EasyUtrIdentityContext - run
Add-Migration InitialContext -Context EasyUtrContext - run
Update-Database -Context EasyUtrContext
- run
- Open SQL script doc/database/2_PopulateTables.sql. Copy the content to your SSMS window and run it to populate tables with sample data.
The design of the database can be found in UML file doc/database/database-design.uxf, which can be viewed using UMLet.
In order to protect sensitive data in the configuration file, we remove appsettings.json from the respository. You should create your own appsettings.json using the following template.
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"EasyUtrContext": "Data Source=XXXXXXXXXXX;Initial Catalog=EasyUTR;...etc for your own connection string"
},
"Stripe": {
"SecretKey": "sk_test_YOUR_SECRET_KEY",
"PublicKey": "pk_test_YOUR_PUBLIC_KEY"
}
"AdminSettings": {
"Email": "admin@email.address",
"Password": "Admin_Password"
}
}Open easyUTR/appsettings.json, and modify database connection string of ConnectionStrings -> EasyUtrContext to match the database built in your own local environment.
UTR manages several petrol stations and convenience stores throughout Adelaide, providing fuel from different suppliers and hosting popular food outlets. This web application is designed to transform the customer experience by enabling users to conveniently order and pay for fuel and food from their vehicles, cutting down on wait times and enhancing overall convenience.
Registration and Login
- Customers can log in or register from the top right of the page to access their accounts.
Browse and Shop
-
On the home page, customers can navigate through a feature guide to the "Shop" page, where they can browse available items.
-
The shop includes search and filtering options to help customers refine their search based on specific needs.
-
Upon selecting an item, customers are directed to a detailed item page where they can choose their preferred petrol station and adjust the quantity of the item.
-
Customers can add selected items to their shopping cart, with all selected items and quantities tracked in the cart.
Checkout and Payment
- Customers can proceed to the cart and complete the checkout process once they are done shopping. Payment is made through a secure third-party payment system.
Store Browsing
- By selecting "Our Stores," customers can view a list of all UTR petrol stations. Clicking on a specific station will provide detailed information about that station, including the items it has available.
- The map feature allows customers to use their location to view nearby petrol stations for added convenience.
Order History
- Customers can view their completed orders in the "Order History" section, allowing them to track past purchases.
UTR Rewards
- On the home page, customers can participate in the UTR Rewards program to earn points and access exclusive deals.
- Details about the rewards program are available on the "Join UTR Rewards" page.
Store Management
- Admins can edit all UTR petrol stations, updating the details of each station as needed.
- In the edit page, admins can add new stations by providing detailed information about the new UTR station.
- Admins can also delete stations from the list by simply clicking delete, removing the station from the system.
Staff Management
- Admins can manage staff by navigating to the Staff section, where they can add new employees by filling out their details in the Create New Staff form.
- The admin can view a complete list of all staff members and has the ability to edit staff details when necessary.
Item Management
- UTR staff can log into the system and modify item details, ensuring accurate information about each item.
- Staff can also add new items to the item list or delete items as needed.
Store Management
- Staff members can edit store details, add new stores, or delete stores from the system.
Order Notifications
- When a customer places an order, the system will automatically send an in-system notification to the stock manager of the corresponding store, informing them about the new order.