/PierresTreats.Solution

A C#/ASP.Net web application that utilizes many-to-many relationships, stores user data through the use of MySQL and Entity Framework Core, and manages and stores user accounts with ASP.NET Core Identity.

Primary LanguageC#

Pierre's Sweet and Savory Treats

A C#/ASP.Net web application that utilizes many-to-many relationships, stores user data through the use of MySQL and Entity Framework Core, and manages and stores user accounts with ASP.NET Core Identity., Mar. 27, 2020

By Benjamin Thom

Description

A web application to view and manage Pierre's treats and flavors. All website visitors can view Pierre's treats and flavors, but only registered users can create, update and delete treats and flavors. A registered user must log in to the application to make updates to treat names and flavor descriptions and once all changes are made, the user can simply log out.

Preview

Landing Page Preview

Project Specifications

Behavior Input Output
A user can type a http://localhost:5000/ into their web browser and press ENTER or click the Go button, the WebBrowser control navigates to the homepage Homepage (http://localhost:5000/) Pierre's Sweet and Savory Treats
Once on the homepage the web application displays a welcome message with a drop-down menu in the left corner, and a Login/My Account link in the right-hand corner N/A Main Menu (left), Welcome Message (center), Login/ My Account (right)
A user can register as a new user or log in and log out of their existing account. Account Homepage (http://localhost:5000/Account) Register (http://localhost:5000/Account/Register), Log in (http://localhost:5000/Account/Login)
A user can navigate to a splash page that lists all treats or flavors (T)Treats (http://localhost:5000/Treats), (F)Flavors (http://localhost:5000/Flavors) List of treats, List of flavors
Users can click on an individual treat or flavor with the splashpage to see all the treats/flavors that belong to it Treat: Scone (http://localhost:5000/Treats/Details/1), Flavor: Chocolate (http://localhost:5000/Flavors/Details/1) (T)Name:Scone Flavors the treat contains:Chocolate, (F)Description:Chocolate Treats the flavor belongs to:Scone
Only logged in users can create, update, and delete treats and flavors Treat Details (http://localhost:5000/Treats/Details/1), Flavor Details (http://localhost:5000/Flavors/Details/1) (T)Create (http://localhost:5000/Treats/Create), (T)Edit (http://localhost:5000/Treats/Edit/1), (T)Delete (http://localhost:5000/Treats/Delete/1), (F)Create (http://localhost:5000/Flavors/Create), (F)Edit (http://localhost:5000/Flavors/Edit/1), (F)Add Treat To Flavor (http://localhost:5000/Flavors/AddTreat/1), (F)Delete (http://localhost:5000/Flavors/Delete/1)
All users who are signed into a user account can view treats and flavors Email: test@mail.com, Password: test Hello, test@mail.com!
The treats and flavors a user creates can have a many-to-many relationship N/A A treat's flavors: "chocolate, chai, butter" and a flavor's treats: "croissants, cheesecake, cupcake"

Setup/Installation Requirements

In Terminal:

  • Navigate to where you want this application to be saved, i.e.: cd desktop
  • Clone the file from GitHub with HTTPS git clone https://github.com/benjamin-thompdx/PierresTreats.Solution.git
  • Open file in your preferred text editor
  • On Mac: open -a {your text editor} PierresTreats.Solution
  • On Windows: PierresTreats.Solution

Download Manually:

Installing MySQL | MacOS:

  • Download the MySQL Community Server DMG File from MySQL Community Server
  • You can exit the mysql program by entering exit.
  • Download the MySQL Workbench DMG File from MySQL Workbench. (Use the No thanks, just start my download link.)
  • Install MySQL Workbench to Applications folder.
  • Open MySQL Workbench and select the Local instance 3306 server. You will need to enter the password you set. (We used epicodus.) If it connects, you're all set.

Installing MySQL | Windows 10:

  • Download the MySQL Web Installer from MySQL Downloads (Use the No thanks, just start my download link.)
  • You can exit the mysql program by entering exit
  • Add the MySQL environment variable to the System PATH. We must include MySQL in the System Environment Path Variable. This is its own multi-step process. Instructions here are for Windows 10:
    1. Open the Control Panel and visit System > Advanced System Settings > Environment Variables...
    2. Then select PATH..., click Edit..., then Add.
    3. Add the exact location of your MySQL installation, and click OK. (This location is likely C:\Program Files\MySQL\MySQL Server 8.0\bin, but may differ depending on your specific installation.)
  • Open MySQL Workbench and select the Local instance 3306 server (it may have a different name). You will need to enter the password you set (We used epicodus). If it connects, you're all set.

Note For Editors:

  • Download the .NET Core SDK Software Development Kit
  • Open the .Net Core SDK file and install
  • To confirm installation was successful, run the $ dotnet --version command in your terminal
  • Install dotnet script, run the $ dotnet tool install -g dotnet-script command in your terminal
  • Restart your terminal to complete installation, and run the $ dotnet run command to run application within your terminal - Note: To exit, simply press Ctrl + C
  • Open project's productions directory within your terminal $ cd PierresTreats.Solution/PierresTreats
  • Run the command dotnet restore
  • Run the command dotnet build
  • If build is successful,run dotnet ef database update
    • if build failed, make necessary updates and rerun dotnet build followed by dotnet ef database update

Known Bugs

No known bugs at this time.

Support and Contact Details

Have a bug or an issue with this application? Open a new issue here on GitHub.

Technologies Used

  • Git 2.23.0
  • C# language
  • .NET Core 2.2.106
  • dotnet script 0.50.1
  • VS Code 1.43.1
  • Model-View-Controller(MVC) framework
  • Create, Read, Update, Delete (CRUD) functionality
  • MySQL 8.0.15
  • MySQL Workbench 8.0.15
  • Entity Framework Core 2.2.4
  • Language-Integrated Query (LINQ)
  • ASP.NET Core Razor

License

This webpage is licensed under the MIT license.

Copyright (c) 2020 Benjamin Thom