- Chris Loveless and Yoonis Ali
This team week project was completed during the C# and .NET 6 section of the course. It utilizes Identity and Roles to handle User Authentication and Authorization within the app. Sales Shack is a sales management web application. It allows management to create roles and assign those roles to created users. Users with the "Administrator" role have full access to all functionality within the app. Users with the "User" role can only Create, Read, Update, and Delete for the included classes. These classes are Client, Product, and Sale. The Promotions section can be viewed by Users but Create, Update, and Delete functionality is reserved for Administrators. A User can view Products, along with their associated Sales and Promotions. This app is intended to help a company and its' managment and sales teams track Products, Sales, Promotions, and Client list all in one place.
- C#
- Html
- CSS
- ASP .NET6
- MySQL
- MVC
- Entity Framework Core
- Logo.com
- Install MySQL Community Server and MySQL Workbench. Follow the instructions here.
- Install tool to update database with
dotnet tool install --global dotnet-ef --version 6.0.1 - Clone down the git repo
https://github.com/ChrisKLoveless/SalesShack.Solution.gitto thedesktopdirectory. - Open the project with VSCode or a different source code editor.
- In the root directory be sure to create a
.gitignorefile and input the following to secure your database information:appsettings.jsonobjbin
- If you are pushing this project to a remote git repo add
.gitignoreto git and commit before moving on. - Restore required packages: change directory to
SalesShackand restore with$ dotnet restore
- To connect your database, create file
appsettings.jsonin the production directorySalesShack - Fill in the file with the following code: Be sure to replace the required fields marked with
[]that must contain the database name, user id, and password.
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;database=[DB-NAME-HERE];uid=[YOUR-USERNAME-HERE];pwd=[YOUR-PASSWORD-HERE];"
}
}
- While in the
SalesShackdirectory use$ dotnet buildto build the program. - To include this projects' data structure, change directory to
SalesShack, and rundotnet ef migrations add Initialand then rundotnet ef database update - While in the
SalesShackdirectory use$ dotnet watch runto run the program in the browser with a watcher.
- Once some users are created through the acount view, management can asign roles by navigating to url
https://localhost:7221/Role/Index - Click the
Create a Rolebutton and create roles forAdministratorandUser - Back in the index view click the
updatebutton and select available users to apply a role.
- Adding an api to the web app.
- Categories for products.
- Seeding data for ease of access.
- Add images to product cards.
- After assigning a role, the user must log out and back in to their account in order for role to apply.
- On small view area, the menu button only works if clicked on outside.
- If any bugs are found please email a brief description to:
chriskloveless@gmail.comoryoonismahamoudali@gmail.com
Copyright (c) 2022 Chris Loveless and Yoonis Ali MIT