This application serves as a portal for new Hogwarts students to be accepted into the school, buy supplies, get sorted into the respective houses, and explore their common room.
- VS Code Software
- Git
- Github
- C#
- .NET5
- ASP.NET Core
- Javascript
- AJAX
- jQuery
- Bootstrap
- MVC
- Razor View Engine
- MySQL Workbench
- Windows PowerShell
- Identity
This is a fan based recreation of the Harry Potter world. It is a MVC, C# application that let's users login, shop for a items they will need during their first year at Hogwarts and then be sorted into a house.
Users will also be able to navigate to their common rooms and interact with items there.
The entirety of the application will be subject to login authorization via Identity. A registered user can read, and edit the database as necessary, automatically updating the database.
Required Software
-
You will need some type of coding software should you wish to view and edit the code. VS Code is an example of a free code editor, which can be downloaded at VS Code.
-
Additionally, you will need to download the .NET framework, which can be downloaded at .NET5.
-
To effectively work with the database, download MySQL Workbench at MySQL Workbench.
Cloning
-
In order to utilize this page on your local machine, you will need to clone a copy of this repository.
-
Navigate to your desired directory in your command terminal and run:
$ git clone https://github.com/rjashby/Hogwarts-TeamWeek
-
Once cloned, open the folder of the cloned repository in your code editor to view all the necessary files.
Downloading
-
In your browser, navigate to https://github.com/rjashby/Hogwarts-TeamWeek, and click the green "Code" button, which will provide a drop down menu. Click on "Download ZIP" at the bottom of the menu, and save it to your desired location.
-
Once downloaded, unzip and extract the files.
-
Follow the steps above to view, edit, and open the files as needed.
Running the Program
-
In your terminal, navigate to the Hogwarts folder by starting at the root directory and typing the following into your terminal:
cd Hogwarts
-
In the Hogwarts directory run
dotnet restore
to download the needed dependencies. -
Once here, you will need to run the following in your terminal:
dotnet build
-
Once the project builds (and no errors appear), you can run the program by entering the following in your terminal:
dotnet run
-
If you wish to changes made in real time, you may run:
dotnet watch run
-
At this stage, only the basic layout will be in place. You will first need to build the database to effectively use the application.
Initial Database Setup
- Start by creating an appsettings.json file in the main/root directory. This file should BE KEPT PRIVATE and should be populated with the following lines of code:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;database=[Your Database Name Goes Here];uid=[Your Id Goes Here];pwd=[Your Password Here];"
}
}
- Ensure that your .gitignore file includes the following files before pushing to GitHub:
*/obj/
*/bin/
.vscode
*/appsettings.json
Creating The Database
-
Ensure that you have proper tools installed. Start by installing dotnet ef by running the following command in your terminal:
dotnet tool install --global dotnet-ef
-
You will already have access to the current migration, with which you can build and view the database. Now run the following command in your terminal in the "Hogwarts" directory:
dotnet ef database update
-
If you want to view the database, open MySQL Workbench. You should see your database, with the appropriate tables and columns. Note: the database name will be based on the name you supplied. See: Initial Database Setup, Step 1.
- No Known Bugs.
This project is licensed under the MIT License. Copyright (C) 2022 Ryan Ashby, Liam Eller, Daniel Lindsey, Anastasiia Riabets, and Sarah Espinet. All Rights Reserved.
MIT License
Copyright (c) 2022 Ryan Ashby, Liam Eller, Daniel Lindsey, Anastasiia Riabets, and Sarah Espinet.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so
subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.