This web application designed for Pierre to showcase his collection of delightful treats. The application emphasizes user experience, complete with an authentication system and a many-to-many relationship between treats and flavors.
You can access the live version of my web application here
- C#
- HTML
- CSS
- .Net 6.0
- ASP.NET Core MVC 6.0
- Entity Framework Core
- User Authentication: Allows users to register, log in, and log out.
- CRUD Functionalities: Create, Read, Update, and Delete functionalities are exclusively accessible for authenticated users.
- Many-to-Many Relationships: A relationship exists between Treats and Flavors, where a treat can have various flavors and vice versa.
- Interactive UI: Features a splash page that lists all treats and flavors, and allows users to view all treats/flavors associated with a particular treat or flavor.
Installing/Configuring MySQL:
- Follow the instructions on this page for installing and configuring MySQL.
Installing dotnet-ef:
- Run the following command to globally install dotnet-ef tools which will allow you to create migrations and create databases:
$ dotnet tool install --global dotnet-ef --version 6.0.0
Cloning the Repo:
- Open Terminal.
- Change your directory to where you would want the cloned directory.
- Input the following command into your terminal:
$ git clone https://github.com/Object-ions/SST.Solution.git
- Using the terminal, navigate to the production directory: "SST" and create a new file called appsettings.json
- Within appsettings.json, put in the following code while also replacing the following values with your own values as shown below the code snippet:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;database=[YOUR-DB-NAME];uid=[YOUR-USERNAME-HERE];pwd=[YOUR-PASSWORD-HERE];"
}
}
- [YOUR-USERNAME-HERE] with your username
- [YOUR-PASSWORD-HERE] with your password
- [YOUR-DB-NAME] with the name of your database
Running the program:
- Navigate to the project's production directory "SST" using the terminal.
- Run the following command to update the database:
$ dotnet ef database update
- Within the command line, run the command
$ dotnet watch run
to compile and execute the console application in developer mode.
However, if update does not work, run this command in your terminal:
$ dotnet ef migrations add Initial $ dotnet ef database update
- Home/Splash Page:
/
- Lists all treats and flavors.
- Treats:
- View all treats:
/treats
- View specific treat details:
/treats/{treatId}
- View all treats:
- Flavors:
- View all flavors:
/flavors
- View specific flavor details:
/flavors/{flavorId}
- View all flavors:
(All the above routes plus the following)
-
Treats:
- Add a new treat:
/treats/add
- Edit a treat:
/treats/{treatId}/edit
- Delete a treat:
/treats/{treatId}/delete
- Add a flavor to a treat:
/treats/{treatId}/addflavor
- Add a new treat:
-
Flavors:
- Add a new flavor:
/flavors/add
- Edit a flavor:
/flavors/{flavorId}/edit
- Delete a flavor:
/flavors/{flavorId}/delete
- View treats with a specific flavor:
/flavors/{flavorId}/treats
- Add a new flavor:
-
User Authentication:
- Register a new account:
/register
- Log in:
/login
- Log out:
/logout
- Register a new account:
- No bugs known
MIT License
Copyright (c) 2023 Moshe Atia
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.